First I am Extremely sorry for requesting immediate reply...please understand that I was in very bad need of the same.. ( really I did not mean to hurt your shedule)
I was very much relaxed when the solution given by you was working..
I am sorry again to tell you that I did not come back to thank you once the solution is working.. but came back with a request again.
I admit that I am poor in sort, but shall do put my efforts to bring me up myself with the suggestions given by Frank(regarding the material for sort)
Now I am with some problem with the solution as stated by you..
The Logic is not working if the number of records in the input file is less than the output files.
i.e. if the number of outputfiles is 5 and the number of records to split is 4 or less than 5, we will endup with 0, once we divide the records count by number of files... thus we will not be able to build the start and end rec's properly...
If you can suggest any thing, It will be of a great help to me..
Thanks a lot for the clarification (ICETOOL and SYNCTOOL are not the same). I am very much sorry as my post annoyed you, but please understand that I am a beginner in the sort techniques.
Regarding my request, I am very much sorry if my request/posting had reflected as a demand. Thas was the first time I was posting a query, and belive me that I really did not intend to hurt your feeling.
Joined: 26 Nov 2002 Posts: 12398 Topics: 75 Location: San Jose
Posted: Wed Jun 23, 2004 10:35 am Post subject:
Ram22,
The following DFSORT/ICETOOL JCL will take care if the no: of records are less than the no: of split files .i.e when the input file has less than 5 records
I could not understand the concept of SAVE here... can you please tell me about this. At the same time I am confused how it is handling empty and low range files.. Can you please brief me about the process.
One more request.. can u please suggest me some online stuff, where I can read much about syncsort and how to play with it...
Joined: 26 Nov 2002 Posts: 12398 Topics: 75 Location: San Jose
Posted: Fri Jun 25, 2004 10:43 am Post subject:
Ram,
Quote:
I could not understand the concept of SAVE here... can you please tell me about this. At the same time I am confused how it is handling empty and low range files.. Can you please brief me about the process.
SAVE selects the records that are not selected for any other OUTFIL group. In the control cards you see the save parm, it will write out all other records which are not written to C1 file
I am generating 2 control cards(c1 & c2). C1 Control cards are generated if the quotient is zero .i.e your file has less than 5 records.
If your file count <=5 ,there is nothing to split the files. In this case we only write 1 output file. we will generate c1 control cards.
If your file count is >= 5 then you will generate c2 control cards which will have the output split into 5 files.
So at any point of time we will either create a C1 control card file or C2 Control card file
Now we concatenate these 2 files together and split the records.
If you really want to know how the job works run this job each step by step and verify the output after every step.
One more request.. can u please suggest me some online stuff, where I can read much about syncsort and how to play with it...
Syncsort manuals are copy righted and are not available online. Moreover Synctool is an undocumented/unsupported feature of syncsort. So even if you have manual it would not help you.
I hate to say it but you can use DFSORT'S documentation which is available for free on the net, but beware that not all features of DFSORT/ICETOOL will work with syncsort.
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Fri Jun 25, 2004 12:22 pm Post subject:
Quote:
I hate to say it but you can use DFSORT'S documentation which is available for free on the net, but beware that not all features of DFSORT/ICETOOL will work with syncsort.
To put a finer point on it: The DFSORT documentation describes the functions, features, syntax and messages for DFSORT and DFSORT's ICETOOL. It does NOT describe the functions, features, syntax or messages for any other product. If you use the DFSORT documentation as if it does describe any other product, you will be in for some surprises.
Note in particular that the message numbers and message text for the two products are completely different. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Thanks in tons for the explanation...
I could learn much regarding Syncsort with your help.
I have restricted access to internet over here, so I will be able to access the forum only during a few hours.... So I will be able to thank you and express my satisfaction a bit late...
Thanks a lot again, to be frank this is the feeling thats comming from deep of me... I really got so much at the initial stage of communicating with you people through forum.... thanks for the moderator who created this forum...
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Tue Apr 25, 2006 5:21 pm Post subject:
Here's a new solution for this requirement that uses the SPLIT1R function of DFSORT available with z/OS DFSORT PTF UK90007 and DFSORT R14 PTF UK90006. Whereas SPLITBY can rotate back to the first data set, resulting in non-contiguous records, SPLIT1R only does one rotation so the records are always contiguous.
Here's a DFSORT job that uses SPLIT1R dynamically to divide any number of input records among any number of output files:
Code:
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=... input file
//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,...,OUTnn), <--- change for nn
// DD DSN=*.C1,VOL=REF=*.C1,DISP=(OLD,PASS)
//OUT01 DD DSN=... output file01
//OUT02 DD DSN=... output file02
...
//OUTnn DD DSN=... output filenn <--- change for nn
//TOOLIN DD *
* Get the record count.
COPY FROM(IN) USING(CTL1)
* Generate:
* SPLIT1R=x where x = count/nn.
* nn is the number of output files.
COPY FROM(T1) TO(C1) USING(CTL2)
* Use SPLIT1R=x to split records contiguously among
* the nn output files.
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,+nn, <--- set to nn
TO=ZD,LENGTH=8,80:X)
/*
For complete information on SPLIT1R and the other new DFSORT/ICETOOL functions available with the April, 2006 PTFs, see:
All times are GMT - 5 Hours Goto page Previous1, 2
Page 2 of 2
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum