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

Code a jcl with the following conditions


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rohit jaiswal
Warnings : 2

New User


Joined: 09 Mar 2006
Posts: 36
Location: hyderabad,A.P

PostPosted: Thu Apr 10, 2008 11:58 am
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Apr 10, 2008 12:00 pm
Reply with quote

Seems to me that homework could be getting more challenging these days icon_wink.gif
Back to top
View user's profile Send private message
sril.krishy

Active User


Joined: 30 Jul 2005
Posts: 183
Location: hyderabad

PostPosted: Thu Apr 10, 2008 12:31 pm
Reply with quote

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
View user's profile Send private message
rohit jaiswal
Warnings : 2

New User


Joined: 09 Mar 2006
Posts: 36
Location: hyderabad,A.P

PostPosted: Thu Apr 10, 2008 12:57 pm
Reply with quote

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

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Thu Apr 10, 2008 2:23 pm
Reply with quote

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

DFSORT Developer


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

PostPosted: Thu Apr 10, 2008 8:56 pm
Reply with quote

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
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 run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts How to load to DB2 with column level ... DB2 6
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts VSAM return code 23 - for a Random read COBOL Programming 4
Search our Forums:

Back to Top