HP3000-L Archives

November 1995, Week 5

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:
Jeff Kell <[log in to unmask]>
Reply To:
Jeff Kell <[log in to unmask]>
Date:
Wed, 29 Nov 1995 13:32:51 EST
Content-Type:
text/plain
Parts/Attachments:
text/plain (51 lines)
Since nobody else followed up on this, I'll take a shot; Steve Elmer can
probably provide the most authoritative answers.  But my two cents...
 
On Wed, 29 Nov 1995 01:26:13 -0400 Chris Bartram said:
> In <[log in to unmask]> [log in to unmask] writes:
>
>> 1. can I run a standard mpe nm program that I built using standard mpe
>> compilers (cobol,pascal,etc) when I am under the posix shell?
>NMPRG files seem to execute fine from the shell, whether they were compiled
>w/posix or not.
 
Yes and no.  If you execute them implicitly (just type their name at the
shell prompt) then yes.  If you need parm= or info= then no, the shell
doesn't pass these structures.  You can't pipe input to or output from them.
You can, however, use the 'callci' shell command to play the usual tricks.
 
>> [Can you use]
>> the standard mpe cobol to create cgi programs that are called by the ncsa
>> http server which I assume is running under posix.
>Nope. CGI uses stdin/stdout files to pass i/o between httpd and the user
>program - to handle the i/o you'll need to use 'c' (COBOL's $stdin does NOT
>equate to posix's idea of stdin). You can run regular MPE-type programs to
>do other work; you'll just need a 'c' program to reroute the i/o (we've done
>this ourselves).
 
Actually all you need to do is 'callci run mpeprog.group.acct' and your
stdin/stdout are hooked to the open httpd socket.  But if you want to do
anything fancy, like get the cgi environment variables, you'll need C to
translate into something you can process.  A form with METHOD=GET posts
stuff into environment variables; but you 'might' get away with a METHOD=POST
with vanilla cobol (doesn't POST write the environment stuff to the socket?).
 
Some of this will be relaxed in 5.5; at least $STDIN/$STDLIST are supposed to
converge with Posix stdin/stdout (note I said converge, not equate).  The MPE
side of things will be able to interact better with sockets (necessary for
telnet server).
 
>> 2. is 'c' the only language that 'plays' in the posix world?
>
>see above. You could probably try Microfocus cobol,but your chances of
>taking ANYTHING developed for MPE and trying to get it to compile under
>Microfocus aren't good. If you're developing new code, use 'c'.
 
The really weird thing is you can (currently) take a relatively simple 'c'
program to display it's args and maybe ctime() or getenv()s, compile it under
MPE and save it, compile it under posix and save it.  Now run both programs
with a few arguments from the shell and from the CI.  You can potentially
get four different results FROM THE SAME SOURCE CODE!
 
Jeff Kell <[log in to unmask]>

ATOM RSS1 RSS2