View previous topic :: View next topic
Author
Message
veena_nagesh2002 Warnings : 1 Active User Joined: 07 May 2005Posts: 110 Location: hyderabad
how to split a single file into different files based on the input records
ex : if my file has 1,100,000 records. note it may increased or decreased by day to day activities.
Back to top
vasanthkumarhb Active User Joined: 06 Sep 2007Posts: 275 Location: Bang,iflex
Hi,
You can USE sort card
Code:
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FILES=01 NAME INCLUDE(THE MATCHING CRITERIA)
AN CONTINUE.THE SAME FOR DIFFERENT MATCHING CRITERIA..
/*
Back to top
veena_nagesh2002 Warnings : 1 Active User Joined: 07 May 2005Posts: 110 Location: hyderabad
can you give me complete sort jcl on this
Back to top
expat Global Moderator Joined: 14 Mar 2007Posts: 8797 Location: Welsh Wales
For what reason do you want to split the file,
a) Select certain records
b) Create several smaller files
c) Another reason
Back to top
veena_nagesh2002 Warnings : 1 Active User Joined: 07 May 2005Posts: 110 Location: hyderabad
we will create a production file which may contain lakhs of records. generally we use transfer these files to open system. since that system is not capable of receving the huge data at a time and its creating lot many problems. hence we need to split the file into limit wise and then palnning to transfer it. let me know if you need more details
kindly help us
Back to top
expat Global Moderator Joined: 14 Mar 2007Posts: 8797 Location: Welsh Wales
Back to top
dick scherrer Moderator Emeritus Joined: 23 Nov 2006Posts: 19244 Location: Inside the Matrix
Hello,
Quote:
that system is not capable of receving the huge data at a time
You might consider compressing the file on the mainframe before downloading and then de-compress the data on the target system. Remember that to download a compressed filek, the transfer must be done in binary, not ascii.
Back to top
veena_nagesh2002 Warnings : 1 Active User Joined: 07 May 2005Posts: 110 Location: hyderabad
the following code is throwing error message like below, kindly let me know did i made any mistake.
Code:
//STEP010 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//*
//IN DD DSN=S22.FIX.SE.PC000129.CMERROR,DISP=SHR
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//C1 DD DSN=&&C1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//*
//CTL3CNTL DD *
OUTFIL FNAMES=(OUT01,OUT02,OUT03),
// DD DSN=*.C1,VOL=REF=*.C1,DISP=(OLD,PASS)
//OUT01 DD DSN=S22.FIX.SE.PC000129.CMERROR1
//OUT02 DD DSN=S22.FIX.SE.PC000129.CMERROR2
//OUT03 DD DSN=S22.FIX.SE.PC000129.CMERROR3
//*
//TOOLIN DD *
COPY FROM(IN) USING(CTL1)
COPY FROM(T1) TO(C1) USING(CTL2)
COPY FROM(IN) USING(CTL3)
/*
//CTL1CNTL DD *
OUTFIL FNAMES=T1,REMOVECC,NODETAIL,TRAILER1=(COUNT=(M11,LENGTH=8))
/*
//CTL2CNTL DD *
OUTREC BUILD=(2X,C'SPLIT1R=',1,8,ZD,DIV,03,TO=ZD,LENGTH=8,8 :X)
/*
error message is :
COPY FROM(T1) TO(C1) USING(CTL2)
SYT020I SYNCSORT CALLED WITH IDENTIFIER "0002"
SYT012E SYNCSORT COMPLETED UNSUCCESSFULLY
SYT030I OPERATION COMPLETED WITH RETURN CODE 16
Back to top
CICS Guy Senior Member Joined: 18 Jul 2007Posts: 2146 Location: At my coffee table
Sorry, but I don't understand the purpose of CTL2CNTL:
OUTREC BUILD=(2X,C'SPLIT1R=',1,8,ZD,DIV,03,TO=ZD,LENGTH=8,8 :X)
And should there be an extra blank near the end?
Are there any other errors listed in the sysout?
Back to top
veena_nagesh2002 Warnings : 1 Active User Joined: 07 May 2005Posts: 110 Location: hyderabad
Code:
//PU7052AX JOB (@),XCOM,MSGCLASS=R,NOTIFY=PU7052A,CLASS=0
//*
//STEP010 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//*
//IN DD DSN=S22.FIX.SE.PC000129.CMERROR,DISP=SHR
//*
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//C1 DD DSN=&&C1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//*
//CTL3CNTL DD *
OUTFIL FNAMES=(OUT01,OUT02,OUT03),
// DD DSN=*.C1,VOL=REF=*.C1,DISP=(OLD,PASS)
//OUT01 DD DSN=S22.FIX.SE.PC000129.CMERROR.FRONT,DISP=OLD
//OUT02 DD DSN=S22.FIX.SE.PC000129.CMERROR.MID,DISP=OLD
//OUT03 DD DSN=S22.FIX.SE.PC000129.CMERROR.LAST,DISP=OLD
//*
//TOOLIN DD *
COPY FROM(IN) USING(CTL1)
COPY FROM(T1) TO(C1) USING(CTL2)
COPY FROM(IN) USING(CTL3)
/*
//CTL1CNTL DD *
OUTFIL FNAMES=T1,REMOVECC,NODETAIL,TRAILER1=(COUNT=(M11,LENGTH=8))
/*
//CTL2CNTL DD *
OUTREC BUILD=(2X,C'SPLIT1R=',1,8,ZD,DIV,+03,TO=ZD,LENGTH=8,80:X)
/*
Now the problem is at CTL3
ERROR MESSAGE :
Code:
CTL3CNTL :
OUTFIL FNAMES=(OUT01,OUT02,OUT03) 00080006
SPLIT1R=0000002I
*
WER428I CALLER-PROVIDED IDENTIFIER IS "0003"
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
Back to top
CICS Guy Senior Member Joined: 18 Jul 2007Posts: 2146 Location: At my coffee table
veena_nagesh2002 wrote:
ERROR MESSAGE :
Code:
CTL3CNTL :
OUTFIL FNAMES=(OUT01,OUT02,OUT03) 00080006
SPLIT1R=0000002I
*
WER428I CALLER-PROVIDED IDENTIFIER IS "0003"
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
First, no comma at the end of the first line?
Second, I don't think Syncsort has the SPLIT1R, but only the SPLIT and SPLITBY, either (done correctly) might provide just what you need.....
One more thing, maybe you should provide a mask to the split count to convert the 0000002I to 00000029......
Back to top
veena_nagesh2002 Warnings : 1 Active User Joined: 07 May 2005Posts: 110 Location: hyderabad
please find my answeres below
i have kept comma in the jcl but it was typo error on while pasting the above post.
Second, will try with split and spliby option but should i mention any extra in it.
I couldn't understand the third point in the post, hence please give me the details how to do that
last : took this jcl from the above referenced link and then how come it can be incorrect in the split options.
waiting for valuable reply.
Back to top
sril.krishy Active User Joined: 30 Jul 2005Posts: 183 Location: hyderabad
veena_nagesh2002,
The SPLIT1R is not supported by SYNCSORT.There is a SPLIT or SPLITBY option with SYNCSORT which will place them in an order.
Please chage the card like below and test.I tried it for 10 records and they are placed in the correspoding files like below.
Code:
//STEP010 EXEC PGM=SYNCTOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//*
//IN DD *
1234561
1234562
1234563
1234564
1234565
1234566
1234567
1234568
1234569
1234560--------->*
//T1 DD DSN=&&T1,UNIT=SYSDK,SPACE=(TRK,(1,1)),DISP=(,PASS)
//C1 DD DSN=&&C1,UNIT=SYSDK,SPACE=(TRK,(1,1)),DISP=(,PASS)
//*
//CTL3CNTL DD *
OUTFIL FNAMES=(OUT01,OUT02,OUT03),
// DD DSN=*.C1,VOL=REF=*.C1,DISP=(OLD,PASS)
//OUT01 DD SYSOUT=*
//OUT02 DD SYSOUT=*
//OUT03 DD SYSOUT=*
//*
//TOOLIN DD *
COPY FROM(IN) USING(CTL1)
COPY FROM(T1) TO(C1) USING(CTL2)
COPY FROM(IN) USING(CTL3)
/*
//CTL1CNTL DD *
OUTFIL FNAMES=T1,REMOVECC,NODETAIL,TRAILER1=(COUNT=(M11,LENGTH=8))
/*
//CTL2CNTL DD *
OUTREC BUILD=(2X,C'SPLITBY=',1,8,ZD,DIV,+03,EDIT=(TTTTTTTT),80:X)
OUT01 :
Code:
1234561
1234562
1234563
1234560---------->*
OUT02:
Code:
1234564
1234565
1234566
OUT03:
Code:
1234567
1234568
1234569
So the order might get changed if your input is having records if the division by 3 is not zero.
Thanks
Krishy
Back to top
Alissa Margulies SYNCSORT Support Joined: 25 Jul 2007Posts: 496 Location: USA
sril.krishy wrote:
The SPLIT1R is not supported by SYNCSORT.
SPLIT1R IS supported in SyncSort for z/OS 1.3.
Apparently veena_nagesh2002 is using an earlier release of the product.
Back to top
William Thompson Global Moderator Joined: 18 Nov 2006Posts: 3156 Location: Tucson AZ
Alissa Margulies wrote:
SPLIT1R IS supported in SyncSort for z/OS 1.3.
Oh neat, I'm avidly awaiting the 1.3 manual to replace my 1.2.....grin.....
Back to top
Alissa Margulies SYNCSORT Support Joined: 25 Jul 2007Posts: 496 Location: USA
William Thompson wrote:
I'm avidly awaiting the 1.3 manual to replace my 1.2.....grin.....
(Check your PMs)
Back to top
Please enable JavaScript!