Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 6968
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 Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm
No new posts Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 pm
No new posts Insert a Row_number into table useit DB2 2 Tue Sep 19, 2017 1:07 pm
No new posts how to see when the last read access ... Mike 1304 DB2 1 Tue Sep 12, 2017 7:52 pm
No new posts PC (UTF-8) -> z/OS (EBCDIC) -> ... prino All Other Mainframe Topics 4 Fri Sep 01, 2017 1:47 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us