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

Padding zeroes at the beginning of a char field


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
avelayudhan

New User


Joined: 30 Nov 2005
Posts: 26

PostPosted: Thu Jan 26, 2006 2:51 am
Reply with quote

My situation is like this. A file containing the following records


1234
7188188
12222
8393993

I need to convert this to

00000000000000001234
00000000000007188188
00000000000000012222
00000000000008393993

Any help?

Thanks
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 26, 2006 3:04 am
Reply with quote

You can use a DFSORT job like the one below tol do what you asked for. You'll need z/OS DFSORT V1R5 PTF UQ95214 or DFSORT R14 PTF UQ95213 (Dec, 2004) in order to use DFSORT's UFF format. Only DFSORT has this function, so if you don't have DFSORT, you won't be able to use it. If you do have DFSORT, but you don't have the Dec, 2004 PTF, ask your System Programmer to install it (it's free). For complete details on all of the new DFSORT and ICETOOL functions available with the Dec, 2004 PTF, see:

Use [URL] BBCode for External Links

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD *
1234
7188188
12222
8393993
/*
//SORTOUT DD SYSOUT=*
//SYSIN    DD    *
  SORT FIELDS=COPY
  OUTREC FIELDS=(1,7,UFF,TO=ZD,LENGTH=20)
/*
Back to top
View user's profile Send private message
avelayudhan

New User


Joined: 30 Nov 2005
Posts: 26

PostPosted: Thu Jan 26, 2006 7:14 pm
Reply with quote

In our shop, we dont have DFSORT. Is there way to accomplish this using SYNCOSRT?..thanks
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 SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Exclude rows with > than x occurre... DFSORT/ICETOOL 6
No new posts Remove leading zeroes SYNCSORT 4
No new posts Join 2 files according to one key field. JCL & VSAM 3
Search our Forums:

Back to Top