Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

PIC Clause declaration

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: PIC Clause declaration
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

Senior Member


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

PostPosted: Thu Mar 11, 2010 3:27 pm    Post subject:
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    Post subject:
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: 8057
Location: East Dubuque, Illinois, USA

PostPosted: Thu Mar 11, 2010 6:22 pm    Post subject:
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: 2150
Location: At my coffee table

PostPosted: Thu Mar 11, 2010 8:08 pm    Post subject:
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

Senior Member


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

PostPosted: Fri Mar 12, 2010 3:02 pm    Post subject:
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

Senior Member


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

PostPosted: Fri Mar 12, 2010 3:06 pm    Post subject:
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    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 Need help on SQL Dynamic WHERE Clause subratarec DB2 12 Sat Jul 16, 2016 3:11 pm
No new posts Declaration of varchar in cobol s.saranya srinivasan COBOL Programming 6 Fri Sep 25, 2015 11:43 am
No new posts [SQL0029] INTO clause missing from em... HABBIE DB2 2 Fri Sep 04, 2015 3:54 pm
No new posts 3-D Table with nested DEPENDING ON Cl... VivekKhanna COBOL Programming 5 Sat Aug 08, 2015 11:18 pm
No new posts COBOL File Declaration for RECFM=VBS ... thinkmsk COBOL Programming 4 Fri Apr 03, 2015 3:31 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us