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

Need help to format the output data


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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
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: 1702
Location: Australia

PostPosted: Wed Jun 11, 2008 12:31 pm
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Store the data for fixed length COBOL Programming 1
No new posts Populate last day of the Month in MMD... SYNCSORT 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
Search our Forums:

Back to Top