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

What this following INREC statements do


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

New User


Joined: 04 Jan 2007
Posts: 1
Location: chennai

PostPosted: Thu Jan 04, 2007 10:22 pm
Reply with quote

i want to know wht this following inrec statements do

1) inrec fields=(1,10,3Z,11,5,PD,TO=PD,16,65)

2) inrec fields=(1,10,11,5,PD,MUL,+1,TO=PD,16,65)

Input:

01 input.
05 a pic 9(10)
05 b pic s9(09) comp-3
05 filler pic x(65)

I want to know the copybook to match the output of the above two cases.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Jan 04, 2007 10:44 pm
Reply with quote

Code:

   INREC FIELDS=(1,10,3Z,11,5,PD,TO=PD,16,65)


This DFSORT statement reformats the INREC records to create output records as follows:

output positions 1-10: input positions 1-10
output positions 11-13: binary zeros
output positions 14-18: the PD value in input positions 11-15 converted to a 5-byte PD value with a C sign for a positive number or a D sign for a negative number
output positions 19-83: input positions 16-80

Code:

   INREC FIELDS=(1,10,11,5,PD,MUL,+1,TO=PD,16,65)


This DFSORT statement reformats the INREC records to create output records as follows:

output positions 1-10: input positions 1-10
output positions 11-15: the PD value in input positions 11-15 multiplied by +1 and converted to a 5-byte PD value with a C sign for a positive number or a D sign for a negative number
output positions 16-80: input positions 16-80
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 Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Relate COBOL statements to EGL statement All Other Mainframe Topics 0
No new posts INREC PARSE used to sort a CSV file DFSORT/ICETOOL 2
No new posts Embeding DB2 sql statements in scirpt... DB2 7
No new posts filter COMMIT/ROLLBACK statements DFSORT/ICETOOL 13
Search our Forums:

Back to Top