Subject: | |
From: | |
Reply To: | |
Date: | Fri, 15 May 1998 15:41:13 -0700 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Hi Jim,
You wrote:
>
> Hey gang,
>
> I can't remember how to do this and can't find my intrinsics manual...
>
> Does anyone know how to get the value stored in a system variable in
> cobol?
>
> Thanks.
Here's our rather simple solution (for string variables):
02 STATUS-INFO PIC S9(09) COMP.
02 STRING-VALUE PIC 9(09) COMP VALUE 2.
02 VARIABLE-NAME PIC X(16).
02 DESTINATION-VARIABLE PIC X(16).
:
:
MOVE "SYS_VAR_NAME" TO VARIABLE-NAME.
CALL INTRINSIC "HPCIGETVAR"
USING VARIABLE-NAME, STATUS-INFO,
STRING-VALUE, DESTINATION-VARIABLE.
IF STATUS-INFO <> ZERO
DISPLAY "The HPCIGETVAR intrinsic failed."
GO TO ERROR-ROUTINE.
If you'd like, I could send a copy of this intrinsic's page (from
the laserrom manual), I thought it was a little long to be included
here...
HTH!
+------------------------------------------------------------------+
My mind is my own, as are my ideas and opinions.
My heart, body, and soul, however, all belong to others. Tim.
+------------------------------------------------------------------+
Tim Ericson tericson DenKor Dental Management Corp.
Sr. Programmer/Analyst at denkor (aka Willamette Dental Group)
(& Systems Manager) dot com 503-526-4440 (direct number)
Programming HP3000s since 1983! http://www.denkor.com
+------------------------------------------------------------------+
|
|
|