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

Can we redefine an 77 level variable


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
narasridhar

New User


Joined: 12 Oct 2006
Posts: 32
Location: India

PostPosted: Wed Oct 25, 2006 3:09 pm
Reply with quote

Can we redefine an 77 level variable
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Wed Oct 25, 2006 3:24 pm
Reply with quote

Hi there,

I think we cant redefine 77 level variable.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Oct 25, 2006 3:29 pm
Reply with quote

I don't see anything here that says you can't.
Back to top
View user's profile Send private message
raghavendraun

New User


Joined: 29 Apr 2005
Posts: 9

PostPosted: Wed Oct 25, 2006 4:38 pm
Reply with quote

Hi,

I think u can redefine the 77 level item. But, that doesnt make any difference, since 77 level item cant have the sub-levels.

A code would look like the example below.

77 WS-CUST-NO-FLG PIC X(01) VALUE 'N'.
77 WS-CUST-NO-FLG-X REDEFINES WS-CUST-NO-FLG PIC X.
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Wed Oct 25, 2006 4:40 pm
Reply with quote

Hi Kevin & raghavendraun

Thanks for correcting me.
Back to top
View user's profile Send private message
mallik_mca

New User


Joined: 26 Sep 2006
Posts: 4

PostPosted: Wed Oct 25, 2006 9:37 pm
Reply with quote

Hi Sirdhar,

You can't redefine level number 77,88,66.Are u still in accuture.

Thanks,
Mallikarjun,
Cognizant,
Chennai
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Fri Oct 27, 2006 3:37 am
Reply with quote

Hi Mallikarjun,

Can you provide some documentation (naming its source) to support your assertion? I could'nt find anything.
Back to top
View user's profile Send private message
annujp

New User


Joined: 31 Aug 2005
Posts: 39
Location: St Paul,MN

PostPosted: Mon Oct 30, 2006 5:28 pm
Reply with quote

I tried this out.
You can redefine a level 77 item with another 77 level item alone.

77 WS-AMOUNT PIC 9(2) VALUE 12.
77 WS-AMOUNT-RED REDEFINES WS-AMOUNT
PIC X(2).

This did not show any error.

When I changed the level of WS-AMOUNT-RED from 77 to 01, I got a compilation error
"REDEFINES" object "WS-AMOUNT" was not the immediately preceding level-1 data item. The "REDEFINES" clause was discarded.

Hope this was helpful.
Back to top
View user's profile Send private message
shreevamsi

Active User


Joined: 23 Feb 2006
Posts: 305
Location: Hyderabad,India

PostPosted: Mon Oct 30, 2006 7:13 pm
Reply with quote

Yes..annujp is correct...
We can redefine 77 level item.

But you can't redefine a Group element with 77 level item or vice versa.

~Vamsi
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 Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts How to load to DB2 with column level ... DB2 6
No new posts Variable Output file name DFSORT/ICETOOL 8
No new posts ISRSUPC search utility - using high l... TSO/ISPF 2
No new posts Moving Or setting POINTER to another ... COBOL Programming 2
Search our Forums:

Back to Top