Posted: Tue Oct 11, 2005 7:00 am Post subject: SYNC SORT : Count of records at the end of the file
Hi,
I am facing problem while writing the COUNT of records into o/p file.
There were 2 input files with 714 records length each(FB).I am matching the details and writing them into 2 files on some conditions.
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
Posted: Tue Oct 11, 2005 7:16 am Post subject:
bprasanna,
Code:
WER247A SORTOF01 HAS INCOMPATIBLE LRECL
WER247A SORTOF02 HAS INCOMPATIBLE LRECL
This should have given you a clue. Remember that whenever you use reporting features(trailer, header..) then LRECL of the o/p file is increased by 1 as the output will be generated with a carriage control character. You can supress the carriage control character using REMOVECC parameter.
Btw you DON'T have to code DCB parameters for sort. Sort automatically calculates the DCB parameters.
Hi,
One more question on the same topic.Once I generate the report I am sorting the o/p files on (14,5,CH,D) in another step to have the records on decending order.
Is there any chance that we can club this condition as well in the first step?
SORT FIELDS=(1,1,BI,A,2,10,CH,A),EQUALS
SUM FIELDS=NONE
Here I am elimanating the duplicates from file.Once I finish this one,I need to sort the file on 472,5 (of F2,Which will be in the 14 th position of the REFORMAT).
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
Posted: Tue Oct 11, 2005 9:16 am Post subject:
Bprasanna,
Using JOIN feature, you can have 3 levels of SORTING.
1. Sort input file 1 on key field
2. Sort input file 2 on key field.
3. After matching (joining) records, sort the merged file on some order (Using SORT FIELDS).
Since you have already used all these options, you can have your 4th sort (14,5,CH,D) only in a new Step/Pass. You cannot club them together. If you want to avoid a JCL step, you can include it as a Pass (Use SYNCTOOL and have 2 passes 1 for join and the other for Re-arranging the output).
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
Posted: Wed Oct 12, 2005 9:55 am Post subject:
Quote:
Can any body tell me ,is the above is possible?I am able to see this one is possible only with the SPLICE operator of DFSORT.
bprasanna,
Here is a sample synctool step which uses join as well as use another sort operation in a single step. The first SORT operator performs the JOIN operation and the 2nd sort operator sorts the sortof01 to out1 using ctl2cntl control card. The 3rd sort operaotor sorts the sortof02 to out2 using the same ctl2cntl. I also added the removecc parameter on the output files to supress the carriage control character.
Kolusu and Phantom,
I really wonder how you guys will get the solutions so easily and quickly.I read the the PDF that the SYNCSORT guys provided with the new release.There was no mention of the same stuff there.
Thank you _________________ ----------------
Thanks&Regards
Bprasanna
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
Posted: Thu Oct 13, 2005 12:17 am Post subject:
Thanks for the quick response Kolusu,
As you know, Yesterday was a holiday in India (Dasera - Durga Pooja) and I didn't have access to my mainframe server.
Btw, you have used CTL1JNF1 and CTL1JNF2 as DD names for the input files. How did you find that ???? I believe Synctool takes the first 4 chars from the DD used the Toolin card
Quote:
SORT FROM(CTL1JNF1)
Please correct me if I am wrong. We have Syncsort v 1.1 here and hence I can't test the code with different DDs.
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
Posted: Thu Oct 13, 2005 5:02 am Post subject:
Quote:
Btw, you have used CTL1JNF1 and CTL1JNF2 as DD names for the input files. How did you find that ????
The default lookup ddname for Synctool must start with CTLxxxxx if you used CTL in your Toolin card. And the join operator looks for JNFx suffix.
Quote:
I tested the code and is working fine with a little modification.We just need to modify the SORT0F01 and SORTOF02 to CTL1OF01 and CTL1OF02.
bprasanna,
I always use FNAMES parm on the OUTFIL which allows me to give more meaningful names to the output files. I overlooked your FILES statement in your control cards. sorry
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