View previous topic :: View next topic
|
Author |
Message |
sm_2009
New User
Joined: 10 May 2009 Posts: 72 Location: bangalore
|
|
|
|
hi
I have declared a working storage variable as
Code: |
05 WS-CHEQUE-NBR PIC 9(6) VALUE ZEROES. |
but its giving compilation error as Group item "WS-CHEQUE-NBR" contained the "PICTURE" clause. The clause was discarded.
i am unable to find the reason for it. pls suggest.
thanks |
|
Back to top |
|
|
bipinpeter
Active User
Joined: 18 Jun 2007 Posts: 213 Location: Cochin/Kerala/India
|
|
|
|
Hi sm_2009,
We cant give PICTURE Clause for the group level variables.Just read the CObol manual for the Group level decalaration rules. |
|
Back to top |
|
|
sm_2009
New User
Joined: 10 May 2009 Posts: 72 Location: bangalore
|
|
|
|
But its not a group variable. as you can see the code, i have put it as an elementary variable. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
debugging a single statement does not make sense,
the behavior is due to the statements surrounding the one You just posted
post the full definition and You might get better answers |
|
Back to top |
|
|
bipinpeter
Active User
Joined: 18 Jun 2007 Posts: 213 Location: Cochin/Kerala/India
|
|
|
|
Hi sm_2009,
Just post the code below the
Code: |
05 WS-CHEQUE-NBR PIC 9(6) VALUE ZEROES. |
statement |
|
Back to top |
|
|
umasankarmf
New User
Joined: 08 Sep 2008 Posts: 43 Location: india
|
|
|
|
Hi Bipin Peter,
If it is not group variable then the level number should be either 01 or 77.
Change the level number from 05 to 01 or 77, then it will work. |
|
Back to top |
|
|
sm_2009
New User
Joined: 10 May 2009 Posts: 72 Location: bangalore
|
|
|
|
actually in working storage area i have declared as
01 work variables.
05 var1 pic x(02) value spaces.
05 ws-cheque-nbr pic 9(6) value zeroes.
error is giving at the particular line i have declared ws-cheque-nbr.
my question is for other fields its not giving this type of error as group variable, then for this variable only why this error is giving.
pls suggest. |
|
Back to top |
|
|
umasankarmf
New User
Joined: 08 Sep 2008 Posts: 43 Location: india
|
|
|
|
can you tell me the next variable declaration after this group.
I think problem is in next variable declaration. please post that. |
|
Back to top |
|
|
manishmittal
New User
Joined: 25 Apr 2008 Posts: 49 Location: Gurgaon
|
|
|
|
Please post the full code defined means statements belwo the ws-cheque-nbr.
It could be possible that your code contains :
01 work variables.
05 var1 pic x(02) value spaces.
05 ws-cheque-nbr pic 9(6) value zeroes.
10 ws-1 pix .
10 ws-2 pic x.
Then in aboce case ws-cheque-nbr will be considered as a group variable only. |
|
Back to top |
|
|
sm_2009
New User
Joined: 10 May 2009 Posts: 72 Location: bangalore
|
|
|
|
ohh yes after that there are few program switches tht i have declared at level 10.
i changed the level nos below that ws-cheque-nbr to same 05 level.
now its fine.
thanks all. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
umasankarmf wrote: |
Hi Bipin Peter,
If it is not group variable then the level number should be either 01 or 77.
Change the level number from 05 to 01 or 77, then it will work. |
this above is not true.
umasankarmf does not know what he is talking about.
ignore his post. |
|
Back to top |
|
|
manishmittal
New User
Joined: 25 Apr 2008 Posts: 49 Location: Gurgaon
|
|
|
|
I too echo with Dick.But if we change 05 to 01 or 77 it will really work.Though the statement"If it is not group variable then the level number should be either 01 or 77. " is not true. |
|
Back to top |
|
|
umasankarmf
New User
Joined: 08 Sep 2008 Posts: 43 Location: india
|
|
|
|
Dick & Manish,
As per the 1st post he has given single line declaration, so I thought that it is independent variable. If it is a independent variable its level number shoul be either 01 or 77.
My previou post not for all conditions only for his question. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
You took the wrong approach, and You made a mistake,
nobody is going to kill You for that
as I said before
Quote: |
debugging a single statement does not make sense,
the behavior is due to the statements surrounding the one You just posted |
|
|
Back to top |
|
|
|