[Info-vax] Command Procedure Pipe output to a variable
HCorte
hmmbcorte at gmail.com
Thu Oct 7 10:36:53 EDT 2021
A quinta-feira, 7 de outubro de 2021 à(s) 12:56:03 UTC+1, Jan-Erik Söderholm escreveu:
> Den 2021-10-07 kl. 13:18, skrev HCorte:
> > Thanks for that lexical function to obtain the error message, seems as stated the program is using mailbox so as documented can't use lib$spawn.
> > https://wiki.vmssoftware.com/SPAWN
> >
> > 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?
> >
> > Tried
> >
> > PROGRAM CRESUBPROC
> > IMPLICIT NONE
> >
> > C INCLUDE '($SSDEF)'
> > C INCLUDE '(lib$routines)'
> > C INCLUDE '($stsdef)'
> > C INCLUDE '($IODEF)'
> > C INCLUDE '($SYSSRVNAM)'
> >
> > INTEGER*4 STAT,pidadr,SYS$CREPRC,SYS$INPUT,SYS$OUTPUT
> >
> > STAT = SYS$CREPRC(pidadr,'@script',
> > * SYS$INPUT,
> > * SYS$OUTPUT,
> > * SYS$OUTPUT,,,,,,,)
> > PRINT *,'PID Number:',pidadr
> > PRINT *,'Status',STAT
> >
> > END
> >
> > that returns 1 as sucess but the command procedure should add a job to lnm$job table that is not happenning
> > sh log /table=lnm$job.
> >
> I think that answer is to use SYS$SYSTEM:LOGINOUT.EXE as the image to run
> and your COM file as the SYS$INPUT parameter.
>
> Much like when you do:
>
> $run/noaut -
> /process_name=<proc name> -
> /input=<your COM file> -
> /out=<some LOG file> -
> sys$system:loginout.exe
Thanks Jan thats it, SYS$SYSTEM:LOGINOUT.EXE saw in the documentation but didn't cross my mind to put the script as input...
More information about the Info-vax
mailing list