Page 1 of 1

Rexx invoke system utility

PostPosted: Wed Dec 01, 2010 1:45 pm
by nauy
hi all,
I try to use rexx invoke a utility,ie IEHLIST to list a VTOC and it turns out wrong control card... the source code is below.
 
/*REXX*/                                                         
 TRACE ?R                                                         
 "ALLOC DATASET('USERID.OUTPUT') FILE(SYSPRINT) SHR"         
 "ALLOC DATASET('USERID.INPUT') FILE(SYSIN)  SHR"           
 PARM="SYSIN SYSPRINT"                                             
 ADDRESS LINKMVS "IEHLIST" PARM                                   
 SAY "RC=" RC                                                     
 "FREE FI(SYSPRINT)"                                               
 "FREE FI(SYSIN)"                                                 
 EXIT                                                             


And I put the utility control statement "LISTVTOC VOL=3390=USER02" in the sequential dataset USERID.INPUT
the RC = 8
message is IEH103I INVALID CONTROL CARD---LISTVTOC VOL=3390=6FCAT1
I don't know why it is invalid....

Re: Rexx invoke system utility

PostPosted: Wed Dec 01, 2010 4:33 pm
by Akatsukami
The run-time parameter is invalid.

Is USERID.INPUT allocated with RECFM=F or FB and LRECL=80?

I don't see an allocation for USER02, although that's not immediately relevant.

Re: Rexx invoke system utility

PostPosted: Wed Dec 01, 2010 7:37 pm
by steve-myers
The format of the control statement is

[blank]LISTVTOC[blank]VOL=3390=USER02

I don't see you storing any sort of control statement into USER.INPUT.

As Akatsumi says you need a DD statement for volume USER02, which is not easy to do in TSO.

The proper way to start IEHLIST in TSO is to use the CALL command, not to start it as a TSO command:

CALL *(IEHLIST)

What on earth do you hope to accomplish? You will find IEHLIST's output is nearly useless. I haven't run IEHLIST LISTVTOC for many years!

You may find it easier to prepare and submit a batch job.

Re: Rexx invoke system utility

PostPosted: Thu Dec 02, 2010 2:03 am
by dick scherrer
Hello,

Once you get the process to run, how will the "output" be used?

Re: Rexx invoke system utility

PostPosted: Fri Dec 03, 2010 12:17 pm
by nauy
steve-myers wrote:The format of the control statement is

[blank]LISTVTOC[blank]VOL=3390=USER02

I don't see you storing any sort of control statement into USER.INPUT.

As Akatsumi says you need a DD statement for volume USER02, which is not easy to do in TSO.

The proper way to start IEHLIST in TSO is to use the CALL command, not to start it as a TSO command:

CALL *(IEHLIST)

What on earth do you hope to accomplish? You will find IEHLIST's output is nearly useless. I haven't run IEHLIST LISTVTOC for many years!

You may find it easier to prepare and submit a batch job.


Thank you. I forgot the blank at the beginning of the control statement. :(
And I know using the JCL is more common but I have to invoke it in rexx :( and I will try the CALL command later.

Re: Rexx invoke system utility

PostPosted: Fri Dec 03, 2010 12:18 pm
by nauy
dick scherrer wrote:Hello,

Once you get the process to run, how will the "output" be used?



I just want the data set's information residing on a particular volume :)