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
 

 

how to copy records into multiple files depending on cond

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

Active User


Joined: 13 Jul 2007
Posts: 130
Location: Guntur

PostPosted: Mon Sep 10, 2007 6:55 pm    Post subject: how to copy records into multiple files depending on cond
Reply with quote

Hi all,

I have a new requirement like i have a flat file with 9000 records , now what i have to do is , i have to create 90 ps files which should contain 100 records each.

i have one solution like keep on submitting the below job for 90 times and it will create the output files
Code:

STEP1    EXEC PGM=SYNCSORT                     
SYSOUT   DD SYSOUT=*                             
SORTIN   DD DSN=TEST.DM.PGMLIST.NONDUP,DISP=SHR   
SORTOUT  DD  DSN=TEST.DM.SSN.PGMLIST.OUT200,     
             DISP=(NEW,CATLG,DELETE),             
             UNIT=(SYSDA,8),SPACE=(CYL,(1,5),RLSE),
             DCB=(*.SORTIN)                       
SYSIN    DD *                                     
         SORT FIELDS=COPY,SKIPREC=100,STOPAFT=100


Can any body give me solution so that i can do it in one shot.
Back to top
View user's profile Send private message

Aaru

Senior Member


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

PostPosted: Mon Sep 10, 2007 7:10 pm    Post subject: Reply to: how to copy records into multiple files depending
Reply with quote

Submitting 90 jobs is not a good option. You can try using the SPLIT1R of SYNCSORT. Please refer to the manual for details. Even here you will have to specify 90 output file names in the JCL.

You can code a REXX exec to dynamically create the JCL with all the 90 output file details and can split in one shot. Else, manually create the JCL and submit.
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: Mon Sep 10, 2007 7:18 pm    Post subject:
Reply with quote

I do not see any limitation specified to in the FILES=xx parameter of the OUTREC......
Possibly adding a seq num in input and a large IFTHEN WHEN....Something like:
IFTHEN WHEN seq < 101 BUILD FILES=01
IFTHEN WHEN seq < 201 BUILD FILES=02
IFTHEN WHEN seq < 301 BUILD FILES=03
IFTHEN WHEN seq < 401 BUILD FILES=04
.
.
.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


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

PostPosted: Mon Sep 10, 2007 9:20 pm    Post subject:
Reply with quote

Quote:
You can try using the SPLIT1R of SYNCSORT.


SPLIT1R=n is a DFSORT parameter. It is NOT supported by Syncsort.
Back to top
View user's profile Send private message
balakrishna reddy

Active User


Joined: 13 Jul 2007
Posts: 130
Location: Guntur

PostPosted: Tue Sep 11, 2007 11:08 am    Post subject:
Reply with quote

hi,

Can anybody give me the rexx code to do the same.
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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 1 Mon Jan 02, 2017 11:16 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am


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