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
 

 

What means PIC -(8)9 ?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Gopalakrishnan V

Active User


Joined: 28 Jun 2010
Posts: 102
Location: chennai

PostPosted: Fri Mar 18, 2011 3:33 pm    Post subject: What means PIC -(8)9 ?
Reply with quote

Can anyone please explain how this declaration works in cobol
Code:

05  OUT-CNT-MF                             PIC -(8)9.

This code is working fine. But i want to know how the size and length of data is assigned?
Back to top
View user's profile Send private message

Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1756
Location: UK

PostPosted: Fri Mar 18, 2011 4:01 pm    Post subject:
Reply with quote

What experiments have you undertaken to find out for yourself? Have you looked at the manual? have you asked colleagues? Have you written a little program with a variable defined like that and looked at the compiler output to see how much space the compiler assigned it?
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1753
Location: Bloomington, IL

PostPosted: Fri Mar 18, 2011 4:04 pm    Post subject: Re: What it means PIC -(8)9 ?
Reply with quote

Gopalakrishnan V wrote:
Can anyone please explain how this declaration works in cobol
Code:

05  OUT-CNT-MF                             PIC -(8)9.

This code is working fine. But i want to know how the size and length of data is assigned?


Thanks in advance

As your comprehension of written English is too limited to allow you to understand the manual, I will try to make my explanation of the phenomenon simple enough for you to follow.

Since no USAGE clause is specified, the variable is USAGE IS DISPLAY. There are eight ("(8)") floating minus signs ("-"), and one digit ("9"), making a total of nine (8+1) bytes used. Capisce?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7997
Location: Bellevue, IA

PostPosted: Fri Mar 18, 2011 4:12 pm    Post subject:
Reply with quote

Quote:
But i want to know how the size and length of data is assigned?
Did you start by looking at the data map output of the compiler to see how the compiler interpreted the PICTURE? If not, why not? Seeing what the compiler generated is usually a good way to understand any PIC clauses you don't understand.
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1280
Location: Belgium

PostPosted: Fri Mar 18, 2011 5:44 pm    Post subject:
Reply with quote

Robert Sample wrote:
Did you start by looking at the data map output of the compiler ...

compiler ? data map?
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 Null Indicator value -2 means in Embe... deepak_shrivastava DB2 2 Wed Jan 06, 2016 10:27 pm
No new posts What's the +1 means in CLC FOUR,SIX+1 ? jackzhang75 PL/I & Assembler 2 Tue May 19, 2015 2:02 am
No new posts Securely storing ftp password in acf2... harisukumaran CA Products 1 Fri Sep 26, 2014 5:15 am
No new posts What Does "OC" Instruction ... enrico-sorichetti PL/I & Assembler 7 Tue Apr 17, 2012 12:52 pm
No new posts What does % in file discription of EA... phani.mf2011 CA Products 3 Thu Apr 28, 2011 3:39 pm


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