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
 
What's the size of the variable

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

New User


Joined: 28 Apr 2006
Posts: 3

PostPosted: Fri Jun 02, 2006 3:22 pm    Post subject: What's the size of the variable
Reply with quote

Hi friends,
what is the size of 01 wrec.
01 wrec.
02 filler pic x.
02 a pic 9v999.
02 b redefines a pic xx.
02 c pic s9(6) comp3.

This was asked in written test for EDS.
Back to top
View user's profile Send private message

manisha-s
Warnings : 1

New User


Joined: 22 May 2006
Posts: 13

PostPosted: Fri Jun 02, 2006 4:15 pm    Post subject: re: output of the code
Reply with quote

answer is 11
Back to top
View user's profile Send private message
hikaps14

Active User


Joined: 02 Sep 2005
Posts: 189
Location: Noida

PostPosted: Fri Jun 02, 2006 4:21 pm    Post subject: Re: Please tell me the output
Reply with quote

Hi ,

i guess it takes '9' bytes because
redefine clause doesnt take new space
it would use same space .

eg:
01 wrec.
02 filler pic x.
02 a pic 9v999.
02 b redefines a pic xx.
02 c pic s9(6) comp3.

in this case
there will be no new allocation of memmory
it means that 'b' starts pointing to the starting space allocated to 'a'

plz do correct me if u find me wrong .

Thanks ,
Kapil.
Back to top
View user's profile Send private message
ap_mainframes

Active User


Joined: 29 Dec 2005
Posts: 181
Location: Canada

PostPosted: Fri Jun 02, 2006 7:14 pm    Post subject:
Reply with quote

@hikaps14,
You are spot on.
Even I think that it will take 9 bytes.

ap_mainframes
Back to top
View user's profile Send private message
philipraju
Warnings : 1

New User


Joined: 16 Apr 2006
Posts: 29

PostPosted: Sun Jun 04, 2006 4:32 pm    Post subject: Hi,
Reply with quote

Hi mahithegenius,

It will takes 9 bytes only...bcz of redefines does not allocates extra memorey...


Any other questions from EDS.....pls Recall all those questions
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 How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm
No new posts JES2 job size field matching Windows ... SRICOBSAS All Other Mainframe Topics 4 Tue Sep 05, 2017 5:49 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Move from Comp3 variable to Edited Va... sreekusr COBOL Programming 8 Thu Aug 10, 2017 4:20 pm

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