View previous topic :: View next topic
|
Author |
Message |
nazia.lalani Warnings : 1 New User
Joined: 20 Mar 2009 Posts: 25 Location: hyderabad
|
|
|
|
Hi,
Is there any way to store previous record value thru sort/syncort/icetool???
Input file
CH-LoBX(2) A-monthX(2)
01 02
02 03
output file
if CH-LOB not equal to 02 then A-month = X-month
else previous A-month = X-month
OUTPUT fILE
CH-LoBX(2) A-monthX(2) X-monthX(2)
01 02 02
02 03 02
Can anybody help me on this??? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Please state which sort product that you are actually using, DFSORT, SYNCSORT or CA-SORT, as the solution may vary from product to product and it would be rather unfair for someone to provide you an answer that would not work with the software that you have installed. |
|
Back to top |
|
|
nazia.lalani Warnings : 1 New User
Joined: 20 Mar 2009 Posts: 25 Location: hyderabad
|
|
|
|
DFSORT, SYNCSORT or ICETOOL anything would work for me... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
anything would work for me... |
I suspect that "anything" might work, but you most likely do not have all of the sort products installed.
You need to post which sort product(s) are installed and which releases of them so as to not waste multiple people's time. . . |
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
nazia.lalani,
Assuming you have DFSORT the following DFSORT JCL will give you the desired results
Code: |
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
0102
0203
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
INREC IFTHEN=(WHEN=GROUP,BEGIN=(1,2,CH,NE,C'02'),PUSH=(5:3,2))
//* |
The output of this is
|
|
Back to top |
|
|
nazia.lalani Warnings : 1 New User
Joined: 20 Mar 2009 Posts: 25 Location: hyderabad
|
|
|
|
Hi sri
When I tried the solution given by you I m getting syntax error
Will group function not work for Z/OS 1.2.3.1R???? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
expat wrote: |
Please state which sort product that you are actually using, DFSORT, SYNCSORT or CA-SORT, as the solution may vary from product to product and it would be rather unfair for someone to provide you an answer that would not work with the software that you have installed. |
My guess is that you have SYNCSORT installed and have, despite being asked not to, allowed one of the DFSORT guys to give you a solution that will not work using SYNCSORT
This is why I wrote my original response above.
Please post the error messages and codes issued and maybe someone will be able to help you resolve this. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
Will group function not work for Z/OS 1.2.3.1R???? |
Yes, it will not work with that release of Syncsort.
If your system is upgraded to the current release of Syncsort, GROUP should work. . . |
|
Back to top |
|
|
|