Re: System REXX and UNIX

2016-10-12 Thread Tony Harminc
On 12 October 2016 at 13:56, Kirk Wolf  wrote:
> You are correct: you don't need an LE environment to use the BPX kernel 
> service calls.

Indeed. I do it from non-LE assembler all the time.

> REXX doesn't have/use an LE environment AFAIK. I don't know
> much about the System REXX environment, but I would assume kernel service
> calls would work fine.   The REXX SYSCALL environment uses these, so I'm
> not sure why it wouldn't work.

I think the problem will come if there's a question of file access
permissions. For that the kernel has to ask RACF/ACF2/TSS, and that
requires a userid, which may not always be present, or may not have a
UNIX UID, GID, etc. Depends on how it's invoked, I think.

Tony H.

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


Re: System REXX and UNIX

2016-10-12 Thread John McKown
On Wed, Oct 12, 2016 at 3:31 PM, Paul Gilmartin <
000433f07816-dmarc-requ...@listserv.ua.edu> wrote:

> On Wed, 12 Oct 2016 14:27:58 -0500, John McKown wrote:
>
> >On Wed, Oct 12, 2016 at 2:17 PM, Gibney, Dave  wrote:
> >> HLQ (tousercat) .varname.value
> >
> >​What if "value" is does not adhere to a DSN node restrictions?​...
> >
> What would the dreaded DISABLE(DSNCHECK) do for you?
>

​I am pretty sure that I'm just going to use bpxwunix() in a TSO server to
do "wild and crazy" things using UNIX files. That is, if I even really
needs to. Most of what the CA-OPS/MVS global variables are being used for
is to be able to send a message to production control if one or more
selected jobs do not start "on time". This is done by setting a global
variable like GLOBAL. to "1" when a job runs (IEF403I message
issued), then a TOD rule to check if the same variable is set to "1" and do
a SEND command if it is not. Just something to help the production person
stay aware of possible problems during the night (she works a split shift -
morning, then evening).​



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



-- 
Heisenberg may have been here.

Unicode: http://xkcd.com/1726/

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: System REXX and UNIX

2016-10-12 Thread Paul Gilmartin
On Wed, 12 Oct 2016 14:27:58 -0500, John McKown wrote:

>On Wed, Oct 12, 2016 at 2:17 PM, Gibney, Dave  wrote:
>> HLQ (tousercat) .varname.value
>
>​What if "value" is does not adhere to a DSN node restrictions?​...
>
What would the dreaded DISABLE(DSNCHECK) do for you?

-- gil

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


Re: System REXX and UNIX

2016-10-12 Thread Gibney, Dave
Valid point :) 
For another wild idea, use ENQ :)

> -Original Message-
> From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU]
> On Behalf Of John McKown
> Sent: Wednesday, October 12, 2016 12:28 PM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: System REXX and UNIX
> 
> On Wed, Oct 12, 2016 at 2:17 PM, Gibney, Dave <gib...@wsu.edu> wrote:
> 
> > HLQ (tousercat) .varname.value
> >
> 
> ​What if "value" is does not adhere to a DSN node restrictions?​ Using
> bpxwunix() in a TSO REXX environment seems to be the way to go, at least at
> present. I can do things like:
> 
> stdin.0=0
> stdout.0=0
> stderr.0=0
> rc=bpxwunix("echo 'value'
> >/usr/SystemREXX/values/GLOBAL.VARNAME",stdin.,stdout.,stderr.);
> 
> rc=bpxwunix("cat
> /usr/SystemREXX/values/GLOBAL.VARNAME",stdin.,stdout.,stderr.)
> if stdout.0 = 0 then signal NOVALUE
> say "value is:"stdout.1
> 
> rc=bpxunix('rm
> /usr/SystemREXX/values/GLOBAL.VARNAME",stdin.,stdout.,stderr.)
> 
> Just seems easier than messing with the z/OS catalog. This seems to work OK.
> I just wish that I could do things more directly / efficiently.
> 
> --
> Heisenberg may have been here.
> 
> Unicode: https://urldefense.proofpoint.com/v2/url?u=http-
> 3A__xkcd.com_1726_=DQIFaQ=C3yme8gMkxg_ihJNXS06ZyWk4EJm8L
> drrvxQb-Je7sw=u9g8rUevBoyCPAdo5sWE9w=fIHPzrWdnNLkzakE4g6z-
> BxzNhlNvt3yr6MFTtXI7O4=NizCQvkU4qYZTIK08037_9o7QgWJui59krehTEt
> 83Gw=
> 
> Maranatha! <><
> John McKown
> 
> --
> 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: System REXX and UNIX

2016-10-12 Thread John McKown
On Wed, Oct 12, 2016 at 2:17 PM, Gibney, Dave  wrote:

> HLQ (tousercat) .varname.value
>

​What if "value" is does not adhere to a DSN node restrictions?​ Using
bpxwunix() in a TSO REXX environment seems to be the way to go, at least at
present. I can do things like:

stdin.0=0
stdout.0=0
stderr.0=0
rc=bpxwunix("echo 'value'
>/usr/SystemREXX/values/GLOBAL.VARNAME",stdin.,stdout.,stderr.);

rc=bpxwunix("cat
/usr/SystemREXX/values/GLOBAL.VARNAME",stdin.,stdout.,stderr.)
if stdout.0 = 0 then signal NOVALUE
say "value is:"stdout.1

rc=bpxunix('rm
/usr/SystemREXX/values/GLOBAL.VARNAME",stdin.,stdout.,stderr.)

Just seems easier than messing with the z/OS catalog. This seems to work
OK. I just wish that I could do things more directly / efficiently.

-- 
Heisenberg may have been here.

Unicode: http://xkcd.com/1726/

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: System REXX and UNIX

2016-10-12 Thread Gibney, Dave
HLQ (tousercat) .varname.value

> -Original Message-
> From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU]
> On Behalf Of John McKown
> Sent: Wednesday, October 12, 2016 9:59 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: System REXX and UNIX
> 
> On Wed, Oct 12, 2016 at 11:44 AM, Rob Schramm
> <rob.schr...@gmail.com> wrote:
> 
> > Create/delete catalog entries in a dedicated usercat.
> >
> 
> Hum, would be difficult to store a value into the catalog entry. But a DEFINE 
> &
> DELETE should be fairly quick, at least compared to actually creating a data
> set.
> 
> 
> 
> >
> > Rob Schramm
> >
> >
> 
> --
> Heisenberg may have been here.
> 
> Unicode: https://urldefense.proofpoint.com/v2/url?u=http-
> 3A__xkcd.com_1726_=DQIBaQ=C3yme8gMkxg_ihJNXS06ZyWk4EJm8L
> drrvxQb-
> Je7sw=u9g8rUevBoyCPAdo5sWE9w=Tez2u4JYGYk0ZXNXOuwsldzpqph
> awlmnYtvSO5CUU90=kGEXCu5ofO4XQ8RRC9UICJgniEBKRMkPAjPdq7wqEs
> E=
> 
> Maranatha! <><
> John McKown
> 
> --
> 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: System REXX and UNIX

2016-10-12 Thread Kirk Wolf
On Wed, Oct 12, 2016 at 10:41 AM, Paul Gilmartin <
000433f07816-dmarc-requ...@listserv.ua.edu> wrote:

> IIRC, I've used BPXWUNIX from IRXJCL.  I was trying to invent a smarter
> BPXBATCH.  Worked well.  I was able to allocate stdout and stderr to
> SYSOUT in the era before BPXBATCH supported that, and with SDSF to tail
> those SYSOUTs in real time.  (I suppose Co:Z might now provide a better
> solution.)
>
> Gil,
>From you this is high praise ;-)
Co:Z Batch is a tiny little 10-year old utility that simply does what
BPXBATCH should have done.
It is free to use and trivial to install with a register-free download.
https://dovetail.com/products/cozbatch.html

You are correct: you don't need an LE environment to use the BPX kernel
service calls. REXX doesn't have/use an LE environment AFAIK. I don't know
much about the System REXX environment, but I would assume kernel service
calls would work fine.   The REXX SYSCALL environment uses these, so I'm
not sure why it wouldn't work.   I would ask this on MVS-OE; Bill Schoen
might see it there and clarify.

Kirk Wolf
Dovetailed Technologies

PS> We are always interested in suggestions for improvement.   The last
change to Co:Z Batch
was a few years ago when we added support for JES System symbols.

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


Re: [EXTERNAL] Re: System REXX and UNIX

2016-10-12 Thread Dyck, Lionel B. (TRA)
You could write a routine to use system name/token pairs for the info.

Here is an article I wrote at the turn of the century about them

http://www.lbdsoftware.com/Using_System_Name-Token_Pairs.pdf

--
Lionel B. Dyck (TRA Contractor)
Mainframe Systems Programmer 
Enterprise Infrastructure Support (Station 200) (005OP6.3.10)
VA OI Service Delivery & Engineering


-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of John McKown
Sent: Wednesday, October 12, 2016 11:59 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: [EXTERNAL] Re: System REXX and UNIX

On Wed, Oct 12, 2016 at 11:44 AM, Rob Schramm <rob.schr...@gmail.com> wrote:

> Create/delete catalog entries in a dedicated usercat.
>

Hum, would be difficult to store a value into the catalog entry. But a DEFINE & 
DELETE should be fairly quick, at least compared to actually creating a data 
set.



>
> Rob Schramm
>
>

--
Heisenberg may have been here.

Unicode: http://xkcd.com/1726/

Maranatha! <><
John McKown

--
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: System REXX and UNIX

2016-10-12 Thread John McKown
On Wed, Oct 12, 2016 at 11:44 AM, Rob Schramm  wrote:

> Create/delete catalog entries in a dedicated usercat.
>

Hum, would be difficult to store a value into the catalog entry. But a
DEFINE & DELETE should be fairly quick, at least compared to actually
creating a data set.



>
> Rob Schramm
>
>

-- 
Heisenberg may have been here.

Unicode: http://xkcd.com/1726/

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: System REXX and UNIX

2016-10-12 Thread Rob Schramm
Create/delete catalog entries in a dedicated usercat.

Rob Schramm

On Wed, Oct 12, 2016, 11:42 AM Paul Gilmartin <
000433f07816-dmarc-requ...@listserv.ua.edu> wrote:

> On Wed, 12 Oct 2016 09:02:28 -0500, John McKown wrote:
>
> >On Wed, Oct 12, 2016 at 8:56 AM, Itschak Mugzach wrote:
> >
> >> John, try calling bpxwunix. Works great for me. What is great he the
> that
> >> results are returned in an array stem variable).
> >
> >​I'll try that. I wonder if I can do that in a non-TSO server. I'm trying
> >to avoid TSO based servers due to the limited number.​
> >
> IIRC, I've used BPXWUNIX from IRXJCL.  I was trying to invent a smarter
> BPXBATCH.  Worked well.  I was able to allocate stdout and stderr to
> SYSOUT in the era before BPXBATCH supported that, and with SDSF to tail
> those SYSOUTs in real time.  (I suppose Co:Z might now provide a better
> solution.)
>
> OTOH, assembler interfaces are available to all the UNIX kernel services.
>
> The Gripping Hand is whether kernel services are available whatever in
> System Rexx, with the added complication of making addresses of Rexx
> variables available to those assembler interfaces.  That would depend
> on (undocumented?) details of Rexx storage management.
>
> LE?  I don't believe kernel services have LE entanglements.
>
> -- gil
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>
-- 

Rob Schramm

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


Re: System REXX and UNIX

2016-10-12 Thread Jesse 1 Robinson
Many useful replies here. Just a note of caution. Automation that depends on 
starting a new address space will probably work fine 99% of the time. We 
previously used a product like that. The problem is when automation needs to 
take action to recover from a resource shortage. Spool full and ASM shortage 
come to mind. In the case of ASM shortage, another member of the same sysplex 
might be able to handle the situation, but in a monoplex you have no helper. In 
the case of spool full, all members are likely affected in the same way. In 
such situations, you need to have an already-running task to take action 
without have to start something new. If you need that capability anyway, best 
to design it that way from the beginning. 

I have not touched TSSO in many years, but the price is right and may well meet 
the criteria above. 

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


-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of John McKown
Sent: Wednesday, October 12, 2016 5:31 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: (External):System REXX and UNIX

OK, so I'm weird. That should be well known around here . I'm really 
getting into System REXX to help replace what CA-OPS/MVS does in our shop 
(remember we're dying and OPS license expires in Feb 2017).

What I am doing is using the MPFLSTxx member of PARMLIB to run a user exit, 
given to me by Dana Mitchell, called MPF2REXX which sets up some REXX variables 
then uses the AXREXX facility to run a System REXX program.

What would make some coding easier would be if I could do an ADDRESS SYSCALL. 
Unfortunately, this environment is not on the list of environments available in 
either (TSO & non-TSO) server. What I'm trying to do is emulate the use of 
"global" CA-OPS/MVS variables. I.e. variables which can be created in any rule 
and read / modified / deleted in any other rule. The easiest way that I've 
thought of is to have a UNIX directory dedicated to this functionality. I could 
then use the SYSCALL functions to create / read / write / delete files in this 
directory. The name of the file in the directory would be the same as the 
CA-OPS/MVS "global" variable.

Unfortunately, all that I can think of to do is to use System REXX's
axrcmd() function to do a START command to run an STC which is a batch TMP to 
run yet another REXX command to process the message. Passing all the data to 
the new STC may be a bit of a bother too. You need to know that I'm stuck on 
z/OS 1.12 and don't have a lot of the nice new JCL facilities (such as being 
able to programmatically read JCL symbols from // SET statements).

Does anyone have a different idea how to emulate CA-OPS/MVS global variables in 
System REXX programs, preferably in a non-TSO server?

--
Heisenberg may have been here.

Unicode: http://xkcd.com/1726/

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: System REXX and UNIX

2016-10-12 Thread Paul Gilmartin
On Wed, 12 Oct 2016 09:02:28 -0500, John McKown wrote:

>On Wed, Oct 12, 2016 at 8:56 AM, Itschak Mugzach wrote:
>
>> John, try calling bpxwunix. Works great for me. What is great he the that
>> results are returned in an array stem variable).
>
>​I'll try that. I wonder if I can do that in a non-TSO server. I'm trying
>to avoid TSO based servers due to the limited number.​
> 
IIRC, I've used BPXWUNIX from IRXJCL.  I was trying to invent a smarter
BPXBATCH.  Worked well.  I was able to allocate stdout and stderr to
SYSOUT in the era before BPXBATCH supported that, and with SDSF to tail
those SYSOUTs in real time.  (I suppose Co:Z might now provide a better
solution.)

OTOH, assembler interfaces are available to all the UNIX kernel services.

The Gripping Hand is whether kernel services are available whatever in
System Rexx, with the added complication of making addresses of Rexx
variables available to those assembler interfaces.  That would depend
on (undocumented?) details of Rexx storage management.

LE?  I don't believe kernel services have LE entanglements.

-- gil

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


Re: System REXX and UNIX

2016-10-12 Thread Itschak Mugzach
Send the msg to cn(00) as well just to verify that Mvs send works.

נשלח מה-iPad שלי

‫ב-12 באוק׳ 2016, בשעה 18:00, ‏‏John McKown ‏ 
כתב/ה:‬

>> On Wed, Oct 12, 2016 at 9:03 AM, Itschak Mugzach  wrote:
>> 
>> Don't make your mph exit serial. Just issue a 'F AXR,rexxname parm' to
>> start the Rexx msg handler. This way the Rexx will wait until a TSO region
>> is available, but your exit is not waiting for it to start.
>> 
> 
> ​The AXREXX macro has SYNC=NO,TSO=YES . I was told by the production person
> that she was missing some "job started" messages. At present, we are
> running parallel with the CA-OPS/MVS rule which sends out the TSO message
> as well. The user reported that she was getting the OPS message, but not
> the System REXX message. I am assuming that she is telling me what she saw.
> Unfortunately, there is nothing in the z/OS SYSLOG which I can look at.
> 
> I'm going to put in some debugging output and go back to using a TSO server.
> 
> 
> 
>> 
>> ITschak
>> 
>> 
> 
> -- 
> Heisenberg may have been here.
> 
> Unicode: http://xkcd.com/1726/
> 
> Maranatha! <><
> John McKown
> 
> --
> 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: System REXX and UNIX

2016-10-12 Thread John McKown
On Wed, Oct 12, 2016 at 9:03 AM, Itschak Mugzach  wrote:

> Don't make your mph exit serial. Just issue a 'F AXR,rexxname parm' to
> start the Rexx msg handler. This way the Rexx will wait until a TSO region
> is available, but your exit is not waiting for it to start.
>

​The AXREXX macro has SYNC=NO,TSO=YES . I was told by the production person
that she was missing some "job started" messages. At present, we are
running parallel with the CA-OPS/MVS rule which sends out the TSO message
as well. The user reported that she was getting the OPS message, but not
the System REXX message. I am assuming that she is telling me what she saw.
Unfortunately, there is nothing in the z/OS SYSLOG which I can look at.

I'm going to put in some debugging output and go back to using a TSO server.



>
> ITschak
>
>

-- 
Heisenberg may have been here.

Unicode: http://xkcd.com/1726/

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: System REXX and UNIX

2016-10-12 Thread Itschak Mugzach
Don't make your mph exit serial. Just issue a 'F AXR,rexxname parm' to start 
the Rexx msg handler. This way the Rexx will wait until a TSO region is 
available, but your exit is not waiting for it to start.

ITschak



נשלח מה-iPad שלי

‫ב-12 באוק׳ 2016, בשעה 16:42, ‏‏John McKown ‏ 
כתב/ה:‬

>> On Wed, Oct 12, 2016 at 8:31 AM, Dana Mitchell  wrote:
>> 
>> On Wed, 12 Oct 2016 07:31:16 -0500, John McKown <
>> john.archie.mck...@gmail.com> wrote:
>> 
>>> What I'm trying to do is emulate the use of "global" CA-OPS/MVS
>> variables. I.e. variables which can
>>> be created in any rule and read / modified / deleted in any other rule.
>> 
>> John,
>> 
>> I emulated the services of Netview global variables (albeit inelegantly)
>> by using a rexx function that created a traditional MVS dataset for each
>> global variable.
> 
> ​I was trying to avoid that. Creating a UNIX file is significantly faster
> than creating a z/OS data set. ​
> 
> 
> 
>> 
>> Depending on your number of variables and update frequency, this may or
>> may not be the best solution but it works in our environment.
>> 
>> ​
> ​Thanks for the example code.
> 
> As an aside, I had to create a variant of your MPF2REXX. It is identical,
> but has TSO=NO to create a non-TSO server. The reason is because I tried
> using MPF2REXX to issue alert specific TSO users when specific batch jobs
> start (message IEF403I). The production control person at night likes this
> because she prints a list of critical path jobs to be run that night. When
> she gets the TSO message, she marks the job off the list. The problem is
> that there is a maximum of 8 TSO servers. And the way she schedules the
> jobs, about 10 take off all at the same time. This results in some of the
> message for a tracked job to not be sent because there is no server
> available. I created the new program to invoke the REXX program in a
> non-TSO server, of which there are 64.​
> 
> ​I simply use the axrcmd() to do a z/OS console SEND command instead of a
> TSO SEND command, which is what was being used in CA-OPS/MVS. I really
> don't much care for this processing, but she's been doing it that way for
> years and it comforts her. Because she is the last of the production
> people, I figure that I need to make her job as simple as I can for her.​
> 
> 
> -- 
> Heisenberg may have been here.
> 
> Unicode: http://xkcd.com/1726/
> 
> Maranatha! <><
> John McKown
> 
> --
> 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: System REXX and UNIX

2016-10-12 Thread John McKown
On Wed, Oct 12, 2016 at 8:56 AM, Itschak Mugzach  wrote:

> John, try calling bpxwunix. Works great for me. What is great he the that
> results are returned in an array stem variable).
>

​I'll try that. I wonder if I can do that in a non-TSO server. I'm trying
to avoid TSO based servers due to the limited number.​


> ITschal
>


-- 
Heisenberg may have been here.

Unicode: http://xkcd.com/1726/

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: System REXX and UNIX

2016-10-12 Thread Itschak Mugzach
John, try calling bpxwunix. Works great for me. What is great he the that 
results are returned in an array stem variable).

ITschal

נשלח מה-iPad שלי

‫ב-12 באוק׳ 2016, בשעה 15:31, ‏‏John McKown ‏ 
כתב/ה:‬

> OK, so I'm weird. That should be well known around here . I'm really
> getting into System REXX to help replace what CA-OPS/MVS does in our shop
> (remember we're dying and OPS license expires in Feb 2017).
> 
> What I am doing is using the MPFLSTxx member of PARMLIB to run a user exit,
> given to me by Dana Mitchell, called MPF2REXX which sets up some REXX
> variables then uses the AXREXX facility to run a System REXX program.
> 
> What would make some coding easier would be if I could do an ADDRESS
> SYSCALL. Unfortunately, this environment is not on the list of environments
> available in either (TSO & non-TSO) server. What I'm trying to do is
> emulate the use of "global" CA-OPS/MVS variables. I.e. variables which can
> be created in any rule and read / modified / deleted in any other rule. The
> easiest way that I've thought of is to have a UNIX directory dedicated to
> this functionality. I could then use the SYSCALL functions to create / read
> / write / delete files in this directory. The name of the file in the
> directory would be the same as the CA-OPS/MVS "global" variable.
> 
> Unfortunately, all that I can think of to do is to use System REXX's
> axrcmd() function to do a START command to run an STC which is a batch TMP
> to run yet another REXX command to process the message. Passing all the
> data to the new STC may be a bit of a bother too. You need to know that I'm
> stuck on z/OS 1.12 and don't have a lot of the nice new JCL facilities
> (such as being able to programmatically read JCL symbols from // SET
> statements).
> 
> Does anyone have a different idea how to emulate CA-OPS/MVS global
> variables in System REXX programs, preferably in a non-TSO server?
> 
> -- 
> Heisenberg may have been here.
> 
> Unicode: http://xkcd.com/1726/
> 
> Maranatha! <><
> John McKown
> 
> --
> 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: System REXX and UNIX

2016-10-12 Thread John McKown
On Wed, Oct 12, 2016 at 8:31 AM, Dana Mitchell  wrote:

> On Wed, 12 Oct 2016 07:31:16 -0500, John McKown <
> john.archie.mck...@gmail.com> wrote:
>
> > What I'm trying to do is emulate the use of "global" CA-OPS/MVS
> variables. I.e. variables which can
> >be created in any rule and read / modified / deleted in any other rule.
>
> John,
>
> I emulated the services of Netview global variables (albeit inelegantly)
> by using a rexx function that created a traditional MVS dataset for each
> global variable.
>

​I was trying to avoid that. Creating a UNIX file is significantly faster
than creating a z/OS data set. ​



>
> Depending on your number of variables and update frequency, this may or
> may not be the best solution but it works in our environment.
>
> ​
>
>
​Thanks for the example code.

As an aside, I had to create a variant of your MPF2REXX. It is identical,
but has TSO=NO to create a non-TSO server. The reason is because I tried
using MPF2REXX to issue alert specific TSO users when specific batch jobs
start (message IEF403I). The production control person at night likes this
because she prints a list of critical path jobs to be run that night. When
she gets the TSO message, she marks the job off the list. The problem is
that there is a maximum of 8 TSO servers. And the way she schedules the
jobs, about 10 take off all at the same time. This results in some of the
message for a tracked job to not be sent because there is no server
available. I created the new program to invoke the REXX program in a
non-TSO server, of which there are 64.​

​I simply use the axrcmd() to do a z/OS console SEND command instead of a
TSO SEND command, which is what was being used in CA-OPS/MVS. I really
don't much care for this processing, but she's been doing it that way for
years and it comforts her. Because she is the last of the production
people, I figure that I need to make her job as simple as I can for her.​


-- 
Heisenberg may have been here.

Unicode: http://xkcd.com/1726/

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: System REXX and UNIX

2016-10-12 Thread Dana Mitchell
On Wed, 12 Oct 2016 07:31:16 -0500, John McKown  
wrote:

> What I'm trying to do is emulate the use of "global" CA-OPS/MVS variables. 
> I.e. variables which can
>be created in any rule and read / modified / deleted in any other rule. 

John,

I emulated the services of Netview global variables (albeit inelegantly) by 
using a rexx function that created a traditional MVS dataset for each global 
variable.  

Depending on your number of variables and update frequency, this may or may not 
be the best solution but it works in our environment.

GLOBALV:

/* REXX - GLOBALV - Process Global Variable  */ 
 
/*   */ 
 
/* Usage:  GLOBALV(verb,name,contents)   */ 
 
/* Where verb is:  SET  or S  -  Set variable*/ 
 
/* QUERY or Q -  Query variable  */ 
 
/* DELETE or D - Delete varable  */ 
 
/*   */ 
 
/* name is varable name  */ 
 
/* value is what to set the varable to   */ 
 
/*   */ 
 
Parse arg verb, name, value 
 

 
If wordpos(verb,'QUERY Q SET S DELETE D') < 1 Then Return -1
 
/* x=msg(off)*//* turn off messages   */
 
"FREE FI(GLOBDD)" /* Free the DD */ 
 

 

 
dsn = "'SYS3.GLOBAL."name"'"/* Set global file name*/   
 

 
Select  
 
  When left(verb,1) = 'S' Then Do   
 

 
   "ALLOC FILE(GLOBDD) DA("dsn") SHR" /* Try allocating it   */ 
 

 
   If rc > 0 Then Do  /* Allocation failed   */ 
 
  /* so need to  */ 
 
  "ALLOC FILE(GLOBDD) DA("dsn")", /* Allocate a new one  */ 
 
"SPACE(1,1) TRACKS",
 
"DSORG(PS) NEW CATALOG",
 
"RECFM(V B) LRECL(32760)"   
 
  End   
 

 
   LINE.1  = value/* Set it to passed value */  
 
   "EXECIO 0 DISKW GLOBDD (OPEN"  /* and write it out*/ 
 
   "EXECIO * DISKW GLOBDD (STEM LINE."  
 
   "EXECIO 0 DISKW GLOBDD (FINIS"  /* and close it*/
 
   "FREE FI(GLOBDD)"  /* Free the DD */ 
 

 
   Return 'OK'  
 

 
  end   
 
  When left(verb,1) = 'D' Then Do   
 
   
   "DELETE" dsn   /* Delete it   */
   
   Return 'OK' 
   
  end  
  When left(verb,1) = 'Q' then Do  
   
   "ALLOC FILE(GLOBDD) DA("dsn") SHR" /* Try allocating it   */
   
   If rc > 0 Then Do  /* Allocation failed   */

Re: [EXTERNAL] System REXX and UNIX

2016-10-12 Thread John McKown
On Wed, Oct 12, 2016 at 7:42 AM, Dyck, Lionel B. (TRA) 
wrote:

> What about looking into using TSSO (see CBT file 404).  Then from your MPF
> you can issue a TSSO command, or just use TSSO instead of MPF.
>

​Oh, yeah. That does work on z/OS 1.12. I'll look at it.​


>
> --
> Lionel B. Dyck (TRA Contractor)
> Mainframe Systems Programmer
> Enterprise Infrastructure Support (Station 200) (005OP6.3.10)
> VA OI Service Delivery & Engineering
>
>

-- 
Heisenberg may have been here.

Unicode: http://xkcd.com/1726/

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: [EXTERNAL] System REXX and UNIX

2016-10-12 Thread Dyck, Lionel B. (TRA)
What about looking into using TSSO (see CBT file 404).  Then from your MPF you 
can issue a TSSO command, or just use TSSO instead of MPF.

--
Lionel B. Dyck (TRA Contractor)
Mainframe Systems Programmer 
Enterprise Infrastructure Support (Station 200) (005OP6.3.10)
VA OI Service Delivery & Engineering

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of John McKown
Sent: Wednesday, October 12, 2016 7:31 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: [EXTERNAL] System REXX and UNIX

OK, so I'm weird. That should be well known around here . I'm really 
getting into System REXX to help replace what CA-OPS/MVS does in our shop 
(remember we're dying and OPS license expires in Feb 2017).

What I am doing is using the MPFLSTxx member of PARMLIB to run a user exit, 
given to me by Dana Mitchell, called MPF2REXX which sets up some REXX variables 
then uses the AXREXX facility to run a System REXX program.

What would make some coding easier would be if I could do an ADDRESS SYSCALL. 
Unfortunately, this environment is not on the list of environments available in 
either (TSO & non-TSO) server. What I'm trying to do is emulate the use of 
"global" CA-OPS/MVS variables. I.e. variables which can be created in any rule 
and read / modified / deleted in any other rule. The easiest way that I've 
thought of is to have a UNIX directory dedicated to this functionality. I could 
then use the SYSCALL functions to create / read / write / delete files in this 
directory. The name of the file in the directory would be the same as the 
CA-OPS/MVS "global" variable.

Unfortunately, all that I can think of to do is to use System REXX's
axrcmd() function to do a START command to run an STC which is a batch TMP to 
run yet another REXX command to process the message. Passing all the data to 
the new STC may be a bit of a bother too. You need to know that I'm stuck on 
z/OS 1.12 and don't have a lot of the nice new JCL facilities (such as being 
able to programmatically read JCL symbols from // SET statements).

Does anyone have a different idea how to emulate CA-OPS/MVS global variables in 
System REXX programs, preferably in a non-TSO server?

--
Heisenberg may have been here.

Unicode: http://xkcd.com/1726/

Maranatha! <><
John McKown

--
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


System REXX and UNIX

2016-10-12 Thread John McKown
OK, so I'm weird. That should be well known around here . I'm really
getting into System REXX to help replace what CA-OPS/MVS does in our shop
(remember we're dying and OPS license expires in Feb 2017).

What I am doing is using the MPFLSTxx member of PARMLIB to run a user exit,
given to me by Dana Mitchell, called MPF2REXX which sets up some REXX
variables then uses the AXREXX facility to run a System REXX program.

What would make some coding easier would be if I could do an ADDRESS
SYSCALL. Unfortunately, this environment is not on the list of environments
available in either (TSO & non-TSO) server. What I'm trying to do is
emulate the use of "global" CA-OPS/MVS variables. I.e. variables which can
be created in any rule and read / modified / deleted in any other rule. The
easiest way that I've thought of is to have a UNIX directory dedicated to
this functionality. I could then use the SYSCALL functions to create / read
/ write / delete files in this directory. The name of the file in the
directory would be the same as the CA-OPS/MVS "global" variable.

Unfortunately, all that I can think of to do is to use System REXX's
axrcmd() function to do a START command to run an STC which is a batch TMP
to run yet another REXX command to process the message. Passing all the
data to the new STC may be a bit of a bother too. You need to know that I'm
stuck on z/OS 1.12 and don't have a lot of the nice new JCL facilities
(such as being able to programmatically read JCL symbols from // SET
statements).

Does anyone have a different idea how to emulate CA-OPS/MVS global
variables in System REXX programs, preferably in a non-TSO server?

-- 
Heisenberg may have been here.

Unicode: http://xkcd.com/1726/

Maranatha! <><
John McKown

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