I need to create and write normal text files in the USS filesystem from an HLASM program. Unfortunately, I cannot use BPX1OPN/BPX1WRT for some reason. The OPEN/PUT macros are my only option.
I need to create "normal" text files --- lines are in different lengths and ended with the new-line character. However, using the PUT macro, I can only create files similar to the PS dataset with fix-length records, which makes the lines in the text file have the same length and padded with spaces.
My question is that how I can create text files in the USS just like created by the C funtions fopen/fputs.
I hope I managed to explain my question clearly.
By the way, in the DCB, I only used DDNAME, PATH, PATHOPT, PATHMODE, FILEDATA(TEXT).
Thank you very much.
VBREC DC AL2(VBRECL,0),C'THE TEXT PORTION OF THE RECORD'
VBRECL EQU *-VBREC