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 on comp variable

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
ssprabhu

New User


Joined: 25 Apr 2005
Posts: 67
Location: pune

PostPosted: Wed Jan 06, 2010 3:14 pm    Post subject: Sort on comp variable
Reply with quote

Hi,

One more query...

In PGM output file fields defined in pgm as follows... i need to sort on the output file XXX and on YYY..

XXX PIC S9(9) USAGE COMP.
YYY PIC S9(4) USAGE COMP.

Which sort card is correct ??

SORT FIELDS=(1,9,CH,A,10,13,CH,A)
or
SORT FIELDS=(1,4,CH,A,5,2,CH,A)
Back to top
View user's profile Send private message

guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Wed Jan 06, 2010 3:25 pm    Post subject:
Reply with quote

Hi Sprabhu,

Please use below sort card

Code:
SORT FIELDS=(1,4,BI,A,5,2,BI,A)
Back to top
View user's profile Send private message
ssprabhu

New User


Joined: 25 Apr 2005
Posts: 67
Location: pune

PostPosted: Wed Jan 06, 2010 3:36 pm    Post subject:
Reply with quote

Thanks Gupta...

But r u sure .....BI or CH ...i guess Even Ch also works...
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: Wed Jan 06, 2010 11:27 pm    Post subject:
Reply with quote

If a COMP field is signed, then FI is the correct format.

If a COMP field is unsigned, then BI is the correct format. CH can also be used as long as options that affect CH (like ALTSEQ or LOCALE) are not used. BI is safer.

For example:

If X'FFFF' represents -1, then the COMP field is signed and FI should be used.

If X'FFFF' represents 65535, then the COMP field is unsigned and BI should be used.
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 SORT to append Month and YEAR in MMYY... tisamf DFSORT/ICETOOL 1 Wed Mar 08, 2017 4:46 pm
No new posts Writing on to GSAM variable length rohanthengal JCL & VSAM 6 Fri Mar 03, 2017 7:46 pm


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