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 Innovations in Your Mainframe Sort Arun Raj PC Guides & IT News 4 Wed Mar 15, 2017 10:38 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts SORT requirement sjiraga COBOL Programming 6 Thu Mar 09, 2017 9:11 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts SORT to append Month and YEAR in MMYY... tisamf DFSORT/ICETOOL 1 Wed Mar 08, 2017 4:46 pm


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