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
 

 

Inserting statements into pgms thru REXX

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
mainfrae
Currently Banned

New User


Joined: 07 Feb 2006
Posts: 4

PostPosted: Tue Feb 07, 2006 12:31 am    Post subject: Inserting statements into pgms thru REXX
Reply with quote

Hi all
My requirement is like , i am having a cobol program with some errors.To identify the errors , i will make use of display statements to see what value is moving into variables etc. So now instead of writing display statement in all places,Is there any way to insert display statements into the corresponding lines of a program through REXX? If possible ,sent me the sample code please.

Thanks
sundkum
Back to top
View user's profile Send private message

nuck

New User


Joined: 09 Dec 2005
Posts: 33

PostPosted: Fri Mar 17, 2006 6:16 pm    Post subject:
Reply with quote

read up on how to create edit macros in the REXX docs, then write yourself a 'cobdisp' and a 'dcobdisp' .... basically an edit macro that searches for where you want your displays to be inserted (eg. after section names to indicate entry) and then inserts them. I've done this before with CLISTs, so it must be possible with rexx.
Back to top
View user's profile Send private message
martin9

Active User


Joined: 01 Mar 2006
Posts: 287
Location: Basel, Switzerland

PostPosted: Fri Mar 17, 2006 7:39 pm    Post subject:
Reply with quote

hy mainfrae,

of course you could do it that way,
but you are much faster, if you code
the displays directly into yout program.
what you can do also:
on the line with the display command, make a D
in position 7 and give in your identification
division DEBUG, then after compiling you get
these displays. without DEBUG the compiler
neglects the displays...

*** DEBUGGING MODE ***

Debugging mode is specified by adding the WITH DEBUGGING MODE clause to
the SOURCE-COMPUTER paragraph of the CONFIGURATION SECTION.

Debugging mode works in conjunction with special debugging lines coded
within the source program. A line is considered to be a debugging line
if it contains a 'D' in the indicator area (column 7).

When WITH DEBUGGING MODE is specified, each debugging line is compiled
(i.e., included in the object program as if it were a normal
statement). When WITH DEBUGGING MODE is not specified, debugging lines
are syntax checked but are not compiled into the object program.

Debugging lines can be used, for example, to check the value of a given
data item at certain points within the program.

Debugging lines can be placed anywhere within a program after the
SOURCE-COMPUTER paragraph.

martin9
Back to top
View user's profile Send private message
nuck

New User


Joined: 09 Dec 2005
Posts: 33

PostPosted: Mon Mar 20, 2006 11:46 am    Post subject:
Reply with quote

remember to be careful with using 'DEBUG MODE' - if you put code that changes variable values with a 'D' in col. 7, then you might end up with a program that works perfectly in test, but bombs when the debugging mode is turned off (and yes, this is someone who is speaking from experience!)

For example, the site that I am currently on does not allow debug mode - some of the people here have never even heard of it.

ralph
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm
No new posts Inserting records based on conditions vickey_dw DFSORT/ICETOOL 9 Wed Feb 22, 2017 1:33 pm
No new posts REXX compiled via RXTCOMP sergeyken CLIST & REXX 7 Tue Feb 07, 2017 9:41 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm


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