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

Problem in Redefine


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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
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
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
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
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: 17
Location: bangalore

PostPosted: Wed Jul 27, 2005 3:10 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts z/vm installation problem All Other Mainframe Topics 0
No new posts Job scheduling problem. JCL & VSAM 9
No new posts Problem with IFTHEN=(WHEN=GROUP,BEGIN... DFSORT/ICETOOL 5
No new posts Need to add field to copybook, proble... COBOL Programming 14
Search our Forums:

Back to Top