HP3000-L Archives

December 1995, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Duane Percox <[log in to unmask]>
Reply To:
Duane Percox <[log in to unmask]>
Date:
Tue, 19 Dec 1995 14:18:52 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (60 lines)
>Jeff Kell writes:
 
>I'm trying to setup a web interface for "regular" MPE programs.  Since only
>Posix C appears to be able to "read" the socket, I'm copying fields from the
>CGI environment into a /tmp/filename.  I can use file equations to be able
>to make this work, but I'd much rather stay away from file equations (if
>more than one request comes in at once, the input files could get mixed up
>if there is only one file designator used in the file EQ.  So far no luck.
>
>   callci 'run someprog.pub;stdin=/tmp/filename' yields
>
>HFS names not supported by this parameter. (CIERR 192)
>
>   callci 'run someprog.pub < /tmp/filename' yields
>
>Couldn't open specified $STDIN for program. (CIERR 684)
>
>   callci 'run someprog.pub' < /tmp/filename uses shell STDIN and ignores
>the /tmp/filename completely.
>
>Is there a seamless way to do this, or will I have to risk stepping on some
>file equation?
 
I can offer the following suggestions:
 
1. since the temp file you want to use is just that, who cares if it is
named using hfs? Why not just create a regular old temp file and then use
format #1 of your example: callci 'run someprog.pub;stdin=tmpfile'. This is
offered with the understanding that I don't have 5.0 installed and don't
know if this makes sense given posix rules and such!
 
2. when building files in this environment, consider using a unique id of
the server process (like pin). build all files with the pin in the name, like:
si##### where ##### is the pin number.
 
3. to avoid the single file equation 'thang', have the cobol programs open
the file with 'select cgi-parm-file assign using my-file-name'. You can pass
the server pin to the created son process (in parm=) or use the PROCINFO
intrinsic to get the pin of your father (the server process). Imbed the pin
in the file names.
 
4. create vars with the pin of the server imbedded in them (see 2/3). Then
the mpe program can retrieve the ones just that instance.
 
5. Use my web server (on a different port number if you need both) which
makes all this work without much effort in the mpe world. Of course you
can't easily integrate posix programs! I have a cgi interface that is
'called' so you can put your code in an xl and you get the socket-id passed
to you so you can talk directly to the client (browser) if you wish. I also
have a more traditional son process CGI with stdin/stdlist redirection when
the direct call method won't work.
 
Happy web-serving!
 
Duane Percox  (QSS)
[log in to unmask] (415-306-1608, fax 415-365-2706)
http://www.aimnet.com/~qssnet/
 ftp://ftp.aimnet.com/pub/users/qssnet/
"The best way to have a good idea is to have a lot of ideas." -- Linus Pauling

ATOM RSS1 RSS2