Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Sort in card for sorting a field of PIC S99999V999.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Sort in card for sorting a field of PIC S99999V999.
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: 2150
Location: At my coffee table

PostPosted: Fri Apr 04, 2008 9:08 pm    Post subject:
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 Moderator


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

PostPosted: Fri Apr 04, 2008 9:35 pm    Post subject:
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    Post subject:
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: 2150
Location: At my coffee table

PostPosted: Fri Apr 04, 2008 10:02 pm    Post subject:
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 Moderator


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

PostPosted: Fri Apr 04, 2008 10:08 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts INVALID FIELD OR CONSTANT IN SORTOF ?? Ron Klop DFSORT/ICETOOL 8 Wed Jan 11, 2017 3:44 pm
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 31 Tue Dec 06, 2016 8:04 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us