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
 

 

Problem in Redefine

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

New User


Joined: 05 Mar 2005
Posts: 4

PostPosted: Thu Jul 21, 2005 6:57 pm    Post subject: Problem in Redefine
Reply with quote

hi all,

I have 2 cases of redefining the data

case I :
01 A PIC S9(8)V9(2) COMP-3.
01 B REDEFINES A .
05 C PIC 9(5).
05 D PIC 9(5).

Case II:

01 IN-RECORD.
03 A PIC S9(8)V9(2) COMP-3.
03 B REDEFINES A .
05 C PIC 9(5).
05 D PIC 9(5).

With the case II i get the error as B redefines smaller item
but with CaseI i do not get this error.
can any one help me out why it is not possible with level number other than 01
Back to top
View user's profile Send private message

thanooz

New User


Joined: 28 Jun 2005
Posts: 99

PostPosted: Thu Jul 21, 2005 9:07 pm    Post subject:
Reply with quote

hi


in 01,77 level you can redifine with either greater or smaler any way


but other than that levl numbers the size should be same.




thanooz
Back to top
View user's profile Send private message
pruthvi

New User


Joined: 05 Mar 2005
Posts: 4

PostPosted: Mon Jul 25, 2005 5:32 pm    Post subject: Re: Problem in Redefine
Reply with quote

hi thanooz ,
i want to know the reason why it is only with 77 and 01 level itself why not with other level numbers

thanks
pruthvi
Back to top
View user's profile Send private message
thanooz

New User


Joined: 28 Jun 2005
Posts: 99

PostPosted: Mon Jul 25, 2005 8:36 pm    Post subject:
Reply with quote

hi pruthvi

because 77 or 01 can be used as elementry data items.77 is elementry data item.01 is group item but you can use as elementry data item. the possiblity only for these two number only.



thanooz
Back to top
View user's profile Send private message
sharad
Warnings : 1

New User


Joined: 14 Jun 2005
Posts: 2

PostPosted: Tue Jul 26, 2005 9:07 pm    Post subject: Hi
Reply with quote

I would like to clarify that in 77 level also u can't redefine variable of greater length. This is possible only with 01 level.

please correct me if I am wrong.
Back to top
View user's profile Send private message
batu544

New User


Joined: 21 Jul 2005
Posts: 16
Location: bangalore

PostPosted: Wed Jul 27, 2005 3:10 pm    Post subject:
Reply with quote

hi,
u can redefine X(100) field to X(200) field. or X(200) to X(100) field in any level.

but if u r using 01 level then ur size must be same . that means X(100) should be redefined with X(100) field.
Back to top
View user's profile Send private message
atik

New User


Joined: 29 Jul 2005
Posts: 20

PostPosted: Thu Aug 11, 2005 11:28 am    Post subject: hi
Reply with quote

I want to know whether you are getting Warning or Error. If you are redifining a portion, then you can get a warning.
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 Easytrive Redefine vidyaa CA Products 4 Mon Jun 19, 2017 6:01 pm
No new posts Redefine SYS1.PROCLIB farhad_evan JCL & VSAM 12 Mon May 22, 2017 10:54 pm
No new posts Strings with double quotes having pro... raja Arumugam All Other Mainframe Topics 11 Thu Mar 30, 2017 10:34 am
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts ROUNDED Problem with COMPUTE statement shalem COBOL Programming 11 Thu Feb 09, 2017 8:16 pm


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