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
 

 

Invoking Superc in rexx

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

New User


Joined: 16 Apr 2008
Posts: 86
Location: Bangalore

PostPosted: Mon Mar 16, 2009 5:06 pm    Post subject: Invoking Superc in rexx
Reply with quote

Hi friends,
I want to invoke 3.13(superce) through rexx

I have done it like this:
Code:

/* REXX */                                                             
ADDRESS TSO                                                           
ISREDIT MACRO                                                         
NEWDD1 =  'TEST.JCL(JCL10)'                                           
OLDDD1 =  'ACTUAL.JCL(JCL10)'                                         
"ALLOC FI(NEWDD) DA('"NEWDD1"') REUSE SHR "                           
"ALLOC FI(OLDDD) DA('"OLDDD1"') REUSE SHR "                           

OUTDD = 'SUPERC.JCL10.TEST'                                         
ADDRESS TSO                                                         
  "DELETE '"||OUTDD||"'"                                             
   IF RC ¬= 0 THEN                                                     
      DO                                                               
        SAY 'PLEASE CLOSE THE DATASET :' OUTDD                         
        EXIT                                                           
      END                                                             
 "ALLOC DA('"OUTDD"') F(OUTFIL) NEW RECFM(F,B)                       
                LRECL(80) SPACE(1000,500) BLKSIZE(0)"               
 SAY "RETURN CODE1"  RC             
                                 
PARMS = 'DELTAL,LINECMP,'' SEQ'','''''                             
ADDRESS ISPEXEC "SELECT PGM(ISRSUPC) PARM("PARMS")"                   
 SAY "RETURN CODE2"  RC                                               
EXIT                                                                   

It is returning a code of 24(RETURN CODE2),
which says "Error occurred during open or during writing to the listing data set" in the materials.
but allocation of OUTDD is successful.
Please let me know where exactly the issue is!

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

ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Mon Mar 16, 2009 5:14 pm    Post subject:
Reply with quote

Read the manual carefully regarding the attributtes (LRECL, BLKSIZE) of OUTDD.

O.
Back to top
View user's profile Send private message
vvmanyam

New User


Joined: 16 Apr 2008
Posts: 86
Location: Bangalore

PostPosted: Mon Mar 16, 2009 5:30 pm    Post subject:
Reply with quote

I refered the manual "TSO/E REXX User's Guide" for the above code

Why I didn't get a doubt at that point is the allocation of dataset is succesfully done.
The return code is 24 only while calling 'ISRSUPC'

Can you please sugesst a reference manual where exactly I can find more details on allocation.

Thanks,
Balu
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Mon Mar 16, 2009 5:32 pm    Post subject:
Reply with quote

Yes. ISPF User Guide, Vol. 2

O.
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: Mon Mar 16, 2009 8:41 pm    Post subject:
Reply with quote

Hello,

Quote:
Why I didn't get a doubt at that point is the allocation of dataset is succesfully done.
This is basically the same as putting a dd statement in jcl that is needed by a program, but having the wrong attributes specified. It does not jcl error (same as the allocate did not fail) because the syntax of the jcl is valid. The problem occurs when an attempt is made to open the file.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1224
Location: Israel

PostPosted: Mon Mar 16, 2009 9:30 pm    Post subject:
Reply with quote

Did you forgot to tell SuperC what you are looking for ?

You are calling ISRSUPC without providing process statements (SRCHFOR, DPLINE, CMPLINE and SELECT are some of them)
They should be put in a SYSIN file. Here is an example:
Code:
Queue " CMPLINE  NTOP 'WORKING',8"
Queue " CMPLINE  NBTM 'PROCEDURE',8"
Queue " SRCHFOR ' COPY '"
"EXECIO 3 DISKW SYSIN (FINIS"
this will tell SuperC to look for COPY statements within the working-storage of COBOL programs.

NB. I haven't executed this code. It may need some tweaking before it works.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1224
Location: Israel

PostPosted: Mon Mar 16, 2009 9:42 pm    Post subject:
Reply with quote

Ooops, forgot that SuperC can be used also to compare files.
You won't believe how many searches I did with that tool...

Anyway, even a compare may need a few process statements, so it's not all lost!
Back to top
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 401
Location: Mumbai

PostPosted: Tue Mar 17, 2009 9:41 am    Post subject: Reply to: Invoking Superc in rexx
Reply with quote

many problems. You are using high level qualifiers you probably can't write to. You have no SYSIN allocation. All those quotes in the PARMS variable look like you just copied them from JCL but that is JCL syntax used to create parms that span a single line. You don't need those quotes. This won't work if the list data set does not exist because your delete will fail. OUTFIL is not a data set that SUPERC knows about. Files are not freed at the end so other users may have trouble after you run this. I assume some of these problems are just code left out to keep the small sample though. Anyway, here is a small restructure:
Code:
/* Rexx */

Address isredit "MACRO"
Address tso
newdd1 = "YOURID.SOME.JCL(JCL10)"
olddd1 = "YOURID.OTHER.JCL(JCL11)"
"ALLOC FI(NEWDD) DA('"newdd1"') REUSE SHR "
"ALLOC FI(OLDDD) DA('"olddd1"') REUSE SHR "
"ALLOC FI(SYSIN) DUMMY          REUSE SHR "

outdd = "YOURID.OUTPUT.LISTING"
Address tso
If "OK" == sysdsn("'"outdd"'") Then
  Do
    "DELETE '" || outdd || "'"
    If rc <> 0 Then
      Do
        Say "PLEASE CLOSE THE DATASET :" outdd
        "FREE F(NEWDD,OLDDD,SYSIN)"
        Exit
      End
  End
"ALLOC DA('"outdd"') F(OUTDD) NEW RECFM(F,B)",
    "LRECL(80) SPACE(5,10) TRACK BLKSIZE(0)"

parms = "DELTAL,LINECMP,SEQ"
Address ispexec "SELECT PGM(ISRSUPC) PARM("parms")"
Say "RETURN CODE2" rc
Exit
Back to top
View user's profile Send private message
vvmanyam

New User


Joined: 16 Apr 2008
Posts: 86
Location: Bangalore

PostPosted: Tue Mar 17, 2009 5:07 pm    Post subject:
Reply with quote

Thanks alot MBabu for your detailed post.
Its working fine.

Quote:

Having the wrong attributes specified,The problem occurs when an attempt is made to open the file

But here I have tried to open the file through ISPF 3.4 option, I was able to view the empty file. so, I came to conlcusion that the file allocation is fine.

Quote:

You are using high level qualifiers you probably can't write to

I just gave some qualifiers for easy understanding instead of giving my system specific names. But Higher qualifier need not be user id always right!

Quote:

You have no SYSIN allocation

I think for superc process, it is not madatory that we have to allocate SYSIN, even with out sysin the code is working.

Quote:

quotes in the PARMS variable look like you just copied them from JCL

Yes, As I was unable to debug the code I tried to pass all the parameters in the parms just as we pass them in a jcl. Though these invalid parms arejust showing warnings in the final output listing as
"PROCESS OPTION PARAMETER IS NOT A VALID PROCESS OPTION. IT IS IGNORED"
Quote:

won't work if the list data set does not exist because your delete will fail.

Yaa, I have added the status check of the dataset before deleting the dataset.
Quote:

OUTFIL is not a data set that SUPERC knows about

Yes .. this is the blunder that I have commited in the code, when I changed that from OUTFIL to OUTDD, the code stated working fine with some warnings.

Please correct me if I am wrong.

Thanks,
Balu
Back to top
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 401
Location: Mumbai

PostPosted: Tue Mar 17, 2009 8:13 pm    Post subject: Reply to: Invoking Superc in rexx
Reply with quote

Glad it is working. Your observations are fine. Thanks you for the update
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 Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 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
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 7 Fri Nov 18, 2016 1:48 pm


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