[Info-vax] Command Procedure Pipe output to a variable
VAXman- at SendSpamHere.ORG
VAXman- at SendSpamHere.ORG
Thu Oct 14 08:16:12 EDT 2021
In article <b9501f00-264d-4dc4-b3a3-5bce5e72cb80n at googlegroups.com>, HCorte <hmmbcorte at gmail.com> writes:
>A quinta-feira, 7 de outubro de 2021 =C3=A0(s) 12:18:39 UTC+1, HCorte escre=
>veu:
>> Thanks for that lexical function to obtain the error message, seems as st=
>ated the program is using mailbox so as documented can't use lib$spawn.=20
>> https://wiki.vmssoftware.com/SPAWN=20
>>=20
>> As alternative in https://vmssoftware.com/docs/VSI_PROGRAM_CONCEPTS_VOL_I=
>..pdf the use of sys$creprc but have a question that is this routine can run=
> a command procedure instead of a image?=20
>>=20
>> Tried=20
>>=20
>> PROGRAM CRESUBPROC=20
>> IMPLICIT NONE=20
>>=20
>> C INCLUDE '($SSDEF)'=20
>> C INCLUDE '(lib$routines)'=20
>> C INCLUDE '($stsdef)'=20
>> C INCLUDE '($IODEF)'=20
>> C INCLUDE '($SYSSRVNAM)'=20
>>=20
>> INTEGER*4 STAT,pidadr,SYS$CREPRC,SYS$INPUT,SYS$OUTPUT=20
>>=20
>> STAT =3D SYS$CREPRC(pidadr,'@script',=20
>> * SYS$INPUT,=20
>> * SYS$OUTPUT,=20
>> * SYS$OUTPUT,,,,,,,)=20
>> PRINT *,'PID Number:',pidadr=20
>> PRINT *,'Status',STAT=20
>>=20
>> END=20
>>=20
>> that returns 1 as sucess but the command procedure should add a job to ln=
>m$job table that is not happenning=20
>> sh log /table=3Dlnm$job.
>
>Lawrence as I have stated here can't use lib$spawn because of the use of mailboxs.
Why do you believe you can not use VMS mailbox(es) with LIB$SPAWN? I've used many
a mailbox with LIB$SPAWN. I've also used regular terminals (TTcn:), LAT terminals
(LTAn:) and pseudoterminals (FTAn:) with LIB$SPAWN. DCL itself uses mailboxes when
SPAWNing subprocesses and LIB$SPAWN is simply a wrapper around the SYS$CLI service
with a request code of CLI$K_CLISERV and a service code of CLI$K_SPAWN.
--
VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)ORG
I speak to machines with the voice of humanity.
More information about the Info-vax
mailing list