Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Divide a record into different files in JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
sdwajid
Currently Banned

New User


Joined: 19 Jul 2007
Posts: 5
Location: hyderabad

PostPosted: Thu Apr 24, 2008 10:15 am    Post subject: Divide a record into different files in JCL
Reply with quote

Hi,

i want to divide each record of a dataset into different files. Firstly, i'll read a record & then first 10 fileds will be copied into File1, then from filed 11 to filed 20 will be copied or written to File2 and so on, using JCL (Syncsort or any other utility). It can be done using SELCOPY, but i need a different approach.

Thanks
Back to top
View user's profile Send private message

CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Thu Apr 24, 2008 10:27 am    Post subject:
Reply with quote

Have you looked at the OUTFIL statement and its parameters?
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2276
Location: @my desk

PostPosted: Thu Apr 24, 2008 10:31 am    Post subject:
Reply with quote

Hi,

Try this example , change the positions as per your requirement.

Code:
//SYSIN DD *                 
  SORT FIELDS=COPY           
  OUTFIL FILES=1,OUTREC=(1,3)
  OUTFIL FILES=2,OUTREC=(4,3)
  OUTFIL FILES=3,OUTREC=(7,3)
/*                           
//*                         
//SORTIN  DD *               
111222333                   
//*                         
//SORTOF1 DD SYSOUT=*       
//*                         
//SORTOF2 DD SYSOUT=*       
//*                         
//SORTOF3 DD SYSOUT=*       


Output

SORTOF1------ 111
SORTOF2------ 222
SORTOF3------ 333

Thanks,
Arun
Back to top
View user's profile Send private message
sdwajid
Currently Banned

New User


Joined: 19 Jul 2007
Posts: 5
Location: hyderabad

PostPosted: Thu Apr 24, 2008 11:04 am    Post subject:
Reply with quote

thanks

arcvns
Back to top
View user's profile Send private message
sri_mf

Active User


Joined: 31 Aug 2006
Posts: 216
Location: India

PostPosted: Thu Apr 24, 2008 11:08 am    Post subject: Re: Divide a record into different files in JCL
Reply with quote

sdwajid wrote:
Hi,

SELCOPY

Thanks


Hi wajid acn u provide some info on SELCOPY
Back to top
View user's profile Send private message
sdwajid
Currently Banned

New User


Joined: 19 Jul 2007
Posts: 5
Location: hyderabad

PostPosted: Thu Apr 24, 2008 11:34 am    Post subject:
Reply with quote

Hi sri,

SELCOPY is a utility , you can use it to reorganise files and many more things. You can learn about SELCOPY by visiting this site http://www.cbl.com/selc.html
Back to top
View user's profile Send private message
sri_mf

Active User


Joined: 31 Aug 2006
Posts: 216
Location: India

PostPosted: Thu Apr 24, 2008 4:30 pm    Post subject: Reply to: Divide a record into different files in JCL
Reply with quote

Thanks wajid icon_smile.gif)
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Dynamic split of files under groups sril.krishy DFSORT/ICETOOL 4 Mon Apr 17, 2017 1:09 pm
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us