To all DFSORT gurus, I am having problems with variable record lengths where minimum record length is 211, 4 (RDW) plus 207 characters. The rest of the record is varying from 0 (zero) to max of LRECL=32756. I am just interested in the first 1000 characters of the input records. (See below for the input record sample)
This is the JCL: //MQ EXEC PGM=ICETOOL //TOOLMSG DD SYSOUT=* //DFSMSG DD SYSOUT=* //RAWMQ DD DISP=SHR,DSN=<mq report from CSQ1LOGP> //SORTSMF DD DISP=(NEW,DELETE,DELETE),SPACE=(CYL,(500,500,0)) //VREPT DD SYSOUT=*,LRECL=1000 //TOOLIN DD * SORT FROM(RAWMQ) TO(SORTSMF) USING(VLSH) DISPLAY FROM(SORTSMF) LIST(VREPT) - NOCC - BETWEEN(1) - TITLE('Extract of MQ CSQ1LOGP data') - DATE(4MD/) - TIME(24:) - PAGE - BLANK - WIDTH(1000) - HEADER('Date and Time') ON(5,21,CH) - HEADER('Time Diff') ON(26,7,CH) - HEADER('Time Log') ON(33,8,TC4,E'99:99:99.99') - HEADER('User Id') ON(61,8,CH) - HEADER('Time Unit') ON(69,8,TC4,E'99:99:99.99') - HEADER('Resource') ON(77,8,CH) - HEADER('Conn Type') ON(85,8,CH) - HEADER('Conn Id') ON(93,8,CH) - HEADER('Unit Work') ON(101,3,CH) - HEADER('Q Mgr') ON(108,4,CH) - HEADER('CSQ Queue name') ON(112,48,CH) - HEADER('Activity') ON(180,8,CH) - HEADER('Status') ON(188,1,CH) - HEADER('Shunted') ON(189,1,CH) - HEADER('CSVARDATA') ON(212,500,CH) /* //VLSHCNTL DD * OPTION VLSCMP,COPY /* Whenever I include last field starting with 212 and omit that INREC or OUTREC or similar statements with either VLSHRT or VLSCMP, then I get this example message: ICE218A 3 212 BYTE VARIABLE RECORD IS SHORTER THAN 711 BYTE MINIMUM FOR (sic, yes, there is nothing after FOR) If I totally omit the last field, then my job go RC=00. I tried this statement, but the part from column 212 is unconditionally padded fully with a blank for ALL records. Not good. INREC IFTHEN=(WHEN=(1,2,BI,LT,999),OVERLAY=(212:X)) Question: what can I do to pad to the righ witht a blank, the part from column 212 for up to 500 characters without loss of data? I have tried out without success with varying combination of VLSHRT, OUTFILE, OUTREC, etc. I have RTFM on 'Short control fields' in z/OS DFSORT Getting Started and z/OS DFSORT: Application Programming Guide'. IBM-MAIN and Google provided some hints, but I could not get the results I want. Thanks in advance. Groete / Greetings Elardus Engelbrecht First record is longer than 207 (211 with 4 char RDW), but second is exactly 207 (211 with 4 char RDW). You can see there is absolutely no characters or padding to the right. This is given by MQ reporting utility. Below snippet is starting at column 180: Command ===> 8----+----9----+----0----+----1---- F----+----F----+----F----+----F---- 8----+----9----+----0----+----1---- ---------------------------------- T CN.....2...............AMD ... E444CD00002F000000000000000CDC44000 3000350000B200000000001000114400000 ---------------------------------- E1 CN.....2.0............. CF44CD00002F0F0000000000000 5100350000B2300000000010001 ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN