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

Problem facing the value from X(10) to 9(10)


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
callkris_cit

New User


Joined: 22 Apr 2006
Posts: 44

PostPosted: Sun Dec 02, 2007 10:42 am
Reply with quote

77 STR1 PIC X(10) value '12345678 '
77 STR2 PIC X(10) value '1234 '



I need this value in numberic field like this

STR1 as 0012345678
STR2 as 0000001234

Please let me know how to convert using COBOL Program.

Thanks
Suresh
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Mon Dec 03, 2007 12:00 am
Reply with quote

If you move the data to a numeric field with the intrinsic function NUMVAL, and then back with a regular MOVE, you will get what you want.
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Facing ABM3 issue! CICS 3
No new posts z/vm installation problem All Other Mainframe Topics 0
No new posts Job scheduling problem. JCL & VSAM 9
No new posts Problem with IFTHEN=(WHEN=GROUP,BEGIN... DFSORT/ICETOOL 5
Search our Forums:

Back to Top