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
 

 

About Redefines

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

New User


Joined: 26 May 2005
Posts: 45
Location: gurgaon

PostPosted: Mon Jun 27, 2005 10:07 am    Post subject: About Redefines
Reply with quote

Hi Folks,

01 WS-AA PIC X(10).
01 WS-REDEF-AA REDEFINES WS-AA.
05 WS-BB PIC 9(10).

is this possible.if we delare like this what will happend.
Back to top
View user's profile Send private message

harinadh

New User


Joined: 01 Sep 2004
Posts: 18

PostPosted: Mon Jun 27, 2005 10:24 am    Post subject: Re: About Redefines
Reply with quote

Hi,

You wont get any error. We can declare like that.
Back to top
View user's profile Send private message
Puneet

New User


Joined: 27 Jun 2005
Posts: 9
Location: Chennai

PostPosted: Mon Jun 27, 2005 11:13 am    Post subject: MOVING NUMERIC DATA....
Reply with quote

HI ,

It won't thow any error if we are moving only numeric fields.
but it can give abnormal termination when Alpha-numeric data is moved :
MOVE 'ABCDE' to WS-AA

As WS-AA and WS-BB are sharing the same memory will it cause abend at this step?

Thanks,
Puneet
Back to top
View user's profile Send private message
David P

Active User


Joined: 11 Apr 2005
Posts: 106
Location: Cincinnati Ohio

PostPosted: Mon Jun 27, 2005 5:20 pm    Post subject:
Reply with quote

Hi Puneet,

The move statement you mentioned above :

MOVE 'ABCDE' TO WS-AA will never terminate the execution abnormally.
But the arithmetic operations like :

ADD 1 TO WS-AA
will certainly cause an abnormal termination.

regards,
David.
Back to top
View user's profile Send private message
David P

Active User


Joined: 11 Apr 2005
Posts: 106
Location: Cincinnati Ohio

PostPosted: Mon Jun 27, 2005 5:24 pm    Post subject:
Reply with quote

Hi,

I am sorry for the above post what I wanted to say is

ADD 1 TO WS-BB
will cause an abend.
ADD 1 TO WS-AA will throw a compilation error.

regards,
David.
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 Another redefines in COBOL RahulG31 COBOL Programming 1 Fri Mar 20, 2015 4:09 am
No new posts Redefines clause in symbolic map MPC ... eprasad629 CICS 1 Sun Jan 15, 2012 12:18 am
No new posts Redefines usage nirmal.poikaikumaran COBOL Programming 15 Wed Mar 09, 2011 6:33 pm
No new posts Rename & Redefines srk.neeraj COBOL Programming 5 Mon Feb 14, 2011 6:06 pm
No new posts Defining REDEFINES cobol field in EZT rgupta71 CA Products 4 Mon Jan 31, 2011 9:30 pm


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