Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 -> COBOL Programming
View previous topic :: :: View next topic  
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

yogeshwar_ade

Active User


Joined: 31 Aug 2006
Posts: 103
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: 1703
Location: Australia

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: 165
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: 103
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Data security erase on RAID device steve-myers All Other Mainframe Topics 0 Sat Jan 13, 2018 6:41 am
No new posts Sum the fields in particular format f... sharana64 DFSORT/ICETOOL 9 Fri Jan 05, 2018 1:11 am
No new posts Append the milliseconds to the data s... girishb2 DFSORT/ICETOOL 1 Thu Dec 21, 2017 9:07 pm
No new posts Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 2 Thu Dec 14, 2017 5:46 pm
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us