Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts JOINKEYS Paired and Unpaired Sort MFwhiz DFSORT/ICETOOL 4 Fri Sep 29, 2017 1:48 am
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
No new posts OC4 in SORT Mohan Kothakota DFSORT/ICETOOL 2 Tue Sep 12, 2017 6:30 pm
No new posts SORT Trailer Count - LRECL Output co... amorante DFSORT/ICETOOL 5 Tue Aug 29, 2017 8:57 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us