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
 

 

Is it possible to Sort Comp-3 type data using sort Card in J

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

New User


Joined: 20 Nov 2006
Posts: 48
Location: Hyderabad

PostPosted: Thu Feb 14, 2008 11:34 am    Post subject: Is it possible to Sort Comp-3 type data using sort Card in J
Reply with quote

Is it possible to Sort Comp-3 type data using sort Card in JCL

Example:-

01 WS-DATA 9(15) comp-3.

Input
000000000000042
000000000000023
000000000000051

Output should be

000000000000051
000000000000042
000000000000023
I want to Sort on the basis of last position that is 15th position
Back to top
View user's profile Send private message

niks_jude
Warnings : 1

Active User


Joined: 01 Dec 2006
Posts: 144
Location: Mumbai

PostPosted: Thu Feb 14, 2008 1:04 pm    Post subject:
Reply with quote

Your input does not look packed. The packed input can be sorted using
sort fields =(position, 08, pd, ascending/descending) into packed output. Then you would have to used edits of OUTREC to get the required output in numeric display format.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Feb 14, 2008 9:02 pm    Post subject:
Reply with quote

Hello,

If your example data is the "visable" value of some packed-decimal field, you have not shown the sign. How should negatives be handled in your requirement?

Comp-3 fields can be properly sorted, but your requirement goes beyond just sorting a packed-decimal field.
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: Thu Feb 14, 2008 9:26 pm    Post subject:
Reply with quote

Quote:
Is it possible to Sort Comp-3 type data using sort Card in JCL


The short answer is "yes, using PD format". For more information on COBOL data types vs DFSORT formats, see:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA20/C.3?DT=20060615185603
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 Unable to copy data from spool in a d... srikant314 JCL & VSAM 8 Fri Jul 28, 2017 9:10 pm
No new posts Paasing symbolic parameter to instrea... Robert Sample JCL & VSAM 2 Thu Jul 27, 2017 1:22 pm
No new posts Passing data from REXX to C programme... chong.zhou CLIST & REXX 3 Wed Jul 26, 2017 9:11 pm
No new posts copying data without knowing location Arun Raj DFSORT/ICETOOL 12 Thu Jul 20, 2017 1:03 pm
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm


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