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
 

 

A question on Redifine.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
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    Post subject: A question on Redifine.
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10210
Location: italy

PostPosted: Mon Jan 25, 2010 4:13 pm    Post subject: Reply to: A question on Redifine.
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: 8593
Location: Back in jolly old England

PostPosted: Mon Jan 25, 2010 4:13 pm    Post subject:
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    Post subject:
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10210
Location: italy

PostPosted: Mon Jan 25, 2010 5:03 pm    Post subject: Reply to: A question on Redifine.
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: 1239
Location: Richfield, MN, USA

PostPosted: Tue Jan 26, 2010 6:54 am    Post subject:
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: 2150
Location: At my coffee table

PostPosted: Tue Jan 26, 2010 7:04 am    Post subject: Re: A question on Redifine.
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    Post subject:
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    Post subject:
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    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 Fault Analyzer - listings question. egrove IBM Tools 4 Thu Aug 11, 2016 5:31 pm
No new posts dataset copy question - REPRO or some... atulxp TSO/ISPF 2 Wed Aug 03, 2016 10:56 pm
No new posts SQL Order By related question Joseph K Thomas DB2 8 Fri Mar 18, 2016 12:53 pm
No new posts DFSort Question krrp DFSORT/ICETOOL 9 Mon Mar 07, 2016 7:11 pm
No new posts Question: REORG on LOB tablespaces rakesh1155 DB2 1 Fri Aug 14, 2015 2:14 pm


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