Solved

CCI + Application software

Posted on 1997-05-16
8
180 Views
Last Modified: 2013-12-25
I have a fortran Application which I would like people using the web
to be able to submit data and send it to the Program which uses the
input and then sends the output from the program back to the web.
Similar to unix shell would be
program <input >output      where input is from a form and output goes back to the web.
HOW? What script do I use to set up the interface? Is there a script already in use that can be used?
0
Comment
Question by:ceemgs1
8 Comments
 
LVL 5

Expert Comment

by:julio011597
ID: 1828021
And your problem is?
-julio
0
 

Expert Comment

by:idstech
ID: 1828022
Is this jeopardy? :)
0
 
LVL 2

Expert Comment

by:n3mtr
ID: 1828023
The web server does all this for you if you have your program setup as a cgi program.  It will send the data from the web form on the standard input and you send out the html data on the output.  You need to be able to read the data from the web server, its in a special format.  As for output you can output HTML or text or a picture.
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 

Author Comment

by:ceemgs1
ID: 1828024
Edited text of question
0
 

Author Comment

by:ceemgs1
ID: 1828025
Edited text of question
0
 

Author Comment

by:ceemgs1
ID: 1828026
I have a Frotran program which requires to be put on the web.
I have no access to the source of this program. I would like to
know if there is script available that will handle the form input
and send it to the Fortran program and inturn send the results
back to the web?
I hope this helps more.
0
 
LVL 5

Expert Comment

by:julio011597
ID: 1828027
It is strongly dependent on which input/output format your Fortran program needs/generates.

Technically, it's just a matter of building a CGI program which:

- gets infos from a form;
- reformats infos as needed by the Fortran prog;
- opens a pipe to that prog;
- writes infos to the pipe, reads back the answer;
- formats answer for web publishing;
- writes answer to the web (to stdout).

For further help, you should show (a sample of):

- what comes from the form;
- what the Fortran prog waits for;
- what the F. prog answers back;

- OS you are on, and programming language you'd like to use.

BTW, this seems less a request for advice than a request for a ready program.

Rgds, julio
0
 
LVL 5

Accepted Solution

by:
icd earned 200 total points
ID: 1828028
To give you a 'bare bones' program that you can adapt to your circumstances.

This assumes that the fortran program takes two command line arguments which you have provided from a form as 'par1' and 'par2'. The output of your fortran program is output in a <PRE> tag in an HTML document.

--- cut here ---
#!/usr/local/bin/perl
require "cgi-bin.pl";
&ReadParse;

@output = `yrFortran $in{'par1'} $in{'par2'}`;

print <<__END__;
Content-type: text/html

<html>
<head></head>
<body>
  <pre>
  @output
  </pre>
</body>
</html>
__END__
1;
--- end ---




0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question