I have to use SEQNUM function to create a sequence in my output file. In the start command (START=1 ), i can use 1 (or any other value) to start the sequence. However, i have a requirement that i need this value from another file that is input to my this sort step. I am not sure how to achieve this. I have done this using ICETOOL, however i need to do this by SyncSORT only as ICETOOL is not allowed to be used.
My sort card:
SORT FIELDS=COPY
OUTREC FIELDS=(SEQNUM,8,BI,START=1,9,08)
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
krishan,
If you want to format things for us to read, that is good, but use the Code button to preserve the formatting so we can actually see it.. please?
You have a confusion. SYNCSORT is develped by one company. ICETOOL by another. Many sites seem to "ALIAS" SYNCTOOL to ICETOOL, for whatever reason. It is SYNCTOOL that you are not allowed to use (for reasons unknown), not ICETOOL, which your site almost certainly does not have.
If you have achieved this in SYNCTOOL, please show us the card.
If you have attempted the same solution in SYNCSORT, please show us the card and the output messages/results which show it not working.
This is the sort card i am using ( for my testing right now ). From position 9 length 8 , i want to copy from my i/p file using 9,08)
From position 1 , i want a sequence no to be generated. The above sort card produces a result.
Code:
BI 1:8 BI 9:8
<---+----1----+----> <---+----1----+---->
**** Top of data ****
1 5
2 6
3 7
4 8
5 9
6 10
**** End of data **** .
Now, i have harcoded the START=1 i.e it starts the sequence from 1. My requirement is that i need to start from a value which would come from another file. This i have to do using the syncsort
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
If it is SYNCSORT why did you post in DFSORT? Are you sure it was ICETOOL that you used and not SYNCTOOL - show your messages from that test - if they start WER then it is SYNCTOOL.
However, i have a requirement that i need this value from another file that is input to my this sort step.
May be I am not understanding the requirement but if you are trying to generate count based on "another file", what does that file look like? What is the LRECL and RECFM of the input file? I believe your input file will have just one record with the count. Please show content of the input file.
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
krishan isharwal,
You have already achieved what you want using a SYNCTOOL step. If you are not allowed (or some stupid at your shop is not willing) to implement SYNCTOOL in production, you can very well split your SYNCTOOL step into two Syncsort steps and achieve the same results.
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
krishan isharwal,
It would have shortened the process if you had included your SyncTOOL solution from the start, which is a working solution.
As Arun Raj has pointed out, you can do your SyncTOOL solution as a two-step SyncSORT solution.
I prefer the previously-mentioned SYMNAMES solution, as your sort cards are always visibly complete, and you have an element of "self-documentation" from the value being set to a name.
You have already achieved what you want using a SYNCTOOL step. If you are not allowed (or some stupid at your shop is not willing) to implement SYNCTOOL in production, you can very well split your SYNCTOOL step into two Syncsort steps and achieve the same results.
Could you please suggest hor to spilit this into two steps
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
Bill Woodger wrote:
I prefer the previously-mentioned SYMNAMES solution, as your sort cards are always visibly complete, and you have an element of "self-documentation" from the value being set to a name.
Up to you now.
Hi Bill,
I ran a test and I see that the numeric subparameter value 'n' in the START=n can't be substituted by a numeric symbol.