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
 

 

REXX - Put display in COBOL Program Using REXX

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
rsnram007

New User


Joined: 28 Jan 2009
Posts: 11
Location: chennai

PostPosted: Tue Mar 24, 2009 12:42 pm    Post subject: REXX - Put display in COBOL Program Using REXX
Reply with quote

Hi,

i took below REXX from our FORUM which is used to put display in COBOL program.

Code:
/* REXX */                                                             
/*                                           */                         
/* DISPLAYS THE PARAGRAPH NAMES IN A COBOL PGM */                       
/* IT WORKS IF THE EDIT MODE IS NUM ON STD OR NUM OFF             */   
/*                                           */                         
 ISREDIT MACRO                                                           
 ADDRESS ISREDIT  "F 'PROCEDURE DIVISION' 8 FIRST"                       
 ADDRESS ISREDIT  "F P'¬' 8"                                             
 DO UNTIL RC > 0                                                         
    ADDRESS ISREDIT  "(THELINE) = LINE .ZCSR"                           
     IF  POS("EXIT",THELINE) = 0                                 
   &   POS("*",THELINE) = 0 ,                                   
   &   POS("-INC",THELINE) = 0 ,                                 
   &   POS("COPY",THELINE) = 0                                   
   THEN                                                         
     DO                                                               
       PARSE VAR THELINE NUM  " " LINE1 "." LINE2                     
       LINE3 = STRIP(LINE1,'L'," ")                                   
   ADDRESS ISREDIT "LINE_AFTER .ZCSR = '           DISPLAY '"LINE3"''" 
     END                                                               
   ADDRESS ISREDIT  "F P'¬' 8"                                         
END                                                                     


I opend my COBOL program in EDIT mode after i execute the REXX code. i got return code zero even though i did not get the excepted result ( displays are not in the program ).

I am new to REXX. Can anyone sort out of this?

Thanks in Advance

Regards,
Suresh
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Mar 24, 2009 12:47 pm    Post subject:
Reply with quote

Where do you insert the DISPLAY into the cobol program ?
Back to top
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Tue Mar 24, 2009 1:11 pm    Post subject:
Reply with quote

try changing

Code:

 IF  POS("EXIT",THELINE) = 0                                 


for

Code:

 IF  POS("EXIT",THELINE) = 0  ,                                 


hth
Back to top
View user's profile Send private message
rsnram007

New User


Joined: 28 Jan 2009
Posts: 11
Location: chennai

PostPosted: Wed Mar 25, 2009 10:04 am    Post subject: Reply to: REXX - Put display in COBOL Program Using REXX
Reply with quote

Hi,

I want to put display after every section in Procedure Division.

I did above Changes in my Code.now i did not get the exepected result.



Thanks,
Suresh
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Mar 25, 2009 10:10 am    Post subject:
Reply with quote

Hello,

You need to post the actual code you are using as well as the undesired output. If any messages were presented, post the message and the id.

For readability, please use copy/paste and the "Code" tag (this also preserves alighment).

Suggest you use a very small program as the sample.
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Wed Mar 25, 2009 7:41 pm    Post subject:
Reply with quote

Quote:
/* IT WORKS IF THE EDIT MODE IS NUM ON STD OR NUM OFF */

Use Profile to check to see if you have "NUM ON COB", if so use "NUM OFF" then try the REXX again.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Wed Mar 25, 2009 8:04 pm    Post subject:
Reply with quote

why not include a save of the profile, change the profile, and a change to original profile in the REXX?
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Wed Mar 25, 2009 9:49 pm    Post subject: Re: REXX - Put display in COBOL Program Using REXX
Reply with quote

rsnram007 wrote:
i did not get the excepted result ( displays are not in the program ).
And what were those unexpected results, please tell us . . .
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 -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts RULES(NOEVENPACK) in cobol jackzhang75 COBOL Programming 5 Wed Mar 29, 2017 12:47 am
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts Display FTP Session Count within TSO Yolanda Harvey TSO/ISPF 3 Fri Mar 10, 2017 10:31 pm
No new posts To display values of multiple rows in... vinu78 DB2 2 Thu Mar 09, 2017 1:20 pm
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am


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