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 signed nums

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
abraralum

New User


Joined: 19 Dec 2010
Posts: 42
Location: Bangalore

PostPosted: Wed Jan 19, 2011 10:47 pm    Post subject: Sort on signed nums
Reply with quote

Hi,

I have input as below:

123456fg-5678
678953hn6789
123456jk6789
234567yh-8906


Output should be:
123456fg-5678
678953hi 6789
123456jk 6789
234567jj-8906

A space to be inserted if sign is not given.
Please can any one guide me how to achieve this using sort..
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 Jan 20, 2011 12:46 am    Post subject:
Reply with quote

Assuming the output you show is incorrect and you really want positions 1-8 to remain the same, you can use the following DFSORT control statements to do what you want:

Code:

  OPTION COPY                                       
  INREC OVERLAY=(9:9,5,SFF,EDIT=(STTTT),SIGNS=(,-)) 


The output would be:

Code:

123456fg-5678 
678953hn 6789 
123456jk 6789 
234567yh-8906 


If that's not what you want, then explain more clearly what you do want with a better example.
Back to top
View user's profile Send private message
abraralum

New User


Joined: 19 Dec 2010
Posts: 42
Location: Bangalore

PostPosted: Thu Jan 20, 2011 10:35 pm    Post subject:
Reply with quote

Thanks Frank... Actually I am doing testing for which I need to format the file like this.

Just afraid when can I write code so easily like you icon_biggrin.gif
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. SORT trick needed bshkris SYNCSORT 6 Tue May 02, 2017 4:35 am
No new posts SORT JSON type of data maxsubrat DFSORT/ICETOOL 8 Wed Apr 19, 2017 6:01 pm
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm


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