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

Is such usage on table correct


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

New User


Joined: 26 Sep 2008
Posts: 22
Location: China

PostPosted: Mon Jul 06, 2009 2:11 pm
Reply with quote

Hi masters,

Here is one question about cobol need yours help. icon_biggrin.gif

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Jul 06, 2009 2:39 pm
Reply with quote

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
View user's profile Send private message
william.kangweiliang

New User


Joined: 26 Sep 2008
Posts: 22
Location: China

PostPosted: Mon Jul 06, 2009 3:08 pm
Reply with quote

thanks a lot icon_razz.gif
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 Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Check data with Exception Table DB2 0
No new posts Validating record count of a file is ... DFSORT/ICETOOL 13
Search our Forums:

Back to Top