IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

What does this INREC do?


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Lino Pontes

New User


Joined: 04 Apr 2016
Posts: 2
Location: US

PostPosted: Fri Apr 08, 2016 12:17 am
Reply with quote

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
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3048
Location: NYC,USA

PostPosted: Fri Apr 08, 2016 1:32 am
Reply with quote

funny, anyways look here and should be posted under dfsort
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Fri Apr 08, 2016 2:54 am
Reply with quote

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
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Fri Apr 08, 2016 7:05 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Apr 08, 2016 7:15 pm
Reply with quote

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
View user's profile Send private message
Lino Pontes

New User


Joined: 04 Apr 2016
Posts: 2
Location: US

PostPosted: Fri Apr 08, 2016 8:49 pm
Reply with quote

Thank you for the prompt reply. Much appreciated.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts INREC PARSE used to sort a CSV file DFSORT/ICETOOL 2
No new posts INREC IFTHEN question SYNCSORT 2
No new posts Total using INREC DFSORT/ICETOOL 1
No new posts Optimize sort inrec parse DFSORT/ICETOOL 6
No new posts INREC PARSING and dictionary items SYNCSORT 6
Search our Forums:

Back to Top