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

A question on Redifine.


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Mukesh Pandey

Active User


Joined: 11 Nov 2008
Posts: 143
Location: India

PostPosted: Mon Jan 25, 2010 4:11 pm
Reply with quote

Code:
01 REC1
    05 INDIVIDUAL-NAME.
      10 FST-NAME1 PIC X(5).
      10 LST-NAME1 PIC X(5).
    05 COMPANY-NAME REDIFINES INDIVIDUAL NAME.
      10 FST-NAME2 PIC X(5).
      10 LST-NAME2 PIC X(5).     

......

MOVE 'ABC' TO FST-NAME1.
......
MOVE 'XYZ' TO FST-NAME2 .
.....

DISPLAY FST-NAME1.
DISPLAY FST-NAME2.

what is displayed in FST-NAME1 and FST-NAME2 respectively.

Thanks.......
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Jan 25, 2010 4:13 pm
Reply with quote

from the question style, and the unabilty/unwillingness to test
the topic has been moved where it belongs

a bit of use Your own logic should help You ( unless You run in a warp aware environment )
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Jan 25, 2010 4:13 pm
Reply with quote

Surely these are things that YOU can test for yourself quite easily.
Back to top
View user's profile Send private message
bhairon singh rathore

New User


Joined: 19 Jun 2008
Posts: 91
Location: banglore

PostPosted: Mon Jan 25, 2010 4:17 pm
Reply with quote

XYZ
XYZ
Please read document instead of sending this type of queries.
Back to top
View user's profile Send private message
Mukesh Pandey

Active User


Joined: 11 Nov 2008
Posts: 143
Location: India

PostPosted: Mon Jan 25, 2010 4:55 pm
Reply with quote

enrico.. sorry.. i will try to test the same... or i will read the manuals.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Jan 25, 2010 5:03 pm
Reply with quote

Hi Mukesh, no reason to be sorry, but let me ask a few questions...

if You had just one move what would be the result ???

the code snippet You posted does not convey any real info....

if ...

both statement in the same paragraph/open code that is alway executed, then ...

both statement in the same paragraph/open code that is never executed, then ...

both statement in the same paragraph/open code that is conditionally executed, then ...

each statement in a different paragraph....
in what order are the paragraph executed and are they executed at all

meditate, meditate,... , meditate icon_biggrin.gif

to add some spice to Your concern,
if the compiler is smart enough and the optimization a bit aggressive , the machine instructions for one or both might not even be generated
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Tue Jan 26, 2010 6:54 am
Reply with quote

bhairon singh rathore wrote:
XYZ
XYZ
Please read document instead of sending this type of queries.

Since you've given the poster the answer, they no longer HAVE to read the document.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Tue Jan 26, 2010 7:04 am
Reply with quote

Mukesh Pandey wrote:
what is displayed in FST-NAME1 and FST-NAME2 respectively.
OFPS!
Since a redefines is pointing to the same storage location, whatever was moved last is what is in both pointed to locations.....
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Jan 26, 2010 2:45 pm
Reply with quote

Terry wrote:
Since you've given the poster the answer, they no longer HAVE to read the document.


but bhairon singh rathore has one more post! and that is what is important to him.[/quote]
Back to top
View user's profile Send private message
bhairon singh rathore

New User


Joined: 19 Jun 2008
Posts: 91
Location: banglore

PostPosted: Wed Jan 27, 2010 11:46 am
Reply with quote

Hi DBZ,
I didn't got what you are refering for in your last post

Bhairon Singh Rathore
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 -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Question for file manager IBM Tools 7
No new posts question for Pedro TSO/ISPF 2
No new posts question on Outrec and sort #Digvijay DFSORT/ICETOOL 20
No new posts panel creation question TSO/ISPF 12
No new posts Sort w/OUTREC Question DFSORT/ICETOOL 2
Search our Forums:

Back to Top