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
 
Left Justifiaction of Data

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
noorkh

New User


Joined: 06 Mar 2006
Posts: 76
Location: Chennai

PostPosted: Wed Jan 16, 2008 1:13 pm    Post subject: Left Justifiaction of Data
Reply with quote

Hi All,

I have a char of 10 field which contains data in the following manner.

Eg

Log_Siz CHAR (10)
0000000014
0000000999
0000000000
0000999123



Now i need to supress the leading zeros & the data should now be left justified.

Eg

Log_Siz CHAR (10)
14________
999_______
0_________
99123_____


Can I achive this using DFSORT?
Please help....
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: Wed Jan 16, 2008 10:34 pm    Post subject:
Reply with quote

Here's a DFSORT job that will do what you asked for:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD *
0000000014
0000000999
0000000000
0000999123
0000999000
/*
//SORTOUT DD SYSOUT=*
//SYSIN    DD    *
  OPTION COPY
  INREC OVERLAY=(1:1,10,ZD,TO=FS,LENGTH=10,
    1:1,10,JFY=(SHIFT=LEFT))
/*


SORTOUT would have:

Code:

14     
999     
0       
999123 
999000 


(I threw in the last record for a better test.)
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Question related to Data dictionary f... rexx77 SYNCSORT 3 Thu Aug 31, 2017 7:23 am
No new posts Extract Data till prev hour balaji81_k DB2 16 Fri Aug 25, 2017 9:25 pm
No new posts FTP data transfer from PC to Mainfram... AJAYREDDY All Other Mainframe Topics 8 Wed Aug 23, 2017 9:59 pm
No new posts Unable to copy data from spool in a d... srikant314 JCL & VSAM 8 Fri Jul 28, 2017 9:10 pm
No new posts Paasing symbolic parameter to instrea... Robert Sample JCL & VSAM 2 Thu Jul 27, 2017 1:22 pm

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