View previous topic :: View next topic
|
Author |
Message |
rohit jaiswal Warnings : 2 New User
Joined: 09 Mar 2006 Posts: 36 Location: hyderabad,A.P
|
|
|
|
hi
I have to code a jcl with the following conditions. need help
Write the Records from one Input File in to 3 Output Files in the following Fashion.
All the Three Output Files are of Length 100.
While copying the Records of the Input File to the Output file use below conditions.
· First 30 Bytes of the Output Record will be copied directly from first 30 Bytes of Input Record.
· 31-40 Bytes of the Output Record should be spaces.
· 41-70 Bytes of the Output Record will be copied directly from 31-60 Bytes of Input Record.
· 71-80 Bytes of the Output Record should be spaces.
· 81-100 Bytes of the Output Record will be copied directly from 61-80 Bytes of Input Record.
1st 3 Records of the Input File should be written to First Output file, 2nd 3 Records of the Input File should be written to Second Output file, 3rd 3 Records of the Input File should be written to Third Output file and then again 4th 3 Records of the Input File should be written to First Output file again and soon this cycle continues till all the Records of the Input File are copied. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Seems to me that homework could be getting more challenging these days |
|
Back to top |
|
|
sril.krishy
Active User
Joined: 30 Jul 2005 Posts: 183 Location: hyderabad
|
|
|
|
Rohit jaiswal,
We can provide the JCL for you.But the question seems to be an exercise given to you to learn the SORT.Here are the hints to achive it.
1)Use the OUTREC option to get records as per the first 5 conditions.
2)Use the SPLITBY option to get the records placed in diffrent files randomly.
You can serch the forum to get the examples on the above 2 options.
Thanks
Krishy |
|
Back to top |
|
|
rohit jaiswal Warnings : 2 New User
Joined: 09 Mar 2006 Posts: 36 Location: hyderabad,A.P
|
|
|
|
hi krishy
Can you let me know what utility will be useful in doing it and can u let me know the site from where i can get the document and research on the topics mentioned by you. |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Rohit,
Quote: |
Can you let me know what utility will be useful in doing it and can u let me know the site from where i can get the document and research on the topics mentioned by you. |
DFSORT can be used for this reqt. Please check the DFSORT GETTING STARTED.pdf available in the manuals section. It is an excellant tutorial. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Rohit,
You can use the BUILD operand of DFSORT's INREC or OUTREC statement and the SPLITBY operand of DFSORT's OUTFIL statement to do what you asked for.
You can access all of the DFSORT books from:
Use [URL] BBCode for External Links |
|
Back to top |
|
|
|