|
View previous topic :: View next topic
|
| Author |
Message |
Lino Pontes
New User
Joined: 04 Apr 2016 Posts: 2 Location: US
|
|
|
|
Please help me understand the following statement:
| Code: |
INREC FIELDS=(01,18,
21,01,CHANGE=(02,C'7',C'19',
C'8',C'19',
C'9',C'19'),
NOMATCH=(C'20'),
21,80) |
Trimmed and code'd |
|
| Back to top |
|
 |
Rohit Umarjikar
Global Moderator

Joined: 21 Sep 2010 Posts: 3112 Location: NYC,USA
|
|
|
|
| funny, anyways look here and should be posted under dfsort |
|
| Back to top |
|
 |
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
| Quote: |
Hi! This is your First post in our Forums! So please be sure to 1) Use meaningful and descriptive Topic Title 2) Try to post your query in the relevant forum category 3) Make sure your query is not already posted and solved in our forums, Use the Search facility and avoid Reposts! If you are following the above rules, delete this message and post your query here!
|
I presume you did not delete the message because you did not follow points 2 and 3. Ylu also got point 1 wrong - iINREC is not a JCL statement/keyword/parameter/whatever. It is a DFSORT keyword.
Moved to correct part of the forum. |
|
| Back to top |
|
 |
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1248 Location: Richfield, MN, USA
|
|
|
|
Also, please use Code tags to preserve original spacing:
| Code: |
INREC FIELDS=(01,18,
21,01,CHANGE=(02,C'7',C'19',
C'8',C'19',
C'9',C'19'),
NOMATCH=(C'20'),
21,80)
|
|
|
| Back to top |
|
 |
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
It is adequately described in the manual, but here we go:
| Code: |
INREC FIELDS=(01,18,
21,01,CHANGE=(02,C'7',C'19',
C'8',C'19',
C'9',C'19'),
NOMATCH=(C'20'),
21,80) |
Firstly, better as BUILD. BUILD is not overloaded, and always means the same thing wherever you see it. This is not so for FIELDS.
| Code: |
INREC BUILD=(01,18,
21,01,CHANGE=(02,C'7',C'19',
C'8',C'19',
C'9',C'19'),
NOMATCH=(C'20'),
21,80) |
It will make a new version of the current record, sourced from the current record. It will copy the first 18 bytes, then use the 21st byte to make a two-digit value (the first item in the bracket is the length), '7', '8' and '9' will become '19', and all other values will become '20' (the NOMATCH). Then bytes 21 for a length of 80 are copied, completing the new version of the record. Bytes 19 and 20 from the source are ignored, and byte 21, the source for the source of the CHANGE, is repeated as-is. |
|
| Back to top |
|
 |
Lino Pontes
New User
Joined: 04 Apr 2016 Posts: 2 Location: US
|
|
|
|
| Thank you for the prompt reply. Much appreciated. |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|