How will C look in this program



How will C look in this program

Postby abkumarch » Tue Oct 30, 2007 7:24 pm

01 A pic X(02)
01 B pic X(03)
01 C pic X(04) VALUE 'c'.

01 C REDEFINES A

DISPLAY C ? how will C look like ? I dont want yr 'guess' ?

Plz ans those who have "tried & tested" . OK
abkumarch
 
Posts: 21
Joined: Tue Oct 30, 2007 3:14 am
Has thanked: 0 time
Been thanked: 0 time

Re: How will C look in this program

Postby dick scherrer » Wed Oct 31, 2007 2:13 am

Hello,

I dont want yr 'guess' ?

Plz ans those who have "tried & tested" . OK


Your "question" should not be answered by anyone here. C won't look like anything - your definitions contain multiple errors.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: How will C look in this program

Postby abkumarch » Wed Oct 31, 2007 8:48 pm

mr dick , will u plz elaborate the error, look i m a beginner& i wanted to kno the errors and ans
abkumarch
 
Posts: 21
Joined: Tue Oct 30, 2007 3:14 am
Has thanked: 0 time
Been thanked: 0 time

Re: How will C look in this program

Postby CICS Guy » Wed Oct 31, 2007 9:02 pm

abkumarch wrote:
01    A     pic  X(02)
01    B     pic  X(03)
01    C     pic  X(04) VALUE 'c'.
     
01    C     REDEFINES  A

DISPLAY C ? how will C look like ?
It's hard to say exactally, I would have to guess......
I dont want yr 'guess' ?
Plz ans those who have "tried & tested" . OK
That's the problem, as it is, it can not be "tried & tested" since it won't compile....
C does not follow A immediately....
If C does actually redefine A, then C can not have a value.....
The second definition of C is an unqualifiable duplicate....
The second definition of C does not have a pic or subordinate entries....
Try setting up the storage correctly and we can figure it out without guessing.....
CICS Guy
 
Posts: 246
Joined: Wed Jun 20, 2007 4:08 am
Has thanked: 0 time
Been thanked: 0 time

Re: How will C look in this program

Postby sureshbabu » Wed Jan 02, 2008 3:29 pm

C redefines A

when you display value of C, it will display the value of A when A has some value in the procedure division else
it will so error as A is not initIalozed in working-storage-section
sureshbabu
 
Posts: 7
Joined: Tue Dec 18, 2007 12:39 pm
Has thanked: 0 time
Been thanked: 0 time


Return to Stupid Questions

 


  • Related topics
    Replies
    Views
    Last post