IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Sort on signed nums


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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 Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Jan 20, 2011 12:46 am
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top