I have an COBOL object the is invoked in a number of COBOL programs as:
CALL MM88992X USING THIS-WRK-VALUE.
Now I am required to use this program MM88992X. I would like to code it a
a function call in my exec:
/* REXX */
ARG value
newValue = 'SYS1.LOADMOD(MM88992X) ' value
RETURN rc newValue
But it does not seem to resolve the references to the object properly.
I have tried an ADDRESS TSO "CALL 'SYS1.LOADMOD(MM88992X) ''''value''''
and I receive a RC=0 from the instruction but the value was not changed.
Any help will be greatly appreciated.
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
T..A..,
If the program is linked into a library that's allocated to your TSO
session or the linklist, you can simply run the program as a command,
like so:
/* REXX */
parm="This is a test"
"MM8892X" parm
if rc>0.....
If the program sets a return code (R15) it can be tested with the 'rc'
special variable as in your example.
However, a better was to invoke programs, which also let's you pass
parameters *back* to your exec via the call interface, is to use the
LINKMVS or LINKPGM environment. Here's some information I copied from an
earlier thread....I've been playing around with it and it's very
cool....Good Luck :-)
>
> Try the following Host Command (ADDRESS) Environments:
> LINK LINKMVS LINKPGM
> ATTACH ATTCHMVS ATTCHPGM
> -Results +Results +Results
> !StdLink -HwdLens !StdLink
>
> LINK & ATTACH return no results; you can pass a single character string,
> and they use standard linkage conventions. The called program can
> obtain the length of the string from the second parameter.
>
> LINKMVS & ATTCHMVS return results, but each parameter is preceded by a
> signed halfword length field; this isn't "standard", and limits lengths
> to 32767 bytes.
>
> LINKPGM & ATTCHPGM return results into the passed parameters, and follow
> standard linkage conventions, so programs written before REXX hit MVS,
> can be called by REXX, and results returned into one or more parameters.
>
> Although the passing of parms is standard, REXX loads the address of the
> environment block for the current Language Processing Environment into
> R0. Standard linkage conventions were never supposed to use this reg,
> so if it's ignored by the called program, there's no problem; if a
> contemporary (assembler) program wants to use it it can.
>
> RC:
> -2 Something uncool with the parameters/lengths.
> -3 Couldn't find the program.
> 31-bit value can be returned by LINK, LINKMVS, LINKPGM.
> 24-bit value can be returned by ATTACH, ATTCHMVS, ATTCHPGM.
>
> Reference:
> BookManager Book Shelf: IKJ2BI01 TSO/E V2R4; Book: IKJ2A303 TSO/E V2R4
> REXX/MVS REFERENCE; Topic: 2.6.9 Host Command Environments for Linking
> to and Attaching Programs.
--
Jim Van Sickle <From address spamproofed; mailto:jim...@ibm.net>
Manager, Operations and Tech Support
United Retail Group, Inc. Rochelle Park, NJ
(visit my meager web-site at http://mypage.ihost.com/jimswebsite/)
>>Does anyone have an example of an EXEC which invokes a COBOL object?
>>I have an COBOL object the is invoked in a number of COBOL programs as:
>> CALL MM88992X USING THIS-WRK-VALUE.
>>...
To do the call from within TSO/E REXX you should take a look at the
"LINKPGM" and "ATTACHPGM" host environments in the IBM REXX manuals.
Sorry, currently I don't have an example online, tell me if you would need
one (but check the manual first ...)
Best regards
Wolfgang
thank,
thomas
--
Thomas Dunbar 540 231-3938
http://gserver.grads.vt.edu/tgdhome.html
I don't think you can, short of writing your own function package.
Regular expression pattern matching should be a built in part of
REXX's PARSE instruction, but it isn't, probably because it would
involve the use of "cryptic symbols", so I doubt that it will ever be.
If PARSE had that, or even just "*" and "?" wildcard pattern
matching, it wouldn't be just a great programming language, it would
be an _unbeatable_ programming language.
Regards,
Bernie Schneider: bern...@prodigy.net
========================================================================
The individual has always had to struggle to keep from being overwhelmed
by the tribe. To be your own man is a hard business. If you try it, you
will be lonely often, and sometimes frightened. But no price is too high
to pay for the priviledge of owning yourself. << Rudyard Kipling >>
The easiest way is to download GNU GREP and write Rexx programs
which essentially are stdin/stdout filters. It's not built into Rexx.
Rexxlib from Quercus has a builtin Grep function. Their page is
www.quercus-sys.com I believe. However Rexx has enough built in
functions so with a little coding it can match any given regular
expression on a case by case basis. Give me a Rexx program anyday
over a convoluted redundant re.
---
Jim
CyberNet Connections
Bernie Schneider wrote:
>
> I don't think you can, short of writing your own function package.
> Regular expression pattern matching should be a built in part of
> REXX's PARSE instruction, but it isn't, probably because it would
> involve the use of "cryptic symbols", so I doubt that it will ever be.
> If PARSE had that, or even just "*" and "?" wildcard pattern
> matching, it wouldn't be just a great programming language, it would
> be an _unbeatable_ programming language.
>
> Regards,
> Bernie Schneider: bern...@prodigy.net
> ========================================================================
> The individual has always had to struggle to keep from being overwhelmed
> by the tribe. To be your own man is a hard business. If you try it, you
> will be lonely often, and sometimes frightened. But no price is too high
> to pay for the priviledge of owning yourself. << Rudyard Kipling >>
--
Shmuel (Seymour J.) Metz
Senior Software SE
The values in from and reply-to are for the benefit of spammers:
reply to domain eds.com, user msustys1.smetz or to domain gsg.eds.com,
user smetz.