Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts Comparing 2 Files using Current time arunsoods SYNCSORT 9 Fri Sep 22, 2017 6:00 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us