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

split and copy a Variable block PS file into 10 equal number


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rakesh17684

New User


Joined: 08 Oct 2006
Posts: 61
Location: San Diego

PostPosted: Wed Oct 08, 2008 11:36 am
Reply with quote

i have a Variable block PS file of 4000000 records. i want that to be split into 10 files containing equal number of records.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Wed Oct 08, 2008 12:13 pm
Reply with quote

Hi,

search for

SPLIT
SPLITBY
SPLIT1R

Gerry
Back to top
View user's profile Send private message
rakesh17684

New User


Joined: 08 Oct 2006
Posts: 61
Location: San Diego

PostPosted: Wed Oct 08, 2008 3:15 pm
Reply with quote

tried SPLIT1R

as mentioned in the posthttp://ibmmainframes.com/post-83530.html

but end up with error
Code:
CTL1CNTL :                                                                     
  OUTFIL FNAMES=T1,REMOVECC,NODETAIL,TRAILER1=(COUNT=(M11,LENGTH=8))    0027000
PARMLIST :                                                                     
OPTION RESINV=0,ARESINV=0,MSGDDN=DFSMSG,SORTIN=IN,SORTDD=CTL1,COPY             
WER428I  CALLER-PROVIDED IDENTIFIER IS "0001"                                 
WER276B  SYSDIAG= 153007, 1720985, 1720985, 3538191                           
WER164B  8,876K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,             
WER164B     0 BYTES RESERVE REQUESTED, 1,109,145 BYTES USED                   
WER146B  20K BYTES OF EMERGENCY SPACE ALLOCATED                               
WER108I  IN       : RECFM=VB   ; LRECL=    80; BLKSIZE= 27998                 
WER110I  T1       : RECFM=VB   ; LRECL=    80; BLKSIZE= 27998                 
WER410B  7,848K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,       
WER410B     0 BYTES RESERVE REQUESTED, 103,097 BYTES USED                     
WER405I  T1       :  DATA RECORDS OUT          0; TOTAL RECORDS OUT          1
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000                                 
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE                                 
WER416B  IN       : EXCP'S=1201,UNIT=3390,DEV=20F3,CHP=(121466FC9DA7CBD1,2),VOL
WER416B  OUTFIL WAS USED FOR CTL1OUT                                           
WER054I  RCD IN    4268894, OUT    4268894                                     
WER169I  RELEASE 1.3 BATCH 0488 TPF LEVEL 0.2                                 
WER052I  END SYNCSORT - useridS1,,DIAG=A000,720C,882A,0044,E8D6,4C83,0A28,CE
CTL2CNTL :                                                                     
  OUTREC BUILD=(2X,C'SPLIT1R=',1,8,PD,DIV,+10,TO=PD,LENGTH=8,80:X)      0031000
PARMLIST :                                                                     
OPTION RESINV=0,ARESINV=0,MSGDDN=DFSMSG,SORTIN=T1,SORTOUT=C1,SORTDD=CTL2,COPY 
WER428I  CALLER-PROVIDED IDENTIFIER IS "0002"                                 
WER276B  SYSDIAG= 146822, 1714800, 1714800, 3538191                           
WER164B  8,876K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,             
WER164B     0 BYTES RESERVE REQUESTED, 1,004K BYTES USED                       
WER146B  20K BYTES OF EMERGENCY SPACE ALLOCATED                               
WER108I  T1       : RECFM=VB   ; LRECL=    80; BLKSIZE= 27998                 
WER235A  OUTREC   RDW NOT INCLUDED                                             
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000                                 
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE       



the input file is of format
Organization . . . : PS
Record format . . . : VB
Record length . . . : 80
Block size . . . . : 27998
1st extent blocks . : 8404
Secondary blocks . : 964
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Oct 08, 2008 3:21 pm
Reply with quote

Sort product is SYNCSORT - topic moved to JCL forum.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Wed Oct 08, 2008 4:05 pm
Reply with quote

Hi,

try searching for both STARTREC and ENDREC in JCL forums.



Gerry
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: Wed Oct 08, 2008 7:56 pm
Reply with quote

rakesh17684 wrote:
WER235A OUTREC RDW NOT INCLUDED
SyncSort 16.34 for z/OS 1.2 Programmer’s Guide wrote:
WER235A [ddname] {INREC,OUTREC,REFORMAT} RDW NOT INCLUDED
EXPLANATION: The ddname will be SORTOUT, SORTOFxx, SORTOFx or the ddname provided by an OUTFIL FNAMES parameter. Four bytes must be provided for the RDW of the variable-length output record in the FIELDS parameter of the INREC, OUTREC, OUTFIL OUTREC, or REFORMAT specification. These bytes must appear at the beginning of the record and must not be edited. For REFORMAT, the RDW must be specified as coming from a variable-length join input data set.
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: Wed Oct 08, 2008 8:04 pm
Reply with quote

rakesh17684 wrote:
tried SPLIT1R
Code:
CTL1CNTL :                                                                     
  OUTFIL FNAMES=T1,REMOVECC,NODETAIL,TRAILER1=(COUNT=(M11,LENGTH=8))    0027000.
.
.
CTL2CNTL :                                                                     
  OUTREC BUILD=(2X,C'SPLIT1R=',1,8,PD,DIV,+10,TO=PD,LENGTH=8,80:X)      0031000

So where is the SPLIT1R (other than in quotes)?
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 496
Location: USA

PostPosted: Wed Oct 08, 2008 8:44 pm
Reply with quote

rakesh17684 wrote:
i have a Variable block PS file of 4000000 records. i want that to be split into 10 files containing equal number of records.

You can try this:
Code:
//STEP1  EXEC PGM=SORT
//SORTIN   DD DSN=input.file
//SORTOF01 DD DSN=output.file1
//SORTOF02 DD DSN=output.file2
//SORTOF03 DD DSN=output.file3
//SORTOF04 DD DSN=output.file4
//SORTOF05 DD DSN=output.file5
//SORTOF06 DD DSN=output.file6
//SORTOF07 DD DSN=output.file7
//SORTOF08 DD DSN=output.file8
//SORTOF09 DD DSN=output.file9
//SORTOF10 DD DSN=output.file10
//SYSOUT   DD SYSOUT=*
//SYSIN    DD *
    SORT FIELDS=COPY
    OUTFIL FILES=(01,02,03,04,05,06,07,08,09,10),SPLIT
/*
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 FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top