View previous topic :: View next topic
|
Author |
Message |
hariibm
New User
Joined: 05 Feb 2007 Posts: 61 Location: Chennai
|
|
|
|
Hi Frank,
Please give me a sort in card for sorting a field of PIC S99999V999.
This field starts at 40th position in the file and the file's format is VB.
Thanks,
Hari. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Hari,
You can use this DFSORT statement:
Code: |
SORT FIELDS=(44,8,ZD,A)
|
|
|
Back to top |
|
|
hariibm
New User
Joined: 05 Feb 2007 Posts: 61 Location: Chennai
|
|
|
|
Hi Frank,
I am using the same card but not able to get the result..
This the sort JCL i am using...
Code: |
//SPLIT EXEC PGM=SORT
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=input dataset
//SORTOUT DD DSN=output dataset
//SYSIN DD *
SORT FIELDS=(44,8,ZD,A)
/*
|
|
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
hariibm wrote: |
I am using the same card but not able to get the result..
|
What result are you getting? |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
I am using the same card but not able to get the result.. |
That doesn't tell me anything. Are you getting an error message of some kind? Are you not getting the records in the order you expected? Or what? I can't read your mind.
That SORT statement is correct provided that the field is PIC 99999V999 which is equivalent to an 8-byte ZD field (are you sure it isn't COMP-3 or something else?), and it starts in position 44 of the variable-length record (you said "This field starts at 40th position" - I assumed you weren't counting the RDW in positions 1-4 which would make it position 44 rather than 40 - if you are counting the RDW, then use 40 instead of 44).
If you received an error message, you need to show me the //SYSOUT messages.
If the output is not what you expected, then you need to show me an example of the input you used and the output you got and tell me the real position of the input field you want to sort (counting the RDW in positions 1-4).
BTW, you can remove these two JCL statements which are for PGM=ICETOOL, not PGM=SORT:
Code: |
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
|
|
|
Back to top |
|
|
|