W dniu 25.01.2023 o 23:35, Sri h Kolusu pisze:
Depending on the field 23,2 we have word ALTER/READ in the report.
However the field contain other values, let's say X'1101' which should be
translated to C'CHANGE'... but this record type implies slightly different
format. For X'1101' I should use
HEADER('DESC3') ON(175,8,CH) - note, 188->175 and
HEADER('DESC4') ON(189,8,CH) - that fiel can be empty for X'0000', X'0001',
X'0002'
Radoslaw,
It is quite simple as CHANGE has more capability. You can pick and choose the
values based on the value. So, use the following control cards. Note : I
left the include condition of RDW check as is. You can change it if you want to
accommodate the additional description.
//TOOLIN DD *
COPY FROM(INPUT) TO(TMP) USING(ABCD)
DISPLAY FROM(TMP) LIST(REPORT) -
HEADER('CODE ') ON(001,8,CH) -
HEADER('DESC1') ON(009,8,CH) -
HEADER('DESC2') ON(017,8,CH) -
HEADER('DESC3') ON(025,8,CH) -
HEADER('DESC4') ON(033,8,CH) -
BLANK
/*
//ABCDCNTL DD *
INCLUDE COND=(1,2,BI,GE,188)
OUTFIL VTOF,
BUILD=(023,2,CHANGE=(8,X'0000',C'ALTER ',
X'0001',C'READ ',
X'0002',C'UPDATE ',
X'1101',C'CHANGE '),
NOMATCH=(C'ERROR '),
101,08,
109,08,
************************************************************
* If position 23 has x'1101' then pick the contents at 175 *
* for a length of 8 bytes and for all other values pick *
* the contents at 181 for a length of 8 bytes *
************************************************************
23,02,CHANGE=(8,X'1101',175,8),
NOMATCH=(181,8),
************************************************************
* If position 23 has x'1101' then pick the contents at 189 *
* for a length of 8 bytes and for all other values space *
* it out. *
************************************************************
23,02,CHANGE=(8,X'1101',189,8),
NOMATCH=(C' '))
/*
And the sample report looks like this
CODE DESC1 DESC2 DESC3 DESC4
-------- -------- -------- -------- --------
ALTER AAAAAAA0 BBBBBBB0 CCCCCCC0
READ AAAAAAA1 BBBBBBB1 CCCCCCC1
UPDATE AAAAAAA2 BBBBBBB2 CCCCCCC2
CHANGE AAAAAAA3 BBBBBBB3 DDDDDDD3 EEEEEEE3
ERROR AAAAAAA4 BBBBBBB4 CCCCCCC4
Further if you have any questions, please let me know
Sri,
Indeed, now it is simple, after you explained it. Thank you for the
explanation. I appreciate it.
I like DFSORT, it is really powerful tool!
Regards
--
Radoslaw Skorupka
Lodz, Poland
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN