IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

REXX - Put display in COBOL Program Using REXX


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
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
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: 8797
Location: Welsh Wales

PostPosted: Tue Mar 24, 2009 12:47 pm
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
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
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

Moderator Emeritus


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

PostPosted: Wed Mar 25, 2009 10:10 am
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
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
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

Superior Member


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

PostPosted: Wed Mar 25, 2009 9:49 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Using API Gateway from CICS program CICS 0
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
Search our Forums:

Back to Top