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

Making Zero filled at the beginning of the field


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
gekalpana

New User


Joined: 11 Apr 2007
Posts: 12
Location: Chennai

PostPosted: Fri Jun 15, 2007 9:34 pm
Reply with quote

While moving a Alphanumeric to numeric field , i want to make it zero filled in the beginning , in case the value is less than the pic clause defined.

For eg: Alphanumeric variable = 6788
I want it as Numeric varible =00006788
How to achieve it ?

Thanks !!
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Fri Jun 15, 2007 10:33 pm
Reply with quote

IIRC, an alphanumeric to numeric move is allowed and takes on the properties of a simple numeric move which right justifies and pads with leading zeros.
How to achieve it? Just move it.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Sat Jun 16, 2007 5:47 am
Reply with quote

After making sure the pic x field really is numeric. . . .
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts To Unstring spaces in a field COBOL Programming 3
No new posts Help required to reset decimal points... DFSORT/ICETOOL 10
No new posts Sorting Date Field DFSORT/ICETOOL 4
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Join 2 files according to one key field. JCL & VSAM 3
Search our Forums:


Back to Top