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
 

 

Is such usage on table correct

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Is such usage on table correct
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    Post subject:
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    Post subject:
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    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 SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
This topic is locked: you cannot edit posts or make replies. Get correct date and time when curren... balaji81_k DB2 24 Fri Oct 14, 2016 10:40 pm
No new posts Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm
No new posts Command UNIQUE CONSTRAINT on any tabl... rohanthengal DB2 2 Thu Aug 18, 2016 3:48 pm
No new posts Updating online Db2 table kishpra DB2 3 Fri Aug 12, 2016 2:44 pm


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