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
 

 

Padding zeroes at the beginning of a char field

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Padding zeroes at the beginning of a char field
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 Moderator


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

PostPosted: Thu Jan 26, 2006 3:04 am    Post subject:
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:

www.ibm.com/servers/storage/support/software/sort/mvs/pdug/

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    Post subject: Re: Padding zeroes at the beginning of a char field
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts INVALID FIELD OR CONSTANT IN SORTOF ?? Ron Klop DFSORT/ICETOOL 8 Wed Jan 11, 2017 3:44 pm
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 31 Tue Dec 06, 2016 8:04 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am


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