Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
length of the COMP variables with assumed decimal

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

New User


Joined: 28 Mar 2007
Posts: 20
Location: India

PostPosted: Thu Mar 29, 2007 4:33 pm    Post subject: length of the COMP variables with assumed decimal
Reply with quote

hi all,
i want to calculate the length of the COMP with assumed decimal i.e for S9(04)v99.
Could any one explain how to calculate the length of the COMP1,COMP2,COMP3 variables which has assumed decimal
Thanks in Advance
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Thu Mar 29, 2007 6:48 pm    Post subject:
Reply with quote

The assumed decimal point takes no space in the comp or comp-3 field, S9(04)v99 is the same length as S9(04)99 or s9(06).
I do not believe comp2 allows decimals, implied or not.
Back to top
View user's profile Send private message
cooldebi

New User


Joined: 19 Apr 2006
Posts: 18
Location: mumbai

PostPosted: Thu Mar 29, 2007 8:07 pm    Post subject: Re: length of the COMP variables with assumed decimal
Reply with quote

Hi,

For COMP -- It will be same as s9(6) comp --that is 4 bytes

We never declare PIC clause for COMP1 and COMP2.

COMP1 takes 4 bytes of storage and COMP2 takes 8 bytes whatever be the size of data.

Please correct me if I am wrong anywhere.

Thanks
__________________
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 Using indexed variables in EZPLUS SRIDEVI TANTRY CA Products 1 Thu Feb 01, 2018 12:15 pm
No new posts COMP Variables Mismatch gayu7 COBOL Programming 5 Wed Dec 20, 2017 5:06 pm
No new posts Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 2 Thu Dec 14, 2017 5:46 pm
No new posts CONDITIONAL USING COMP-2 WITH PROBLEMS. JOSUEGENTIL COBOL Programming 7 Wed Nov 08, 2017 11:13 pm
No new posts how can i move s9(9) to s9(9) usage comp HARENDRA CHOUDHARY COBOL Programming 3 Mon Nov 06, 2017 12:10 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us