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
 
Is it possible to Redefines x(1) to x(2)

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

New User


Joined: 29 Jun 2005
Posts: 7

PostPosted: Wed Jun 29, 2005 4:19 am    Post subject: Is it possible to Redefines x(1) to x(2)
Reply with quote

hello,

Can i redefine x(1) to x(2).is it possible?
01 a pic x.
01 b redefines a pic x(2). is it correct?
i read in some FAQS x(100) to x(200) is possible? please give any body correct anawer.

Regards
urnarendra
Back to top
View user's profile Send private message

priya

Moderator


Joined: 24 Jul 2003
Posts: 568
Location: Bangalore

PostPosted: Thu Jun 30, 2005 12:13 am    Post subject:
Reply with quote

Yes, It's possible according to ANSI - 85 standards only if both the variables declared in 01 Level.
Back to top
View user's profile Send private message
sudhaaa

New User


Joined: 24 Mar 2005
Posts: 51

PostPosted: Sat Jul 02, 2005 6:30 pm    Post subject: RE:
Reply with quote

Hi Narendra,

Redefines is mainly for utilizing memory space.

A PIC X
B REDIFINES A PIC XX.

MOVE 1 TO A.
DISPLAY B.

Now B will contain 1b. ( b for space).

Any corrections welcome.

Regards,
Sudhaaa.
Back to top
View user's profile Send private message
sats456

New User


Joined: 29 May 2005
Posts: 12

PostPosted: Sun Jul 03, 2005 4:59 pm    Post subject: Re: Is it possible to Redefines x(1) to x(2)
Reply with quote

I wud say best wud be to try writing a small prograam to test it out if your compiler supports it ...
Back to top
View user's profile Send private message
urnarendra

New User


Joined: 29 Jun 2005
Posts: 7

PostPosted: Wed Jul 06, 2005 4:01 am    Post subject: Re: Is it possible to Redefines x(1) to x(2)
Reply with quote

hello priya,

in ANSI 74 we can redefine one variable into any other variable with same length(we can not increase or decrease the size).but in ANSI 85 standard we can decrease the size but we can not increase(you can read boo).i am working in Z/OS .in that i am trying to increase the size its working perfectely.but in OS/390 (in real time) it can not work.in faq's they told increase is possible.but is not possible.i attend one interview in that interview i face this question but i told it possible that time the interviewer told me it is not possible.
corrections are welcome.............
thanks®ards,
k.narendra.
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
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us