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 How to get the remainder and quotient... vnktrrd DFSORT/ICETOOL 2 Mon Oct 31, 2016 10:59 am
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts ICETOOL/SYNCSORT - SYSPRINT output nartcr DFSORT/ICETOOL 17 Wed Oct 05, 2016 10:46 pm
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm
No new posts Icetool or Joinkeys example to compar... ishant chauhan DFSORT/ICETOOL 21 Sat Aug 20, 2016 2:40 am


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