DougInHuntValley
Technical User
After 16 years away from REXX, I have an assignment to do, and of course, a problem. The last problem, not getting any data in my output file took me an hour to find the missing period on the stem name.
Now, I am trying to write out a variable length file, but every record
is being padded with spaces to the maximum size. My max LRECL is
247, being set for me. When I set it in the ALLOC to 100, I had the same problem.
I am using ISPEDIT with HEX ON to see that I have spaces at the end of my records.
How do I make the EXECIO ... DISKW write out the entire stem as
variable length, only as long as the data I placed in it? Any
assistance or pointers to the page I missed in a manual would be most welcome.
Doug
ixformrec=ixformrec+1
formrec.ixformrec=mem||delim||delim||delim,
||formtag||delim||formvers||delim,
||formdate||delim||userid
IF debug = 1 THEN SAY "Output Rec:" formrec.ixformrec
END /* completes the do loop for trap.0 */
"DEL @WORK.HDR";
"ALLOC F(OUTHDR) DA(@WORK.HDR) NEW CATaLoG UNIT(TPUB) SPACE(20,20)",
" recfm(v b) lrecl(120) "
SAY formrec;
SAY "ABout to write out header file";
"EXECIO 0 DISKW OUTHDR (OPEN"
IF RC != 0 THEN SAY 'Open header failed' RC
"EXECIO " ixformrec " DISKW OUTHDR (STEM formrec."
IF RC <> 0 THEN SAY 'write header failed' RC
"EXECIO 0 DISKW OUTHDR (FINIS"
IF RC <> 0 THEN SAY 'close header failed' RC
Now, I am trying to write out a variable length file, but every record
is being padded with spaces to the maximum size. My max LRECL is
247, being set for me. When I set it in the ALLOC to 100, I had the same problem.
I am using ISPEDIT with HEX ON to see that I have spaces at the end of my records.
How do I make the EXECIO ... DISKW write out the entire stem as
variable length, only as long as the data I placed in it? Any
assistance or pointers to the page I missed in a manual would be most welcome.
Doug
ixformrec=ixformrec+1
formrec.ixformrec=mem||delim||delim||delim,
||formtag||delim||formvers||delim,
||formdate||delim||userid
IF debug = 1 THEN SAY "Output Rec:" formrec.ixformrec
END /* completes the do loop for trap.0 */
"DEL @WORK.HDR";
"ALLOC F(OUTHDR) DA(@WORK.HDR) NEW CATaLoG UNIT(TPUB) SPACE(20,20)",
" recfm(v b) lrecl(120) "
SAY formrec;
SAY "ABout to write out header file";
"EXECIO 0 DISKW OUTHDR (OPEN"
IF RC != 0 THEN SAY 'Open header failed' RC
"EXECIO " ixformrec " DISKW OUTHDR (STEM formrec."
IF RC <> 0 THEN SAY 'write header failed' RC
"EXECIO 0 DISKW OUTHDR (FINIS"
IF RC <> 0 THEN SAY 'close header failed' RC