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
 

 

How can i pad ZEROES before a value using DFSORT/ICETOOL?

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

New User


Joined: 25 Oct 2007
Posts: 16
Location: mumbai

PostPosted: Mon Oct 20, 2008 5:22 pm    Post subject: How can i pad ZEROES before a value using DFSORT/ICETOOL?
Reply with quote

Hi,

I have an input file(LRECL=80) that can contain records upto 9 digits

Sample input file:

=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
000001 1000
000002 87657
000003 367815543


I require the output file to be padded with leading zeroes upto maximum 9 digits

Required output file:

=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
000001 000001000
000002 000087657
000003 367815543

Atchuta
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: Mon Oct 20, 2008 9:02 pm    Post subject:
Reply with quote

Atchuta,

As is too often the case, Sambhaji has posted a bad solution.

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

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD *
1000
87657
367815543
/*
//SORTOUT DD SYSOUT=*
//SYSIN    DD    *
  OPTION COPY
  INREC OVERLAY=(1:1,9,UFF,M11,LENGTH=9)
/*
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 Using ICETOOL, how we can seperate th... bshkris SYNCSORT 5 Tue May 09, 2017 8:33 pm
No new posts Group elements using ICETOOL Learncoholic DFSORT/ICETOOL 2 Fri Apr 14, 2017 11:01 am
No new posts Format record to remove Leading zeroes Learncoholic DFSORT/ICETOOL 14 Wed Apr 05, 2017 2:43 pm
No new posts DFSORT - Overriding default option TU... Steve Ironmonger DFSORT/ICETOOL 3 Tue Apr 04, 2017 3:54 pm
No new posts DFSORT MUL FIELDS tspr52 DFSORT/ICETOOL 16 Fri Mar 03, 2017 11:53 pm


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