IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Sort in card for sorting a field of PIC S99999V999.


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
hariibm

New User


Joined: 05 Feb 2007
Posts: 61
Location: Chennai

PostPosted: Fri Apr 04, 2008 9:00 pm
Reply with quote

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
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Fri Apr 04, 2008 9:08 pm
Reply with quote

Eight bytes, Zoned decimal, offset 40 plus 4 for the rdw......
SORT Control Statement & Specifying a SORT or COPY--Examples
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri Apr 04, 2008 9:35 pm
Reply with quote

Hari,

You can use this DFSORT statement:

Code:

   SORT FIELDS=(44,8,ZD,A)
Back to top
View user's profile Send private message
hariibm

New User


Joined: 05 Feb 2007
Posts: 61
Location: Chennai

PostPosted: Fri Apr 04, 2008 9:56 pm
Reply with quote

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
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Fri Apr 04, 2008 10:02 pm
Reply with quote

hariibm wrote:
I am using the same card but not able to get the result..
What result are you getting?
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri Apr 04, 2008 10:08 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top