HP3000-L Archives

December 2001, Week 3

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:
"Shahan, Ray" <[log in to unmask]>
Reply To:
Shahan, Ray
Date:
Mon, 17 Dec 2001 09:01:27 -0600
Content-Type:
text/plain
Parts/Attachments:
text/plain (45 lines)
Jay, make sure your sub-prog does not have "DYNAMIC" as a $CONTROL option.
Rather, you want "ANSISUB" or "SUB".  If you have DYNAMIC, then your WS area
is initialized every time the program is called.


Hope this helps,

Ray S.

> -----Original Message-----
> From: Jay Chandru [SMTP:[log in to unmask]]
> Sent: Sunday, December 16, 2001 11:44 PM
> To:   [log in to unmask]
> Subject:      Retention of switch value in called program
>
> Hi All,
>
> Scenario: HP3000 and COBOL
> I have a main program and a sub program. The subprogram is called for
> every record in the main program. (i.e) if there are 10 records to be
> processed, the subprogram will be called 10 times from the main program.
>
> I have a switch in the sub program which is set to Y in the declaration.
>
> 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.
>
> Thanks & Regards
> Jay
>
>
> _________________________________________________________________
> MSN Photos is the easiest way to share and print your photos:
> http://photos.msn.com/support/worldwide.aspx
>
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2