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

length of the COMP variables with assumed decimal


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

New User


Joined: 28 Mar 2007
Posts: 21
Location: India

PostPosted: Thu Mar 29, 2007 4:33 pm
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: 3156
Location: Tucson AZ

PostPosted: Thu Mar 29, 2007 6:48 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts VB to VB copy - Full length reached SYNCSORT 8
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
Search our Forums:

Back to Top