View previous topic :: View next topic
|
Author |
Message |
william.kangweiliang
New User
Joined: 26 Sep 2008 Posts: 22 Location: China
|
|
|
|
Hi masters,
Here is one question about cobol need yours help.
Let's say there is a verb def like this:
01 WS-TABLE.
03 WS-TABLE-ENTRY OCCURS 12 TIMES INDEXED BY X-WS-TBL.
05 WS-ACT-DATA.
07 WS-ACT-SOURCE PIC X(01).
88 WS-FMAA-REC VALUE 'F'.
88 WS-AMOA-REC VALUE 'A'.
the function I want is like:
SET X-WS-TBL TO 1
IF WS-AMOA-REC(X-WS-TBL)
.............
END-IF.
Is such usage on table correct? I think it should be
SET X-WS-TBL TO 1
IF WS-ACT-SOURCE(X-WS-TBL) = 'A'
.............
END-IF.
Pls give me your advise! Thx a lot! |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
both are correct.
it is easier to code the lvl-88
IF WS-AMOA-REC(X-WS-TBL)
there is a manuals button at the top of the page. look in the cobol programmers for your version of cobol.
in the future, I would suggest reading the manual first.
by the way, the abbreviation for variable is var not verb. |
|
Back to top |
|
|
william.kangweiliang
New User
Joined: 26 Sep 2008 Posts: 22 Location: China
|
|
|
|
thanks a lot |
|
Back to top |
|
|
|