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

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


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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 Developer


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

PostPosted: Mon Oct 20, 2008 9:02 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts DFsort help with SUM() DFSORT/ICETOOL 12
No new posts Shift left VB record without x00 endi... DFSORT/ICETOOL 11
Search our Forums:

Back to Top