Subject: | |
From: | |
Reply To: | Dave Powell, MMfab |
Date: | Wed, 30 Mar 2005 11:51:27 -0800 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Try something like:
01 GETINFO-PARM-FIELDS.
05 GETINFO-INFO-STRING PIC X(20) VALUE SPACES.
05 GETINFO-INFO-LENGTH PIC S9(04) COMP VALUE 20.
05 GETINFO-PARM PIC S9(04) COMP.
05 GETINFO-RESULT PIC S9(04) COMP.
....
CALL INTRINSIC "GETINFO" USING GETINFO-INFO-STRING
GETINFO-INFO-LENGTH
GETINFO-PARM
GIVING GETINFO-RESULT.
IF GETINFO-RESULT <> 0
DISPLAY "'GETINFO' INTRINSIC FAILURE; RESULT = "
GETINFO-RESULT
"; GETINFO-INFO-STRING = ", GETINFO-INFO-STRING
"; INFO-LENGTH = ", GETINFO-INFO-LENGTH
"; PARM = ", GETINFO-PARM
CALL INTRINSIC "QUIT" USING \1\.
----- Original Message -----
From: "Emerson, Tom" <[log in to unmask]>
To: <[log in to unmask]>
Sent: Wednesday, March 30, 2005 11:14
Subject: SIMPLE (?) cobol question
Greetings -- I'm feeling moderately dense this morning, trying to use/remember
a feature of COBOL that I haven't touched in years (nor can I find in the
docs), and digging through tons of source [mostly not my own] to find an
example to trigger the "Aha!" memory is not proving very fruitful...
How do I get the value of the "parm=" passed on the run command?(*)
I know that (via the "special names" SW0-SW15) I can get specific BITS of the
run parm, but I thought there was a way to get the run-parm proper.
basically I'm writing a utility program to retrieve some chunk of data based
on a single 3-digit key value; rather than force my jobstreams to look like:
!run getdata.prog
123
[which means my program has to deal with display/accept statements and error
handling], I want to use
!run getdata.prog;parm=123
[which will automatically be "available" and of the proper type/range/etc.]
Am I nuts to think that the parm/info values are easily available in HP-COBOL,
or did I write some long-lost utility chunk of code to manually reconstruct
the "runparm" based on the SWn values and simply forgot "it's not part of what
HP offers..."?
Tom
(*) by the same token, how does one get the "info=" string? Not that I need
it for this program, but I might as well "refresh" that section of
cranial-core :)
p.s. Where did the (slightly better) 5.5 version of the mpe/ix docs page go?
I had it bookmarked, but it comes up with a page-not-found; the current
6/6.5/7 version actually went a bit "backwards" with the functionality [and,
for that matter, the 6/6.5/7 version points to a 5.0 version of the COBOL
manuals...]
|
|
|