Skip to main content

[archive] cgi problem

  • January 29, 2010
  • 6 replies
  • 0 views

[Migrated content. Thread originally posted on 29 January 2010]

I am using Acucobol 8.1, on a linux server using Novell Suse Linux.

I am attempting to write cobol programs using cgi and internet explorer to do the following:

Accept customer number, password and selected option

The first program accepts this data, then processes and outputs a form
showing customer products etc and asks the user to select the product
for further information. This is all working, my problem is how to output
the form to a further program with hidden values such as customer number etc.

Has any one used hidden values, changing the hidden value in a cobol program read for the next program to accept.

Any help here would be appreciated

6 replies

[Migrated content. Thread originally posted on 29 January 2010]

I am using Acucobol 8.1, on a linux server using Novell Suse Linux.

I am attempting to write cobol programs using cgi and internet explorer to do the following:

Accept customer number, password and selected option

The first program accepts this data, then processes and outputs a form
showing customer products etc and asks the user to select the product
for further information. This is all working, my problem is how to output
the form to a further program with hidden values such as customer number etc.

Has any one used hidden values, changing the hidden value in a cobol program read for the next program to accept.

Any help here would be appreciated
you mean something like this?


                <form method="POST" action="opt-user.acu">
                <input type="hidden" value="add" name="opt">
                <input type="hidden" value="2010012907302301" name="session">


Sample was taken from a cgi-program where i log in - create a session-id for the user and then he has several option like this selection was to add a new user into the DB.

So i used the hidden values where i know his session id and the option "add".

i add 2 samples - sorry comments in the source are in german.

[Migrated content. Thread originally posted on 29 January 2010]

I am using Acucobol 8.1, on a linux server using Novell Suse Linux.

I am attempting to write cobol programs using cgi and internet explorer to do the following:

Accept customer number, password and selected option

The first program accepts this data, then processes and outputs a form
showing customer products etc and asks the user to select the product
for further information. This is all working, my problem is how to output
the form to a further program with hidden values such as customer number etc.

Has any one used hidden values, changing the hidden value in a cobol program read for the next program to accept.

Any help here would be appreciated
Thank you for your response, could you advise please how the
/v3/incl/cp_line file is set up and how "output" is defined

[Migrated content. Thread originally posted on 29 January 2010]

I am using Acucobol 8.1, on a linux server using Novell Suse Linux.

I am attempting to write cobol programs using cgi and internet explorer to do the following:

Accept customer number, password and selected option

The first program accepts this data, then processes and outputs a form
showing customer products etc and asks the user to select the product
for further information. This is all working, my problem is how to output
the form to a further program with hidden values such as customer number etc.

Has any one used hidden values, changing the hidden value in a cobol program read for the next program to accept.

Any help here would be appreciated
Thank you for your response, could you advise please how the
/v3/incl/cp_line file is set up and how "output" is defined

[Migrated content. Thread originally posted on 29 January 2010]

I am using Acucobol 8.1, on a linux server using Novell Suse Linux.

I am attempting to write cobol programs using cgi and internet explorer to do the following:

Accept customer number, password and selected option

The first program accepts this data, then processes and outputs a form
showing customer products etc and asks the user to select the product
for further information. This is all working, my problem is how to output
the form to a further program with hidden values such as customer number etc.

Has any one used hidden values, changing the hidden value in a cobol program read for the next program to accept.

Any help here would be appreciated
Thank you for your response, could you advise please how the
/v3/incl/cp_line file is set up and how "output" is defined

[Migrated content. Thread originally posted on 29 January 2010]

I am using Acucobol 8.1, on a linux server using Novell Suse Linux.

I am attempting to write cobol programs using cgi and internet explorer to do the following:

Accept customer number, password and selected option

The first program accepts this data, then processes and outputs a form
showing customer products etc and asks the user to select the product
for further information. This is all working, my problem is how to output
the form to a further program with hidden values such as customer number etc.

Has any one used hidden values, changing the hidden value in a cobol program read for the next program to accept.

Any help here would be appreciated
cp-line is a dummy template file which i use to write html-code directly...

in this file is only this
%%output%%
entry.



The Template-System from Acu is very simple to understand.

you define in the working-storage
something like this

       01  mod-form          is external-form
                             is identified by "v3/incl/button_user".
           03  m-nachname    pic x(50)  is identified by "nachname".
           03  m-vorname     pic x(50)  is identified by "vorname".
           03  m-mlogin      pic x(8)   is identified by "mlogin".
           03  m-msession    pic 9(16)  is identified by "msession".
           03  m-dlogin      pic x(8)   is identified by "dlogin".
           03  m-dsession    pic 9(16)  is identified by "dsession".


identified by defines the HTML-Templates file.. in this
v3/incl/button_user.html

in the html-file is the HTML-Code The Variables


               
%%nachname%%, %%vorname%%

                   

                       
                       
                       
                       
                   

                   

                       
                       
                       
                       
                   

               


in the acu-code you can move your data in the fields and then display it.

move "Neidinger" to m-nachname.
move "David" to m-vorname
...
display mod-form.

03 m-nachname pic x(50) is identified by "nachname".
i fill an the %%nachname%% Variable is filled with Neidinger.

with display mod-form the complete template is send from the server to the browser.



my cp-line.html template is a dummy file for parts where i can't use a complete template. So i fill

       01  line-form         is external-form
                             is identified by "v3/incl/cp_line".
           03  line-text     pic x(250) is identified by "output".

with my complete HTML-Code and output this with
display line-form.

David

[Migrated content. Thread originally posted on 29 January 2010]

I am using Acucobol 8.1, on a linux server using Novell Suse Linux.

I am attempting to write cobol programs using cgi and internet explorer to do the following:

Accept customer number, password and selected option

The first program accepts this data, then processes and outputs a form
showing customer products etc and asks the user to select the product
for further information. This is all working, my problem is how to output
the form to a further program with hidden values such as customer number etc.

Has any one used hidden values, changing the hidden value in a cobol program read for the next program to accept.

Any help here would be appreciated
Thank you David problem solved, your help very much appreciated.

Julie