Rexx invoke system utility



IBM's Command List programming language & Restructured Extended Executor

Rexx invoke system utility

Postby nauy » Wed Dec 01, 2010 1:45 pm

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....
nauy
 
Posts: 7
Joined: Tue Nov 09, 2010 1:03 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Rexx invoke system utility

Postby Akatsukami » Wed Dec 01, 2010 4:33 pm

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.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: Rexx invoke system utility

Postby steve-myers » Wed Dec 01, 2010 7:37 pm

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.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: Rexx invoke system utility

Postby dick scherrer » Thu Dec 02, 2010 2:03 am

Hello,

Once you get the process to run, how will the "output" be used?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Rexx invoke system utility

Postby nauy » Fri Dec 03, 2010 12:17 pm

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.
nauy
 
Posts: 7
Joined: Tue Nov 09, 2010 1:03 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Rexx invoke system utility

Postby nauy » Fri Dec 03, 2010 12:18 pm

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 :)
nauy
 
Posts: 7
Joined: Tue Nov 09, 2010 1:03 pm
Has thanked: 0 time
Been thanked: 0 time


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post