Re: OS ENQ from COBOL

2016-08-01 Thread Tim Hare
IF  the batch job is scheduled, and IF you have an automated operations tool, 
and IF your scheduler has an external command interface, THEN:

What we (in Pecan/Beta42/ASG Workload scheduler) was define a variable (example 
$CICS1), and make a predecessor for the batch job with the value $CICS1 = UP.  
In the automated operations too,  we had two message traps:  one for the HASP 
message indicating CICS1 started, which would set the variable to UP, and one 
for the HASP message indicating CICS1 ended, setting the variable to DOWN.  The 
scheduler would then only start the job when the variable was set to UP.

I believe you can do a similar thing with scheduling environment (SCHENV= on 
the job card), too.

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


Re: OS ENQ from COBOL

2016-07-22 Thread Hardee, Chuck
While that would be an interesting way to invoke the code, I suspect there 
would be less chance of that being supported should something happen to me than 
an assembler language subroutine.

Chuck

Charles (Chuck) Hardee
Senior Systems Engineer/Database Administration
EAS Information Technology

Thermo Fisher Scientific
300 Industry Drive | Pittsburgh, PA 15275
Phone +1 (724) 517-2633 | Mobile +1 (412) 877-2809 | FAX: +1 (412) 490-9230
chuck.har...@thermofisher.com  | www.thermofisher.com

WORLDWIDE CONFIDENTIALITY NOTE: Dissemination, distribution or copying of this 
e-mail or the information herein by anyone other than the intended recipient, 
or an employee or agent of a system responsible for delivering the message to 
the intended recipient, is prohibited. If you are not the intended recipient, 
please inform the sender and delete all copies.

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Victor Gil
Sent: Friday, July 22, 2016 10:50 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: OS ENQ from COBOL

There is a weird way to embed subroutines in machine instructions right into 
Cobol code by:

a) defining them [fully assembled] as a WORKING-STORAGE literal
b) setting address of a PROCEDURE-POINTER to address of that literal
c) calling the PROCEDURE-POINTER

And no, I don't recommend you actually use this approach, unless really 
desperate.

-Victor-  


Hello Listers,

First off, does anyone know of an IBM COBOL related list? If so, could you 
point me in that direction.

Now, to my question.

I can code an assembler solution, or even a hybrid COBOL/Assembler solution, 
but what I would truly love would be a COBOL only solution.
My need is to be able to determine if a QNAME/RNAME combination is held by 
another address space in the system.
Stated another way, is there any way to use an "ENQ 
(QNAME,RNAME,S,SYSTEM),REQ=TEST" from a COBOL program using COBOL only 
procedural statements?

As I said, I can code an assembler program to issue the ENQ, but because I may 
not always be the one supporting the code, I need to keep it in a language most 
of our shop knows.

In another direction, is there an LE service routine that could issue the ENQ 
TEST?

Thanks to All,
Chuck

Charles (Chuck) Hardee<mailto:chuck.har...@thermofisher.com>
Senior Systems Engineer/Database Administration
EAS Information Technology

Thermo Fisher Scientific
300 Industry Drive | Pittsburgh, PA 15275
Phone +1 (724) 517-2633 | Mobile +1 (412) 877-2809 | FAX: +1 (412) 490-9230
chuck.har...@thermofisher.com<mailto:chuck.har...@thermofisher.com>  | 
www.thermofisher.com

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

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


Re: OS ENQ from COBOL

2016-07-22 Thread Victor Gil
There is a weird way to embed subroutines in machine instructions right into 
Cobol code by:

a) defining them [fully assembled] as a WORKING-STORAGE literal
b) setting address of a PROCEDURE-POINTER to address of that literal
c) calling the PROCEDURE-POINTER

And no, I don't recommend you actually use this approach, unless really 
desperate.

-Victor-  


Hello Listers,

First off, does anyone know of an IBM COBOL related list? If so, could you 
point me in that direction.

Now, to my question.

I can code an assembler solution, or even a hybrid COBOL/Assembler solution, 
but what I would truly love would be a COBOL only solution.
My need is to be able to determine if a QNAME/RNAME combination is held by 
another address space in the system.
Stated another way, is there any way to use an "ENQ 
(QNAME,RNAME,S,SYSTEM),REQ=TEST" from a COBOL program using COBOL only 
procedural statements?

As I said, I can code an assembler program to issue the ENQ, but because I may 
not always be the one supporting the code, I need to keep it in a language most 
of our shop knows.

In another direction, is there an LE service routine that could issue the ENQ 
TEST?

Thanks to All,
Chuck

Charles (Chuck) Hardee
Senior Systems Engineer/Database Administration
EAS Information Technology

Thermo Fisher Scientific
300 Industry Drive | Pittsburgh, PA 15275
Phone +1 (724) 517-2633 | Mobile +1 (412) 877-2809 | FAX: +1 (412) 490-9230
chuck.har...@thermofisher.com  | 
www.thermofisher.com

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


Re: OS ENQ from COBOL

2016-07-21 Thread John McKown
On Thu, Jul 21, 2016 at 11:13 AM, Hardee, Chuck <
chuck.har...@thermofisher.com> wrote:

> No, my requirement is batch.
> The service executing in its own address space that I need to access
> issues an EXCLUSIVE ENQ for a determinable QName/RName when it is up and
> ready to receive requests. I need to know if it is up and ready to receive
> before issuing any requests to it.
> This is all done in a batch address space, no CICS involved here.
>
> Charles (Chuck) Hardee
> Senior Systems Engineer/Database Administration
> EAS Information Technology
>
> Thermo Fisher Scientific
>
>
​Bottom line: HLASM or C with embedded assembler (if you're on z/OS 2.2
with the latest IBM C/C++ compiler).​




-- 
"Worry was nothing more than paying interest on a loan that a man may never
borrow"

From: "Quest for the White Wind" by Alan Black

Maranatha! <><
John McKown

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


Re: OS ENQ from COBOL

2016-07-21 Thread Hardee, Chuck
Yes, I found nothing in the Unix, LE or C/C++ services that perform an ENQ of 
any kind, be it for control or for testing availability.

I agree, the only real reason someone other than myself would need to do 
anything to the code is to reassemble it if the ENQ macro were to change. Since 
it would be single function, test if QName/RName is available or not, I would 
suspect the code wouldn't have to be changed, if ever.

I am just trying to do due diligence and make sure I'm not reinventing the 
wheel.

Thanks!

C-

Charles (Chuck) Hardee
Senior Systems Engineer/Database Administration
EAS Information Technology

Thermo Fisher Scientific
300 Industry Drive | Pittsburgh, PA 15275
Phone +1 (724) 517-2633 | Mobile +1 (412) 877-2809 | FAX: +1 (412) 490-9230
chuck.har...@thermofisher.com  | www.thermofisher.com

WORLDWIDE CONFIDENTIALITY NOTE: Dissemination, distribution or copying of this 
e-mail or the information herein by anyone other than the intended recipient, 
or an employee or agent of a system responsible for delivering the message to 
the intended recipient, is prohibited. If you are not the intended recipient, 
please inform the sender and delete all copies.


-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Bill Woodger
Sent: Thursday, July 21, 2016 11:59 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: OS ENQ from COBOL

There's nothing native in COBOL to do an what you want, and I'm not aware of 
anything in LE as a callable service.

Hybrid. Documentation. Probably the most they'll need is how to reassemble it. 
Unless a macro changes, why else would they ever need to touch it?

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

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


Re: OS ENQ from COBOL

2016-07-21 Thread Hardee, Chuck
No, my requirement is batch.
The service executing in its own address space that I need to access issues an 
EXCLUSIVE ENQ for a determinable QName/RName when it is up and ready to receive 
requests. I need to know if it is up and ready to receive before issuing any 
requests to it.
This is all done in a batch address space, no CICS involved here.

Charles (Chuck) Hardee
Senior Systems Engineer/Database Administration
EAS Information Technology

Thermo Fisher Scientific
300 Industry Drive | Pittsburgh, PA 15275
Phone +1 (724) 517-2633 | Mobile +1 (412) 877-2809 | FAX: +1 (412) 490-9230
chuck.har...@thermofisher.com  | www.thermofisher.com

WORLDWIDE CONFIDENTIALITY NOTE: Dissemination, distribution or copying of this 
e-mail or the information herein by anyone other than the intended recipient, 
or an employee or agent of a system responsible for delivering the message to 
the intended recipient, is prohibited. If you are not the intended recipient, 
please inform the sender and delete all copies.


-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Joseph W Gentile
Sent: Thursday, July 21, 2016 11:50 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: OS ENQ from COBOL

I don't know if you are running in a CICS environment but CICS has an EXEC 
CICS ENQ service. Perhaps you can invoke it (non-blocking) to figure out 
if the resource is held? Admittedly not the most straightforward 
approach... 
https://www.ibm.com/support/knowledgecenter/SSGMCP_5.2.0/com.ibm.cics.ts.applicationprogramming.doc/commands/dfhp4_enq.html

-Joe

Joe Gentile
z/OS GRS and RSM Development
(845)435-2184 (T/L 295-2184)
jwgen...@us.ibm.com


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

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


Re: OS ENQ from COBOL

2016-07-21 Thread Joseph W Gentile
I don't know if you are running in a CICS environment but CICS has an EXEC 
CICS ENQ service. Perhaps you can invoke it (non-blocking) to figure out 
if the resource is held? Admittedly not the most straightforward 
approach... 
https://www.ibm.com/support/knowledgecenter/SSGMCP_5.2.0/com.ibm.cics.ts.applicationprogramming.doc/commands/dfhp4_enq.html

-Joe

Joe Gentile
z/OS GRS and RSM Development
(845)435-2184 (T/L 295-2184)
jwgen...@us.ibm.com


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