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
 
Need help to format the output data

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL
Author Message
rohit_raajin

New User


Joined: 10 May 2005
Posts: 10
Location: india

PostPosted: Wed Jun 11, 2008 11:58 am    Post subject: Need help to format the output data
Reply with quote

I have a requirement where i have a variabe PIC 9(8).
For example the variable = 00123456
output should be = 123456
Back to top
View user's profile Send private message
References
yogeshwar_ade

Active User


Joined: 31 Aug 2006
Posts: 72
Location: INDIA

PostPosted: Wed Jun 11, 2008 12:25 pm    Post subject: Reply to: Need help to format the output data
Reply with quote

You can take use of "INSPECT" for "LEADING ZEROS".

Look at Manuals for INSPECT syntax or search in this Forum.


Correct me If I am wrong.

Yogeshwar
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 666

PostPosted: Wed Jun 11, 2008 12:31 pm    Post subject:
Reply with quote

Hi,
this may sound too simple so I maybe missing something, move the variable to a ZZZZZZZ9 variable.


Gerry
Back to top
View user's profile Send private message
the_gautam

Active User


Joined: 05 Jun 2005
Posts: 168
Location: Bangalore

PostPosted: Wed Jun 11, 2008 12:35 pm    Post subject:
Reply with quote

according to the requirement mentioned, you have posted the best solution.
Back to top
View user's profile Send private message
yogeshwar_ade

Active User


Joined: 31 Aug 2006
Posts: 72
Location: INDIA

PostPosted: Wed Jun 11, 2008 12:42 pm    Post subject:
Reply with quote

gcicchet wrote:
Hi,
this may sound too simple so I maybe missing something, move the variable to a ZZZZZZZ9 variable.


Gerry



Yeah, this is the best solution for this query.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL All times are GMT + 6 Hours
Page 1 of 1