[Info-vax] Command Procedure Pipe output to a variable

Jan-Erik Söderholm jan-erik.soderholm at telia.com
Thu Oct 7 07:56:01 EDT 2021


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






More information about the Info-vax mailing list