Subject: | |
From: | |
Reply To: | |
Date: | Mon, 17 Dec 2001 09:39:07 -0500 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Jay Chandru <[log in to unmask]> queries:
> This switch is set to N for the first record and should remain N for the
> subsequent records. but the issue is that this switch resets to Y for
> every call to the subprogram.
>
> Can anyone point me as to where i am going wrong or is there something
> which i should do for the value of switch to be retained.
If you want the Cobol subprogram to retain the data values between calls,
you can use the $CONTROL SUBPROGRAM statement. The other values pertinent
to this discussion are $CONTROL DYNAMIC (which functions the same as the
INITIAL clause of the PROGRAM-ID paragraph; that is, data values will always
be in their initial state when the subprogram is called) and $CONTROL
ANSISUB (which specifies an ANSI subprogram; that is, data values are
retained between calls unless explicitly re-initialized). For more info,
see the "Interprogram Communication" chapter of the Cobol Reference Manual.
Just remember that $CONTROL SUBPROGRAM will keep *all* data values between
calls, so your code must take that into account.
Jim Phillips Information Systems Manager
Email: [log in to unmask] Therm-O-Link, Inc.
Phone: 330-527-2124 P. O. Box 285
Fax: 330-527-2123 10513 Freedom Street
Web: http://www.tolwire.com Garrettsville, OH 44231
I WANT MY MPE!
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|
|
|