nagy%warner.hepnet@LBL.ARPA.UUCP (06/14/87)
>Les Flodrowski >Social Science Computing Lab >University of Western Ontario > We are having an unusual problem when trying to use CLI$DCL_PARSE from a >detached process. The detached process gets created using the RUN/DETACHED... >DCL command. The error returned when we try to parse a line from an >initialization file that the program uses is: > > %CLI-E-INVREQTYP, invalid request type > > The *ODD* thing is that when the program is run interactively or via a BATCH >command file, it works without error. It only gets the error when it is >run detached. Not knowing any further details, here's my guess about this problem... The CLI routines require that the DCL command line interpreter be present in your process (its linked into your P1 space at process startup by the LOGINOUT image). This is standard for interactive and batch jobs; which explains your "odd thing". However, I assume you are running your program as a detached process by a command like: $ RUN /DETACHED program.exe So the detached process consists of just the program image AND DCL IS NOT PRESENT! That's the problem, no DCL interpreter for the CLI routines to "callback" to and so the CLI routines do not work. There is a workaround; its to execute LOGINOUT.EXE in your detached process so DCL will be part of the process. Part of the answer is to modify your RUN command to look like: $ RUN /DETACHED /INPUT=disk:[directory]commands.com - SYS$SYSTEM:LOGINOUT.EXE where the file commands.com contains a single line: $ run disk:[directory]program.exe to execute the image you were initially running by itself in the detached process. WARNING **** Beware that you don't use process-specific logical names in the /INPUT qualifier or the RUN command in the commands.com file! These file specifications are interpreted in the context of the detached process which will be missing such logical name definitions and might also not have the same (if any) default directory set! AND A DISCLAIMER: Lastly, I'm not sure if you need any other qualifiers added to the RUN /DETACHED command above to prevent LOGINOUT from prompting for a username and password. It's been awhile since I've done this and I've forgotten exactly what I had to do to get it to work (besides, that was back under VMS V3.x anyway!). But the basic idea is correct. = Frank J. Nagy = Fermilab Research Division EED/Controls = HEPNET: WARNER::NAGY (43198::NAGY) or FNAL::NAGY (43009::NAGY) = BitNet: NAGY@FNAL = USnail: Fermilab POB 500 MS/220 Batavia, IL 60510