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
 

 

Can we redefine an 77 level variable

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Can we redefine an 77 level variable
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: 1187
Location: Bangalore,India

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

Hi there,

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

Moderator Team Head


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

PostPosted: Wed Oct 25, 2006 3:29 pm    Post subject: Re: Redefines doubt
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    Post subject:
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: 1187
Location: Bangalore,India

PostPosted: Wed Oct 25, 2006 4:40 pm    Post subject:
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    Post subject: Re: Redefines doubt
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    Post subject:
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    Post subject:
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    Post subject:
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    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 Format to pipe delimited with variabl... pshongal SYNCSORT 6 Wed Sep 14, 2016 2:48 pm
No new posts Variable for cursor names ravikumar15 DB2 5 Sun Jul 17, 2016 7:08 am
No new posts OPC JCL Variable passion_sujesh IBM Tools 5 Fri Jul 01, 2016 4:21 am
No new posts JOINKEYs and Variable files migusd SYNCSORT 8 Fri Jun 17, 2016 3:16 am
No new posts Syncsort TPF Level Majid Hussain SYNCSORT 2 Wed Apr 13, 2016 2:22 am


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