Re: Reality check on LOAD + Rexx LINKPGM

2013-03-07 Thread Shmuel Metz (Seymour J.)
In <5138c7cc.4010...@valley.net>, on 03/07/2013
   at 12:01 PM, Gerhard Postpischil  said:

>For the OP the target is CoBOL, presumably expecting character
>values. 

AFAIK COBOL doesn't expect a halfword prefix on character parameters.

-- 
 Shmuel (Seymour J.) Metz, SysProg and JOAT
 Atid/2
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Reality check on LOAD + Rexx LINKPGM

2013-03-07 Thread Paul Gilmartin
On Thu, 7 Mar 2013 12:01:00 -0500, Gerhard Postpischil wrote:

>On 3/7/2013 10:23 AM, Shmuel Metz (Seymour J.) wrote:
>>
>> No! Only use LINKMVS if you want halfword length fields prepended to
>> the arguments; otherwise use LINKPGM.
>
>For the OP the target is CoBOL, presumably expecting character values.
>It should be possible to code the program(s) to detect how they are
>called and accept either form. I've done that in the past, but for
>assembler subroutines.
> 
E.g. if the first hex digit is 0, assume the first two bytes are a length
specification, up to 4095.

BPXWDYN makes a similar judgment, and I got an astonishing result
by passing it a PARM beginning with a character it was unprepared
to handle.

- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Reality check on LOAD + Rexx LINKPGM

2013-03-07 Thread Gerhard Postpischil

On 3/7/2013 10:23 AM, Shmuel Metz (Seymour J.) wrote:

In <7215099641551385.wa.paulgboulderaim@listserv.ua.edu>, on
03/06/2013
at 08:16 PM, Paul Gilmartin  said:


Afterthought:  If the module expects OS CALL linkage conventions,
use LINKMVS rather than LINKPGM.


No! Only use LINKMVS if you want halfword length fields prepended to
the arguments; otherwise use LINKPGM.


For the OP the target is CoBOL, presumably expecting character values. 
It should be possible to code the program(s) to detect how they are 
called and accept either form. I've done that in the past, but for 
assembler subroutines.


Gerhard Postpischil
Bradford, Vermont

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Reality check on LOAD + Rexx LINKPGM

2013-03-07 Thread Shmuel Metz (Seymour J.)
In <7215099641551385.wa.paulgboulderaim@listserv.ua.edu>, on
03/06/2013
   at 08:16 PM, Paul Gilmartin  said:

>Afterthought:  If the module expects OS CALL linkage conventions, 
>use LINKMVS rather than LINKPGM.

No! Only use LINKMVS if you want halfword length fields prepended to
the arguments; otherwise use LINKPGM.

-- 
 Shmuel (Seymour J.) Metz, SysProg and JOAT
 Atid/2
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Reality check on LOAD + Rexx LINKPGM

2013-03-06 Thread Paul Gilmartin
On Wed, 6 Mar 2013 19:07:30 -0800, Charles Mills wrote:
>
>Ah, but of course! (And I think I did say "+ DELETE" in the OP.)
> 
You did (parenthetically, now that I reread it.)

>> If the module expects OS CALL linkage conventions, use LINKMVS rather than 
>> LINKPGM
>
>..., LINKPGM was a studied choice, not something that grew out of wanting to 
>reinvent the wheel.
> 
Understood, now.  That's, for example, how SYS1.SAMPLIB(CSFTEST)
calls ICSF, which doesn't expect the halfword length.

I have on occasion reinvented the wheel in order to test extreme PARM
lengths.  Results:

BPXBATCH cheerfully accepts  and correctly processes a PARM of length
up to 65,535 (x''; why not?)

HLASM accepts and correctly processes a parm of length up to 32,767
(x'7FFF'); at length 32,768 (x'8000'), it produces several hundred
thousand lines of error messages, then program checks.  I think
that's pretty harsh.

Where's the Black Team when you need them?

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Reality check on LOAD + Rexx LINKPGM

2013-03-06 Thread Charles Mills
Thank you. I shall get loaded forthwith.

Charles

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of Skip Robinson
Sent: Wednesday, March 06, 2013 3:45 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Reality check on LOAD + Rexx LINKPGM

You have our blessing. Go forth and LOAD. ;-)

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Reality check on LOAD + Rexx LINKPGM

2013-03-06 Thread Charles Mills
> Do you DELETE it when you're finished?

Ah, but of course! (And I think I did say "+ DELETE" in the OP.)

> If the module expects OS CALL linkage conventions, use LINKMVS rather than 
> LINKPGM

FSVO OS CALL Linkage conventions. LINKMVS puts halfword lengths on ALL 
parameters. That is the convention for EXEC PARM= and for compiler and utility 
DD overrides, but it is not the general call convention that I know (not what 
is shown in the example in Assembler Services Guide under "Passing Control with 
Return"). COBOL (the language of my called program) for example does not in 
general expect halfword length prefixes (although one could probably code for 
them) in the Linkage Section. In any event, LINKPGM was a studied choice, not 
something that grew out of wanting to reinvent the wheel.

Charles

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Paul Gilmartin
Sent: Wednesday, March 06, 2013 6:16 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Reality check on LOAD + Rexx LINKPGM

On Wed, 6 Mar 2013 15:31:35 -0800, Charles Mills wrote:
>...
>I then use Rexx ADDRESS LINKPGM to call the module. ...
> 
Afterthought:  If the module expects OS CALL linkage conventions, use LINKMVS 
rather than LINKPGM.  You can fake it, and more, with LINKPGM, but why reinvent 
the wheel?

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Reality check on LOAD + Rexx LINKPGM

2013-03-06 Thread Paul Gilmartin
On Wed, 6 Mar 2013 15:31:35 -0800, Charles Mills wrote:
>...
>I then use Rexx ADDRESS LINKPGM to call the module. ...
> 
Afterthought:  If the module expects OS CALL linkage conventions,
use LINKMVS rather than LINKPGM.  You can fake it, and more,
with LINKPGM, but why reinvent the wheel?

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Reality check on LOAD + Rexx LINKPGM

2013-03-06 Thread Paul Gilmartin
On Wed, 6 Mar 2013 15:31:35 -0800, Charles Mills wrote:
>
>As I have it coded now the Rexx first calls a little assembler stub that I
>happened to already have that issues an MVS LOAD.
>
>I then use Rexx ADDRESS LINKPGM to call the module. LINKPGM makes the LOAD
>technically redundant, ...
>
>Would the august sages of IBMMAIN agree that this is not a bad way to do
>things; that there is little additional overhead in using LOAD + LINKPGM (+
>DELETE) as opposed to just LINKPGM?
> 
I would expect that if you LINKPGM the module more than once you come
out 'way ahead, especially if it's non-LPA.

Do you DELETE it when you're finished?

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Reality check on LOAD + Rexx LINKPGM

2013-03-06 Thread Skip Robinson
You have our blessing. Go forth and LOAD. ;-)

.
.
JO.Skip Robinson
Southern California Edison Company
Electric Dragon Team Paddler 
SHARE MVS Program Co-Manager
626-302-7535 Office
323-715-0595 Mobile
jo.skip.robin...@sce.com



From:   Charles Mills 
To: IBM-MAIN@LISTSERV.UA.EDU, 
Date:   03/06/2013 03:32 PM
Subject:Reality check on LOAD + Rexx LINKPGM
Sent by:IBM Mainframe Discussion List 



I have a Rexx program (bigger than a "script") that is going to call a
module whose name will come from a customer-specified parameter file.

As I have it coded now the Rexx first calls a little assembler stub that I
happened to already have that issues an MVS LOAD.

I then use Rexx ADDRESS LINKPGM to call the module. LINKPGM makes the LOAD
technically redundant, but I like the explicit LOAD because the return 
codes
from my assembler LOAD are way better than the return code from 
LINKPGM,
For example:

Error loading : ABEND Code S806 Reason Code 4
versus
+++ RC(-3) +++

My reading of Assembler Services indicates that there is little additional
overhead in doing things this way, that is. with an explicit LOAD followed
by a LINKPGM: "A module is considered usable for ATTACH, LINK, or XCTL if 
it
has not been marked NOT REUSABLE by a previous ATTACH, LINK, or XCTL."
(FWIW, the loaded module might or might not be RENT/REUS/authorized etc.)

Would the august sages of IBMMAIN agree that this is not a bad way to do
things; that there is little additional overhead in using LOAD + LINKPGM 
(+
DELETE) as opposed to just LINKPGM?

Thanks,
Charles 


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Reality check on LOAD + Rexx LINKPGM

2013-03-06 Thread Charles Mills
I have a Rexx program (bigger than a "script") that is going to call a
module whose name will come from a customer-specified parameter file.

As I have it coded now the Rexx first calls a little assembler stub that I
happened to already have that issues an MVS LOAD.

I then use Rexx ADDRESS LINKPGM to call the module. LINKPGM makes the LOAD
technically redundant, but I like the explicit LOAD because the return codes
from my assembler LOAD are way better than the return code from LINKPGM,
For example:

Error loading : ABEND Code S806 Reason Code 4
versus
+++ RC(-3) +++

My reading of Assembler Services indicates that there is little additional
overhead in doing things this way, that is. with an explicit LOAD followed
by a LINKPGM: "A module is considered usable for ATTACH, LINK, or XCTL if it
has not been marked NOT REUSABLE by a previous ATTACH, LINK, or XCTL."
(FWIW, the loaded module might or might not be RENT/REUS/authorized etc.)

Would the august sages of IBMMAIN agree that this is not a bad way to do
things; that there is little additional overhead in using LOAD + LINKPGM (+
DELETE) as opposed to just LINKPGM?

Thanks,
Charles 

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN