× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.




1. It's possible you may need a CANCEL statement after after the call in the
calling program. example:

Call 'AG1A'

cancel 'AG1A'

or, as we found out on our 5.1 system using ILE Cobol, that we had to use a
GOBACK instead of an EXIT PROGRAM.

Dana P., HSS, Inc.



Today's Topics:

   1. AG/Run Unit Problem (Jon Paris)
   2. Cobol and CGI and CL (Diane Nott)
   3. RE: Cobol and CGI and CL (Patrick L Archibald)
   4. RE: Cobol and CGI and CL (Jon Paris)
   5. Sub File Window Program clears the screen (Cesar Altamirano)
   6. Re: AG/Run Unit Problem (Simon Coulter)
   7. RE: Sub File Window Program clears the screen (Winchester Terry)
   8. Re: Sub File Window Program clears the screen (Simon Coulter)

--__--__--

Message: 1
From: "Jon Paris" <Jon.Paris@Partner400.com>
To: "Cobol400-L@Midrange. Com" <cobol400-l@midrange.com>
Subject: AG/Run Unit Problem
Date: Wed, 1 May 2002 14:21:15 -0400
Reply-To: cobol400-l@midrange.com

I am experiencing a problem with the COBOL run unit on a V4R5 system.  I
would be grateful if you folks can check it out on other releases and
confirm if this is an on-going bug or a temporary aberration.

Since the programs are short I have embedded the source here in the note.
Name of the program is in each program.  Compile both programs to run in a
named AG.

Here's the call sequence:

CALL AG1A, when it returns call it again.  The counts will show that the run
unit was preserved as expected.

Next call AG1B. The EXIT PROGRAM is honored as it should be since this is
not the first COBOL program in the AG.  You can also do a DSPJOB and see
that the AG is still there.

Now call AG1B again - the count clearly shows that the AG is intact from the
last call.  However - on my system this time it ignores the Exit Program and
does a stop run when it hits the end of the program.

Clearly it can't be a sub-program on the first call and the main on the
second so something is wrong here.

Here's the code.

*************** Beginning of AG1A ********************
       Identification Division.
       Program-Id.  AG1A.

       Data Division.

       Working-Storage Section.
       77 testCount Pic s9(3) Value 0.

       Procedure Division.
       MainlineControl.
           Add 1 to testCount.
           Display "AG1A Count = " testCount.

           Exit Program and continue run unit.

*************** Beginning of AG1B ********************
       Identification Division.
       Program-Id.  AG1B.

       Data Division.

       Working-Storage Section.
       77 testCount Pic s9(3) Value 0.

       Procedure Division.
       MainlineControl.
           Add 1 to testCount.
           Display "AG1B Count = " testCount.

           Exit Program.

           Display "AG1B Fall through Exit program".

Jon Paris
Partner400



--__--__--

Message: 2
Date: Wed, 01 May 2002 16:28:16 -0400
From: Diane Nott <dnott@lorainccc.edu>
Organization: LCCC
To: cobol400-l@midrange.com
Subject: Cobol and CGI and CL
Reply-To: cobol400-l@midrange.com

How do I get my cobol program to accept params from a cgi web form? I have
the input
form created and the cobol program is ready. Now all I need is to figure out
how to
link the 2.

I also have a mini CL program that can call the cobol program. Is there a
way for
the cgi to call and pass params to the cl program?

Thanks!
Diane Nott
LCCC, Elyria, Ohio



--__--__--

Message: 3
From: "Patrick L Archibald" <Patrick.Archibald@HomeTelco.com>
To: <cobol400-l@midrange.com>
Subject: RE: Cobol and CGI and CL
Date: Wed, 1 May 2002 16:39:51 -0400
Reply-To: cobol400-l@midrange.com

A few years ago I posted some source on the web comparing
a COBOL CGI to a green screen application.  You can check
it out here:

http://hometelco.com/pla/COBOLCGIcomparison.html

I hope it helps.

Thanx, PLA

-----Original Message-----
From: cobol400-l-admin@midrange.com
[mailto:cobol400-l-admin@midrange.com]On Behalf Of Diane Nott
Sent: Wednesday, May 01, 2002 4:28 PM
To: cobol400-l@midrange.com
Subject: Cobol and CGI and CL


How do I get my cobol program to accept params from a cgi web form? I have
the input
form created and the cobol program is ready. Now all I need is to figure out
how to
link the 2.

I also have a mini CL program that can call the cobol program. Is there a
way for
the cgi to call and pass params to the cl program?

Thanks!
Diane Nott
LCCC, Elyria, Ohio


_______________________________________________
This is the COBOL Programming on the iSeries/AS400 (COBOL400-L) mailing list
To post a message email: COBOL400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/cobol400-l
or email: COBOL400-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/cobol400-l.




--__--__--

Message: 4
From: "Jon Paris" <Jon.Paris@Partner400.com>
To: <cobol400-l@midrange.com>
Subject: RE: Cobol and CGI and CL
Date: Wed, 1 May 2002 17:07:46 -0400
Reply-To: cobol400-l@midrange.com

Well your question is a bit vague.

For instance is the COBOL program going to be returning a web page or are
you just kicking off a batch function?  Even if it is not returning output
as such it still has to return something or the browser will sit there until
it times out.

Either way there are a number of things you need.

First of all your HTTP config has to be set up to allow the program to be
invoked - have you done that?

Second you need to code the required APIs (Are you doing GET or POST because
data retrieval is different in each case).

The code the API calls to write the result back to the browser.

As to the CL part, you can write the CGI interface in CL if you want, but it
would be simpler to front-end the COBOL with COBOL or for that matter just
modify your COBOL program to handle the web interface directly.

E-mail me _off-line_ and I can send you a sample CGI program that handles a
form.

Jon Paris
Partner400



--__--__--

Message: 5
Date: Wed, 10 Apr 2002 22:43:54 -0500
To: COBOL AS/400 <cobol400-l@midrange.com>
From: Cesar Altamirano <cesaralt@viabcp.com>
Subject: Sub File Window Program clears the screen
Reply-To: cobol400-l@midrange.com

Hi,
I am adding and F4 list to an Online Data entry Program in COBOL,
This program use the commands ACCEPT and DISPLAY with the
options LINE and COL to control the data entry fields in the
Program. I know I can=B4t use a workstation file to display a
subfile window for help in some fields. So I have created a new
program with a subfile window to overlay over the main screen.
The problem is that the subfile program is clearing the main window,
when is showed in the screen.
Is there any way to prevent this ??

Thanks for any help,
Cesar Altamirano.



--__--__--

Message: 6
Date: Thu, 02 May 02 09:08:03 +1000
From: "Simon Coulter" <shc@flybynight.com.au>
To: cobol400-l@midrange.com
Subject: Re: AG/Run Unit Problem
Reply-To: cobol400-l@midrange.com


Hello Jon,

My results on VRM440 using named activation group FRED for both programs.

 7 > call shcutils/ag1a
     AG1A Count = 001
 7 > call shcutils/ag1a
     AG1A Count = 002
 7 > dspjoblog
 7 > call shcutils/ag1b
     AG1B Count = 001
 7 > dspjoblog
 7 > call shcutils/ag1b
     AG1B Count = 002
     AG1B Fall through Exit program

The activation group was still present until the second call to AG1B when
the implict STOP RUN destroyed it.

As you say, very peculiar.  It appears that the RUN-UNIT is ended when
AG1B returns the first time (even though the activation group remains
active) thus the second call to AG1B is an INITIAL program and therefore
EXIT PROGRAM is illegal and thus ignored causing an implicit STOP RUN.

I created a new program called AG1C (imaginative, eh) which is like AG1B
except the Exit Program statement became Exit Program and continue run
unit.  In this case it did not fall though to the implicit STOP RUN on the
second call which is exactly as I would expect it to behave.

Regards,
Simon Coulter.

--------------------------------------------------------------------
   FlyByNight Software         AS/400 Technical Specialists
   http://www.flybynight.com.au/

   Phone: +61 3 9419 0175   Mobile: +61 0411 091 400        /"\
   Fax:   +61 3 9419 0175   mailto: shc@flybynight.com.au   \ /
                                                             X
                 ASCII Ribbon campaign against HTML E-Mail  / \
--------------------------------------------------------------------


--__--__--

Message: 7
From: Winchester Terry <terry.winchester@raymondcorp.com>
To: "'cobol400-l@midrange.com'" <cobol400-l@midrange.com>
Subject: RE: Sub File Window Program clears the screen
Date: Thu, 2 May 2002 06:23:53 -0400
Reply-To: cobol400-l@midrange.com

I usually put a dummy record at the bottom of my DDS
with the "assume" keyword.  Also make sure your window
has the OVERLAY keyword.  Not sure if this will work
or not when using Display/Accept.

                R DUMMY
                                            ASSUME
                                       24 79' '

Terry


> -----Original Message-----
> From: Cesar Altamirano [mailto:cesaralt@viabcp.com]
> Sent: Wednesday, April 10, 2002 11:44 PM
> To: COBOL AS/400
> Subject: Sub File Window Program clears the screen
>
>
> Hi,
> I am adding and F4 list to an Online Data entry Program in COBOL,
> This program use the commands ACCEPT and DISPLAY with the
> options LINE and COL to control the data entry fields in the
> Program. I know I can=B4t use a workstation file to display a
> subfile window for help in some fields. So I have created a new
> program with a subfile window to overlay over the main screen.
> The problem is that the subfile program is clearing the main window,
> when is showed in the screen.
> Is there any way to prevent this ??
>
> Thanks for any help,
> Cesar Altamirano.
>

--__--__--

Message: 8
Date: Thu, 02 May 02 19:22:17 +1000
From: "Simon Coulter" <shc@flybynight.com.au>
To: cobol400-l@midrange.com
Subject: Re: Sub File Window Program clears the screen
Reply-To: cobol400-l@midrange.com


Hello Cesar,

Specify RSTDSP(*YES) on the new display file (the one with the window).

You may also need to create a dummy record format in the new display file
with the magic keyword ASSUME.  For example:

A          R DUMMY
A                                      ASSUME
A                                  1  2'Nosferatu'

Regards,
Simon Coulter.

--------------------------------------------------------------------
   FlyByNight Software         AS/400 Technical Specialists
   http://www.flybynight.com.au/

   Phone: +61 3 9419 0175   Mobile: +61 0411 091 400        /"\
   Fax:   +61 3 9419 0175   mailto: shc@flybynight.com.au   \ /
                                                             X
                 ASCII Ribbon campaign against HTML E-Mail  / \
--------------------------------------------------------------------



--__--__--

_______________________________________________
This is the COBOL Programming on the iSeries/AS400 (COBOL400-L) digest list
To post a message email: COBOL400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/cobol400-l
or email: COBOL400-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/cobol400-l.



End of COBOL400-L Digest


**************Internet Email Confidentiality Footer**************



Privileged/Confidential Information may be contained in this message.
If you are not the addressee indicated in this message (or
responsible for delivery of the message to such person), you may
not copy or deliver this message to anyone. In such case, you
should destroy this message and kindly notify the sender by
reply email. Please advise immediately if you or your employer
do not consent to Internet email for messages of this kind.
Opinions, conclusions and other information in this message
that do not relate to the official business of HSS, Inc. shall
be understood as neither given nor endorsed by it.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.