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
 

 

How to view the value of an ODO variable while doing XPED.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Gaurav Chauhan

New User


Joined: 29 Oct 2007
Posts: 17
Location: Noida

PostPosted: Tue May 18, 2010 5:28 pm    Post subject: How to view the value of an ODO variable while doing XPED.
Reply with quote

I am trying to xpedite a module in which following ODO(Occurs depending on) table is declared as follows:
Code:
10  WS-VAR-COM           OCCURS 1 TO 50 TIMES       
                      DEPENDING ON WS-COUNTER.
    15  WS-VAR1                  PIC X(30).

Is there a way to view the value of variable WS-VAR1 while Xpedting the program.
Back to top
View user's profile Send private message

Kjeld

Active User


Joined: 15 Dec 2009
Posts: 365
Location: Denmark

PostPosted: Wed May 19, 2010 1:15 am    Post subject:
Reply with quote

What happens with the value of WS-VAR1(index) when you modify the supscript variable value?

Or try scrolling the group definition the contains the WS-VAR-COM group occurences.
Back to top
View user's profile Send private message
Gaurav Chauhan

New User


Joined: 29 Oct 2007
Posts: 17
Location: Noida

PostPosted: Wed May 19, 2010 4:02 pm    Post subject: Reply to: How to view the value of an ODO variable while doi
Reply with quote

I am trying to KEEP WS-VAR1 while Xpediting, but it is just showing the value 'ODO FLD DEP ON INV OR 0' even when some data has been moved to it by another variable in the program. Also value of WS-VAR1 remains the same even after changing the value of subscript WS-COUNTER. Also for normal variables in XPED the value of the variable is editable, whereas value of WS_VAR1 is not editable as well.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Wed May 19, 2010 4:13 pm    Post subject:
Reply with quote

had you bothered to use the INDEXED BY ... clause,
you would not have the problem..........
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sun May 23, 2010 5:24 am    Post subject:
Reply with quote

Hi Gaurav,

You said:
Quote:
...changing the value of subscript WS-COUNTER


I have a feeling you don't understand the concept of ODO.

You are using WS-COUNTER to define the max number of addressable entries allowed for the table. If you want to subscript into the table you have to define another numeric variable.

Read about ODO in the COBOL Language Reference to get an idea of the way it works.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8117
Location: East Dubuque, Illinois, USA

PostPosted: Sun May 23, 2010 7:48 am    Post subject:
Reply with quote

Keep worked fine for me:
Code:
 XPPBC01 ----------------- XPEDITER/TSO - SOURCE ------------------------------
 COMMAND ===>                                                  SCROLL ===> CSR
 PROGRAM: MF0127     MODULE: MF0127   COMP DATE:  05/22/2010 COMP TIME:22:13:24
 000014 K 10 WS-INDEX                        >  02                       DECIMAL
 000013 K 10 WS-COUNTER                      >  02                       DECIMAL
                                                1                         OCCURS
                                                ----+----1----+----2----+----3
 000017 K 15 WS-VAR1                         >  TEST LINE 01
 ------   ------------------------------------------------- Before MF0127:27 <>
 000021 B  PROCEDURE DIVISION.
 000022    S1000-MAIN       SECTION.
 000023        MOVE 'TEST LINE 01'         TO  WS-VAR1 (WS-INDEX).
 000024        ADD 1                       TO  WS-COUNTER
 000025                                        WS-INDEX.
 000026        MOVE 'TEST LINE 02'         TO  WS-VAR1 (WS-INDEX).
 =====>        ADD 1                       TO  WS-COUNTER
 000028                                        WS-INDEX.
 000029        MOVE 'TEST LINE 03'         TO  WS-VAR1 (WS-INDEX).
 000030        ADD 1                       TO  WS-COUNTER
 000031                                        WS-INDEX.
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 REXX to view the PGM or PROC jackzhang75 CLIST & REXX 11 Tue Jun 20, 2017 1:20 am
No new posts Can I traverse a STEM variable? chong.zhou CLIST & REXX 5 Wed May 31, 2017 3:54 pm
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts How to see VIEW definition from BMC c... rohanthengal DB2 1 Thu May 04, 2017 1:50 pm


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