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

Divide a record into different files in JCL


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 2146
Location: At my coffee table

PostPosted: Thu Apr 24, 2008 10:27 am
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: 2481
Location: @my desk

PostPosted: Thu Apr 24, 2008 10:31 am
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
Reply with quote

thanks

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

Active User


Joined: 31 Aug 2006
Posts: 218
Location: India

PostPosted: Thu Apr 24, 2008 11:08 am
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
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 www.cbl.com/selc.html
Back to top
View user's profile Send private message
sri_mf

Active User


Joined: 31 Aug 2006
Posts: 218
Location: India

PostPosted: Thu Apr 24, 2008 4:30 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Write line by line from two files DFSORT/ICETOOL 7
Search our Forums:

Back to Top