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 Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm


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