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

Requesting help with REXX....


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mymf doubts

New User


Joined: 12 Jul 2012
Posts: 29
Location: India

PostPosted: Wed Aug 01, 2012 4:54 pm
Reply with quote

Hi,

Following is my REXX code...

Code:
/*REXX*/                                             
SAY 'AFTER LINE 1 IN TEST2'                         
ADDRESS ISPEXEC                                     
SAY 'AFTER LINE 2 IN TEST2'                         
"VIEW DATASET('ABCD.IMS.IMSDBC.DBSPACE.D062112')"
SAY 'AFTER LINE 3 IN TEST2'                         
EXIT           


Below is my output with error....

Code:
READY                                                                           
  ISPSTART CMD(%TEST2)                                                         
AFTER LINE 1 IN TEST2                                                           
AFTER LINE 2 IN TEST2                                                           
  ISPP328 Panel 'ISREDDE3' error  -/-Required keylist 'ISRSPEC' in applid 'ISR' was not found.
READY                                                                           
END         


I am trying to run it thru below batch JCL...

Code:
//BATCHCLI EXEC PGM=IKJEFT01                     
//*                                             
//SYSLIST DD SYSOUT=*                           
//SYSTSPRT DD SYSOUT=*                           
//ISPLOG   DD DUMMY                             
//ISPPROF  DD SPACE=(TRK,(5,5,5)),UNIT=SYSDA,   
//             BLKSIZE=3120,LRECL=80,RECFM=FB   
//ISPMLIB  DD DSN=SYS1.MESSAGES,DISP=SHR         
//ISPPLIB  DD DSN=TEST.PANELS,DISP=SHR         
//         DD DSN=SYS1.PANELS,DISP=SHR           
//         DD DSN=TECH.PDS.ISPPLIB,DISP=SHR     
//         DD DSN=TECH.COMM.ISPPLIB,DISP=SHR     
//         DD DSN=DBA.ISPPLIB,DISP=SHR           
//         DD DSN=TECH.ISPPLIB,DISP=SHR         
//ISPSLIB  DD SPACE=(TRK,(5,5,5)),UNIT=SYSDA,   
//             BLKSIZE=3120,LRECL=80,RECFM=FB   
//ISPTLIB  DD DSN=ACSABC.ISPF.ISPPROF.T,DISP=SHR
//         DD DSN=TEST.TABLES,DISP=SHR         
//ISPTABL  DD DUMMY                                     
//SYSPROC  DD DSN=ABCD.SPACE.REPORTS.ISPFCMDS,DISP=SHR
//*                                                     
//SYSTSIN  DD *                                         
  ISPSTART CMD(%TEST2)                                 
/*                                                     



Please help....

Code'd
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Aug 01, 2012 5:04 pm
Reply with quote

Why don't you use Trace? You could review the output and see if that gets you anywhere, else post the output of the trace here. You don't need to put your "displays" in.
Back to top
View user's profile Send private message
mymf doubts

New User


Joined: 12 Jul 2012
Posts: 29
Location: India

PostPosted: Wed Aug 01, 2012 5:05 pm
Reply with quote

More test results....that I should have provided...

Originally I was testing with the below REXX code...

Code:
/*REXX*/                                                             
SAY 'AFTER LINE 1 IN TEST2'                                           
ADDRESS ISPEXEC                                                       
SAY 'AFTER LINE 2 IN TEST2'                                           
"EDIT DATASET('ACSABC.IMS.IMSDBC.DBSPACE.D070912') MACRO("SPACCMDA")"
SAY 'AFTER LINE 3 IN TEST2'                                           
EXIT   

code' d

Idea was to edit the dataset and run the ISREDIT macro named SPACCMDA on the dataset. The macro contains a set of ISPF edit commands.

What I failed to notice was, though my batch job was failing with earlier mentioned error message...it was doing the job!! It was editing the dataset and executing my edit macro on it !! my results were good icon_smile.gif

I still would want to know how to fix the errors I am getting.
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Wed Aug 01, 2012 5:11 pm
Reply with quote

Your VIEW command does not specify a MACRO. Therefore, ISPF will attempt to display the dataset on a panel, which is not possible in batch.
Back to top
View user's profile Send private message
mymf doubts

New User


Joined: 12 Jul 2012
Posts: 29
Location: India

PostPosted: Wed Aug 01, 2012 5:14 pm
Reply with quote

Hi Don,

Below is my original REXX code...

Code:
*REXX*/
SAY 'AFTER LINE 1 IN TEST2'
ADDRESS ISPEXEC
SAY 'AFTER LINE 2 IN TEST2'
"EDIT DATASET('ACSABC.IMS.IMSDBC.DBSPACE.D070912') MACRO("SPACCMDA")"
SAY 'AFTER LINE 3 IN TEST2'
EXIT


code' d


I have specified the MACRO! Please verify.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Wed Aug 01, 2012 5:26 pm
Reply with quote

Code:
SAY 'AFTER LINE 1 IN TEST2'
should be:
SAY 'LINE 1 IN TEST2'

SAY 'AFTER LINE 3 IN TEST2'
should be:
SAY 'AFTER LINE 4 IN TEST2'
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Wed Aug 01, 2012 5:52 pm
Reply with quote

mymf doubts wrote:
Hi,

Following is my REXX code...

Code:
/*REXX*/                                             
SAY 'AFTER LINE 1 IN TEST2'                         
ADDRESS ISPEXEC                                     
SAY 'AFTER LINE 2 IN TEST2'                         
"VIEW DATASET('ABCD.IMS.IMSDBC.DBSPACE.D062112')"
SAY 'AFTER LINE 3 IN TEST2'                         
EXIT           


In your first sample, there is no MACRO in the VIEW command.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2546
Location: Silicon Valley

PostPosted: Wed Aug 01, 2012 9:28 pm
Reply with quote

Quote:
Your VIEW command does not specify a MACRO. Therefore, ISPF will attempt to display the dataset on a panel, which is not possible in batch.

Not only do you need a macro, but the macro needs to have and 'END' statement so that the edit panel does not display.


Code:
ISPP328 Panel 'ISREDDE3' error  -/-Required keylist 'ISRSPEC' in applid 'ISR' was not found.

You do not have the system SISPTLIB dataset in your ISPTLIB concatenation.
Back to top
View user's profile Send private message
mymf doubts

New User


Joined: 12 Jul 2012
Posts: 29
Location: India

PostPosted: Thu Aug 02, 2012 3:28 pm
Reply with quote

Thanks you. I fixed the ISPTLIB issue and it ran fine.

Now, I need to run my REXX as instream JCL...below is what I am trying...

Code:
***************************** Top of Data ******************************
//TTTABCS1 JOB (CTCTCT),'BMC SPACEMON 102503',                         
//         MSGCLASS=X,                                                 
//         CLASS=U,                                                     
//         NOTIFY=TTTABC,REGION=0M                                     
//*                                                                     
//STEP1     EXEC  PGM=IEBUPDTE,PARM=NEW                                 
//SYSPRINT  DD DUMMY                                                   
//SYSUT2    DD DISP=(,PASS),UNIT=SYSDA,SPACE=(TRK,(5,1,1)),             
//             RECFM=FB,LRECL=80,BLKSIZE=0,DSORG=PO                     
//SYSIN     DD *                                                       
./ ADD NAME=REXXSAMP                                                   
  /* REXX */                                                           
  TRACE R                                                               
ADDRESS ISPEXEC                                                         
SAY RC                                                                 
"EDIT DATASET('TTTABC.IMS.IMP1DBC.DBSPACE.D071212')"                   
"ISREDIT MACRO"                                                         
ADDRESS ISREDIT                                                         
"EXCLUDE ALL"                                                         
"F ALL P'¬' 1"                                                         
"F ALL 'DBD NAME'"                                                     
"F ALL '***'"                                                         
"DEL ALL NX"                                                           
"RES"                                                                 
"C ALL 'HID,  ' 'HID,PS'"                                             
"C ALL '    PS' 'HID,PS'"                                             
"C ALL ' ' 'HID,PS' 91"                                               
"SAVE"                                                                 
"END"                                                                 
EXIT                                                                   
/*                                                                     
//*                                                                   
//STEP2     EXEC  PGM=IKJEFT01,PARM='%REXXSAMP',COND=(0,NE)           
//SYSPROC   DD  DSN=*.STEP1.SYSUT2,DISP=(OLD,DELETE)                   
//SYSTSPRT  DD  SYSOUT=*                                               
//SYSTSIN   DD  DUMMY                                                 
//ISPLOG   DD DUMMY                                                   
//ISPPROF  DD SPACE=(TRK,(5,5,5)),UNIT=SYSDA,                 
//             BLKSIZE=3120,LRECL=80,RECFM=FB                 
//ISPMLIB  DD DSN=SYS1.MESSAGES,DISP=SHR                       
//ISPPLIB  DD DSN=SYSTTT.PANELS,DISP=SHR                       
//         DD DSN=SYS1.PANELS,DISP=SHR                         
//         DD DSN=TECH.PDS.ISPPLIB,DISP=SHR                   
//         DD DSN=TECH.COMM.ISPPLIB,DISP=SHR                   
//         DD DSN=DBA.ISPPLIB,DISP=SHR                         
//         DD DSN=TECH.ISPPLIB,DISP=SHR                       
//ISPSLIB  DD SPACE=(TRK,(5,5,5)),UNIT=SYSDA,                 
//             BLKSIZE=3120,LRECL=80,RECFM=FB                 
//ISPTLIB  DD DSN=TTTABC.ISPF.ISPPROF.T,DISP=SHR               
//         DD DSN=SYS2.MEGASSA.ISPTLIB,DISP=SHR               
//         DD DSN=SYS1.TABLES,DISP=SHR                         
//         DD DSN=SYS2.TECH.ISPTLIB,DISP=SHR                   
//         DD DSN=SYS2.OPER.ISPTLIB,DISP=SHR                   
//         DD DSN=TECH.COMM.ISPTLIB,DISP=SHR                   
//ISPTABL  DD DUMMY       

code' d

I am getting following errors...
Code:

     3 *-* ADDRESS ISPEXEC                                         
     4 *-* SAY RC                                                   
       >>>   "RC"                                                   
RC                                                                 
     5 *-* "EDIT DATASET('ACSSKV.IMS.IMP1DBC.DBSPACE.D071212')"     
       >>>   "EDIT DATASET('ACSSKV.IMS.IMP1DBC.DBSPACE.D071212')"   
       +++ RC(-3) +++                                               
     6 *-* "ISREDIT MACRO"                                         
       >>>   "ISREDIT MACRO"                                       
       +++ RC(-3) +++                                               
     7 *-* ADDRESS ISREDIT                                         
     8 *-* "EXCLUDE ALL"                                           
       >>>   "EXCLUDE ALL"                                         
       +++ RC(-3) +++     


code' d

Please help!
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Thu Aug 02, 2012 3:41 pm
Reply with quote

we moderators are getting fed up of editing Your posts to add the code tags

one more and You are out icon_evil.gif
Back to top
View user's profile Send private message
mymf doubts

New User


Joined: 12 Jul 2012
Posts: 29
Location: India

PostPosted: Thu Aug 02, 2012 4:12 pm
Reply with quote

Sorry! I never realised that it is something I need to do! Will take care of it in future.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Thu Aug 02, 2012 5:31 pm
Reply with quote

I notice that you are using IEBUPDTE to create a proclib member.

why don't you use iebgener to take your INSTREAM REXX Script
and make it part of your SYSPROC (which seems to be short a few items).

this is a link to doug nadels site
www.sillysot.com/mvs/
and then look for "BATCH PDF", then click on that link.

this is a direct link for his code for BATCHPDF,
which I think will do a better job of building your JCL for you.

your error codes indicate that you do not have all the proper libraries allocated to your batch job step......
Back to top
View user's profile Send private message
mymf doubts

New User


Joined: 12 Jul 2012
Posts: 29
Location: India

PostPosted: Thu Aug 02, 2012 6:11 pm
Reply with quote

Thank You. I will try your link.

Also, I will try putting all the libraries from TSO ISRDDN. The same REXX script works when I have them coded in the PDS as members, but it fails when I try instream!
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Thu Aug 02, 2012 6:19 pm
Reply with quote

before you start anything new.

include all the libraries you find from ISRDDN.
and as a last to SYSPROC,
concatenate your output from the IEBUPDTE step
// DD DSN=*.STEP1.SYSUT2,DISP=(OLD,DELETE)

but change your disp to shr.
it is a temp file, will be deleted at end of job anyway.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2546
Location: Silicon Valley

PostPosted: Thu Aug 02, 2012 7:53 pm
Reply with quote

You need to start ISPF.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2546
Location: Silicon Valley

PostPosted: Thu Aug 02, 2012 9:47 pm
Reply with quote

Your first post include the ISPSTART, which starts ISPF
Code:
//SYSTSIN  DD *                                         
  ISPSTART CMD(%TEST2)                                 
/*   


But the subsequent post did not have it.
Back to top
View user's profile Send private message
mymf doubts

New User


Joined: 12 Jul 2012
Posts: 29
Location: India

PostPosted: Thu Aug 23, 2012 4:43 pm
Reply with quote

Thank you Pedro.

I had to use IKJEFT01 and ISPSTART. It worked fine.
Back to top
View user's profile Send private message
parsesource

New User


Joined: 06 Feb 2006
Posts: 97

PostPosted: Fri Aug 31, 2012 7:29 pm
Reply with quote

* you have to ISPSTART your rexx skript.
* the first dsn of isptlib should be a temporary dataset to avoid enq-issues with other batch jobs using the same concatenation at the same time.
* your script will not work this way. the code starting with ISREDIT MACRO must be in a separate member. the EDIT command must point to this member (MACRO(...))

* in your first example you use ... MACRO("SPACCMDA") ... this only works, bec. you are not using SIGNAL ON NOVALUE. use ' instead of "
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: Fri Aug 31, 2012 7:40 pm
Reply with quote

Hello,

You Did notice that TS has posted it was working . . . icon_wink.gif

d
Back to top
View user's profile Send private message
parsesource

New User


Joined: 06 Feb 2006
Posts: 97

PostPosted: Fri Aug 31, 2012 7:52 pm
Reply with quote

dick scherrer wrote:
Hello,

You Did notice that TS has posted it was working . . . icon_wink.gif

d


i saw it too late. still do not believe that it will work this way. will test it on monday. icon_smile.gif
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Fri Aug 31, 2012 8:08 pm
Reply with quote

parsesource wrote:
dick scherrer wrote:
Hello,

You Did notice that TS has posted it was working . . . icon_wink.gif

d


i saw it too late. still do not believe that it will work this way. will test it on monday. icon_smile.gif
The TS changed his story so often in this thread I am not sure what he is running now. First the macro was in, and then it was out, sometimes he used ISPSTART sometimes he didn't, then the macro was instream..... all over the map.
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: Fri Aug 31, 2012 8:36 pm
Reply with quote

Hi Don,

Yup - i was only going by mymfdoubts last reply . . . icon_neutral.gif

d
Back to top
View user's profile Send private message
mymf doubts

New User


Joined: 12 Jul 2012
Posts: 29
Location: India

PostPosted: Wed Oct 03, 2012 5:33 pm
Reply with quote

Hello All,

As I said earlier...It is working just fine with IKJEFT01 and ISPSTART!!

Below is my working JCL...

Code:

//SYSSYS1L JOB (1TOL0160),'7119-SRI',                                   
//  MSGCLASS=X,CLASS=S,REGION=5M,NOTIFY=SYSSYS1                         
//*WORKING EXAMPLE!!!!!!!!!!!!                                         
//*WORKING EXAMPLE!!!!!!!!!!!!                                         
//*_____________________________________________________________________
//*                                                                     
//* FIRST IEBUPDTE CREATES MEMBER TEST3 FROM SYSIN                     
//* SECOND IEBUPDTE CREATES MEMBER TEST4 WHICH IS USED AS MACRO IN TEST3
//* THIRD STEP INVOKES TEST3 REXX MEMBER                               
//*_____________________________________________________________________
//*WORKING EXAMPLE!!!!!!!!!!!!                                         
//*WORKING EXAMPLE!!!!!!!!!!!!                                         
//STEP1     EXEC  PGM=IEBUPDTE,PARM=NEW                                 
//SYSPRINT  DD DUMMY                                                   
//SYSUT2    DD DSN=SYSSYS1.ISPFCMDS(TEST3),DISP=SHR                     
//SYSIN     DD *                                                       
./         ADD   NAME=TEST3                                             
  /* REXX */                                                 
  TRACE A                                                   
  ADDRESS ISPEXEC                                           
"EDIT DATASET('SYSSYS1.SYSLOG.PTSD') MACRO("TEST4")"         
EXIT                                                         
//STEP2     EXEC  PGM=IEBUPDTE,PARM=NEW                     
//SYSPRINT  DD DUMMY                                         
//SYSUT2    DD DSN=SYSSYS1.ISPFCMDS(TEST4),DISP=SHR         
//SYSIN     DD *                                             
./         ADD   NAME=TEST4                                 
  /*REXX*/                                                   
  TRACE A                                                   
"ISREDIT MACRO"                                             
ADDRESS ISREDIT                                             
"EXCLUDE ALL"                                               
"F ALL 'ALLOC  FAILS'"                                       
"DEL X ALL"                                                 
"RES"                                                       
"SAVE"                                                       
"END"                                                       
EXIT                                                         
/*                                                           
//*                                                         
//STEP3     EXEC  PGM=IKJEFT01                               
//SYSPROC   DD  DSN=SYSSYS1.ISPFCMDS,DISP=SHR               
//SYSTSPRT  DD  SYSOUT=*                                     
//ISPLOG   DD DUMMY                                         
//ISPPROF  DD SPACE=(TRK,(5,5,5)),UNIT=SYSDA,               
//             BLKSIZE=3120,LRECL=80,RECFM=FB               
//ISPMLIB  DD DSN=SYS1.MESSAGES,DISP=SHR                     
//         DD DSN=SYS2.MESSAGES,DISP=SHR                     
//ISPPLIB  DD DSN=SYS2.PANELS,DISP=SHR                       
//         DD DSN=SYS1.PANELS,DISP=SHR                       
//ISPSLIB  DD SPACE=(TRK,(5,5,5)),UNIT=SYSDA,               
//             BLKSIZE=3120,LRECL=80,RECFM=FB               
//ISPTLIB  DD DSN=SYSSYS1.ISPF.ISPPROF.T,DISP=SHR           
//         DD DSN=SYS2.TABLES.DCUF,DISP=SHR   
//         DD DSN=SYS1.TABLES,DISP=SHR       
//ISPTABL  DD DUMMY                           
//SYSTSIN  DD  *                             
 ISPSTART CMD(%TEST3)                         
/*                                           


Thank You all again icon_smile.gif
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Execute secondary panel of sdsf with ... CLIST & REXX 1
Search our Forums:

Back to Top