MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

jcl,sorting numeric field?

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
vjkumk
Beginner


Joined: 28 Sep 2005
Posts: 98
Topics: 33

PostPosted: Wed Sep 28, 2005 10:14 am    Post subject: jcl,sorting numeric field? Reply with quote

hi,
1)i am having a ps with empid,sal,dob,doj,mobilenumber,and i have to sort the file based on the sal field,using sort (iceman).,
in sort fields=(startloc,len,?,a),what type i have to mention for sorting numeric field?,whether to use zd,pd,bi,fi.,and if we enter directly values into ps , in which format it is stored.and how to avoid overflow?
2)is there any intersting document which gives good explanation about this?
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Wed Sep 28, 2005 10:23 am    Post subject: Reply with quote

Which numeric format you need to use depends on the numeric format the value is stored as. You can't just pick a random format - you have to know what the format is. If you don't know what format it is, we can probably tell you by looking at the data in hex. Use a DFSORT job like this to print out some of the values in hex:

Code:

//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...  input file
//SORTOUT DD SYSOUT=*
//SYSIN DD *
  OPTION COPY,STOPAFT=10
  INREC FIELDS=(p,m,HEX)
/*


p is the starting position of the sal field. m is its length.

Post the //SORTOUT output.

For a description of all of the DFSORT formats, see:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA10/C.1?SHELF=&DT=20050222160456&CASE=
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Thu Sep 29, 2005 12:56 am    Post subject: Reply with quote

vjkumk,

Quote:

and how to avoid overflow?


What kind of overflow are you talking about. There will no overflow unless you try to find out the total of any numeric field by using SUM FIELDS=(start,length,format).

Thanks,
Phantom
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group