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 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 JCL sort Match and NoMatch rakeshsekar1987 SYNCSORT 2 Thu Feb 02, 2017 10:26 pm


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