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
 

 

can weuse redefining and redefined variables inone operation

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

New User


Joined: 22 May 2005
Posts: 7
Location: Bangalore

PostPosted: Tue Nov 07, 2006 5:10 pm    Post subject: can weuse redefining and redefined variables inone operation
Reply with quote

Hi
This is sasi
interview questions on redefines

1. can we use redefining and redefined variables in one operation ?
ex:

IN A PGM
.
.
.
WORKING STORAGE SECTION.
01 A PIC X(2).
01 B REDEFINES A PIC X(4).
01 C PIC X(4).
PROCEDURE DIVISION.

MOVE 10 TO A.
MOVE 1000 TO B.

COMPUTE C = A+B.
DISPLAY C.
STOP RUN.

the above program works fine(or) not ? if not what error it shows?

2. for the above example
A occupies 2 bytes
B will be occupies 4 bytes
my question how B will be accomdate 4 bytes ?

waiting ur reply

Thanks & Regards
Sasi
Back to top
View user's profile Send private message

guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Tue Nov 07, 2006 5:31 pm    Post subject:
Reply with quote

Hi Sasi,

It would not abend because Redefines just causes both fields to start at the same location.
I think result should be 1010.
Others plz comment
Back to top
View user's profile Send private message
samayamsasi
Warnings : 1

New User


Joined: 22 May 2005
Posts: 7
Location: Bangalore

PostPosted: Tue Nov 07, 2006 6:17 pm    Post subject: Re: can weuse redefining and redefined variables inone opera
Reply with quote

Hi guptae,

thx ur reply
Please give answer for the second question ?

Thanks & Regards
Sasi
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 Joinkeys operation when key1 and key2... Susanta DFSORT/ICETOOL 5 Wed Nov 02, 2016 5:35 pm
No new posts Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm
No new posts Joinkeys operation betwen VB and FB file Susanta SYNCSORT 4 Sun Sep 25, 2016 9:49 pm
No new posts Is it possible to pass variables of s... Csongor CLIST & REXX 2 Fri Jun 10, 2016 7:33 pm
No new posts TWS 'global' or 'local' variables Steve Coalbran IBM Tools 2 Thu Mar 17, 2016 7:40 pm


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