View previous topic :: View next topic
|
Author |
Message |
vvmanyam
New User
Joined: 16 Apr 2008 Posts: 86 Location: Bangalore
|
|
|
|
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 |
|
 |
ofer71
Global Moderator

Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Read the manual carefully regarding the attributtes (LRECL, BLKSIZE) of OUTDD.
O. |
|
Back to top |
|
 |
vvmanyam
New User
Joined: 16 Apr 2008 Posts: 86 Location: Bangalore
|
|
|
|
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 |
|
 |
ofer71
Global Moderator

Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Yes. ISPF User Guide, Vol. 2
O. |
|
Back to top |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
 |
Marso
REXX Moderator

Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
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 |
|
 |
Marso
REXX Moderator

Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
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 |
|
 |
MBabu
Active User
Joined: 03 Aug 2008 Posts: 400 Location: Mumbai
|
|
|
|
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 |
|
 |
vvmanyam
New User
Joined: 16 Apr 2008 Posts: 86 Location: Bangalore
|
|
|
|
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 |
|
 |
MBabu
Active User
Joined: 03 Aug 2008 Posts: 400 Location: Mumbai
|
|
|
|
Glad it is working. Your observations are fine. Thanks you for the update |
|
Back to top |
|
 |
|