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 Data replication from multiple Db2 ta... kishpra DB2 5 Mon Mar 27, 2017 9:58 pm
No new posts Is the explanation correct? XRST,CHKP Martylin IMS DB/DC 1 Wed Mar 15, 2017 9:26 am
No new posts how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm
No new posts Join of more than one table dibyendumandal11111 DB2 6 Mon Feb 13, 2017 11:36 pm
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am


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