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 Changeman get multiple "Browse C... elixir1986 Compuware & Other Tools 4 Fri Jul 14, 2017 1:48 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts getting three output files out of JOI... migusd SYNCSORT 7 Mon Jun 05, 2017 11:30 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm


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