Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Making Zero filled at the beginning of the field

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
Author Message
gekalpana

New User


Joined: 11 Apr 2007
Posts: 12
Location: Chennai

PostPosted: Fri Jun 15, 2007 9:34 pm    Post subject: Making Zero filled at the beginning of the field
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
References
PostPosted: Fri Jun 15, 2007 9:34 pm    Post subject: Re: Making Zero filled at the beginning of the field Reply with quote

William Thompson

Global Moderator


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

PostPosted: Fri Jun 15, 2007 10:33 pm    Post subject:
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

Global Moderator


Joined: 23 Nov 2006
Posts: 6033
Location: 221 B Baker St

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

After making sure the pic x field really is numeric. . . .
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1