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
 

 

Is this data declaration valid?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
Shriram Jogdand

New User


Joined: 14 Oct 2008
Posts: 65
Location: Pune

PostPosted: Thu Oct 07, 2010 11:28 am    Post subject: Is this data declaration valid?
Reply with quote

Hi,

PIC S9(9)V99 COMP.

Is this declaration valid? If yes then how much bytes will it take?

Thanks.
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 Oct 07, 2010 4:29 pm    Post subject:
Reply with quote

With interview questions, you tell us what you answered and we comment upon the correctness of your answer.
Back to top
View user's profile Send private message
Shriram Jogdand

New User


Joined: 14 Oct 2008
Posts: 65
Location: Pune

PostPosted: Thu Oct 07, 2010 6:25 pm    Post subject: Reply to: Is this data declaration valid?
Reply with quote

I told that we cant declare the decimal format with COMP. Either we can simply use PIC S(9)V99 or PIC S9(9)V99 COMP-3.
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 Oct 07, 2010 6:40 pm    Post subject:
Reply with quote

Actually, from section 5.3.17.1 of the COBOL Language Reference manual:
Quote:
The PICTURE of a computational item can contain only:

9
One or more numeric character positions

S
One operational sign

V
One implied decimal point

P
One or more decimal scaling positions
and S999V99 COMP is perfectly valid in Enterprise COBOL.
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 -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Group Data based on a key Arun Raj DFSORT/ICETOOL 7 Thu Apr 27, 2017 11:29 pm
No new posts unload data from table with lob columns farhad_evan DB2 0 Sat Apr 22, 2017 1:32 pm
No new posts SORT JSON type of data maxsubrat DFSORT/ICETOOL 8 Wed Apr 19, 2017 6:01 pm
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm


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