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
 

 

Requesting help with REXX....
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: Requesting help with REXX....
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Wed Aug 01, 2012 5:04 pm    Post subject: Reply to: Requesting help with REXX....
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    Post subject: Reply to: Requesting help with REXX....
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: 641
Location: Whitby, ON, Canada

PostPosted: Wed Aug 01, 2012 5:11 pm    Post subject:
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    Post subject: Reply to: Requesting help with REXX....
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    Post subject:
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: 641
Location: Whitby, ON, Canada

PostPosted: Wed Aug 01, 2012 5:52 pm    Post subject: Re: Requesting help with REXX....
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

Senior Member


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

PostPosted: Wed Aug 01, 2012 9:28 pm    Post subject: Reply to: Requesting help with REXX....
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    Post subject: Reply to: Requesting help with REXX....
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Thu Aug 02, 2012 3:41 pm    Post subject: Reply to: Requesting help with REXX....
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    Post subject: Reply to: Requesting help with REXX....
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    Post subject:
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
http://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    Post subject: Reply to: Requesting help with REXX....
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    Post subject:
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

Senior Member


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

PostPosted: Thu Aug 02, 2012 7:53 pm    Post subject: Reply to: Requesting help with REXX....
Reply with quote

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

Senior Member


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

PostPosted: Thu Aug 02, 2012 9:47 pm    Post subject: Reply to: Requesting help with REXX....
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    Post subject: Reply to: Requesting help with REXX....
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    Post subject:
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

Site Director


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

PostPosted: Fri Aug 31, 2012 7:40 pm    Post subject: Reply to: Requesting help with REXX....
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    Post subject: Re: Reply to: Requesting help with REXX....
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
This topic is locked: you cannot edit posts or make replies. Need to code a Rexx PGM sundaram.naveen CLIST & REXX 18 Thu Oct 06, 2016 6:45 pm
No new posts Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm


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