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

PIC Clause declaration


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

New User


Joined: 09 Feb 2009
Posts: 8
Location: Chennai

PostPosted: Thu Mar 11, 2010 2:55 pm
Reply with quote

i declared a cobol variable like this??

77 WS-A-VAR PIC 999B999B99B9.

I tried passing numeric value to this field but unable process it.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Mar 11, 2010 3:27 pm
Reply with quote

Are you talking about IBM Enterprise COBOL? What is "B" stands for in the definition? I may sound dumb, but in last 5-years I've never used it. icon_cry.gif
Back to top
View user's profile Send private message
amdparsn

New User


Joined: 09 Feb 2009
Posts: 8
Location: Chennai

PostPosted: Thu Mar 11, 2010 5:24 pm
Reply with quote

I used COBOL 390 to declare the field.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Mar 11, 2010 6:22 pm
Reply with quote

Anuj, B stands for a blank (space). Before the slash was added as an edit symbol, dates were usually 9999B99B99 and after moving the date over the INSPECT REPLACING ALL SPACE BY '/' was used to add the slashes.

Amdparsn, you did not provide enough information for us to help you. If you move any 9-digit number to this field, it will be stored as shown. You cannot use this field for numeric operations due to the blanks -- this field is called "numeric edited" in the COBOL manuals, and it is essentially treated as an alphanumeric field by COBOL. If you tell us what you are trying to do with it, we may be able to help you more.
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: Thu Mar 11, 2010 8:08 pm
Reply with quote

Gosh, how young they are.....

Like Robert pointed out, "but unable process it" doesn't provide much for us to go on.....
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Mar 12, 2010 3:02 pm
Reply with quote

Robert, I compiled a code using that PIC yesterday using IBM Enterprise COBOL for z/OS 3.4.1 and there was no syntax errors, since then I'm following-up this topic like icon_eek.gif...

Thanks for the explnation, that helps...icon_smile.gif

Have a good one,
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Mar 12, 2010 3:06 pm
Reply with quote

CICS Guy wrote:
Gosh, how young they are.....
But I like to sit around You guys...icon_smile.gif
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 To search DB2 table based on Conditio... DB2 1
No new posts NOT IN clause in COBOL pgm COBOL Programming 8
No new posts SUSBSCRIPT WITH SIGN IN PIC CLAUSE COBOL Programming 3
No new posts usage of CASE in WHERE clause DB2 10
No new posts Cobol redefines for Signed pictured c... COBOL Programming 4
Search our Forums:

Back to Top