Re: How tell if have OMVS Segment

2014-09-12 Thread Shmuel Metz (Seymour J.)
In
caajsdjjvuobzy38o4a7gbx_6j+mbh-yobwhpz5pjchpex5a...@mail.gmail.com,
on 09/11/2014
   at 12:09 PM, John McKown john.archie.mck...@gmail.com said:

According to what others have said, it is because the COBOL team 
has said: There is no need. They are self explanatory to a COBOL 
programmer.. 

I have seen self explanatory messages; I haver never seen a self
explanatory message whose author claimed it to be self explanatory. 
 
-- 
 Shmuel (Seymour J.) Metz, SysProg and JOAT
 ISO position; see http://patriot.net/~shmuel/resume/brief.html 
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: How tell if have OMVS Segment

2014-09-12 Thread Shmuel Metz (Seymour J.)
In 028501cfcde7$0b645d20$222d1760$@mcn.org, on 09/11/2014
   at 10:37 AM, Charles Mills charl...@mcn.org said:

I have verified by testing that for some condition -- presumably
RUNOPTS( POSIX(ON) ) -- LE ABENDs on initialization, before 
running a single user instruction, if the userid does not have an 
OMVS segment. So as a programmer I have no (simple) ability to 
provide a user-friendly message rather than a fairly obscure 
ABEND.

There *is* a simple way to do it but, IMHO, it is a kludge; add
another step to the JCL for the sole purpose of validating the user.
Were I a vendor, I would be embarrassed at having to suggest that to a
customer instead of fixing the code to produce a reasonable message.

Is there an open requirement on this?
 
-- 
 Shmuel (Seymour J.) Metz, SysProg and JOAT
 ISO position; see http://patriot.net/~shmuel/resume/brief.html 
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: How tell if have OMVS Segment

2014-09-12 Thread Charles Mills
I am wondering about another possibility. I have not RTFM yet, but isn't it
possible to replace or provide one's own CEESTART? If so one might write a
replacement CEESTART that was merely a front-end to the IBM CEESTART, and
did this check before proceeding on to IBM CEESTART.

Such a solution would be fairly universal and could go on the CBT tape.

Charles

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of Shmuel Metz (Seymour J.)
Sent: Thursday, September 11, 2014 12:16 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: How tell if have OMVS Segment

In 028501cfcde7$0b645d20$222d1760$@mcn.org, on 09/11/2014
   at 10:37 AM, Charles Mills charl...@mcn.org said:

I have verified by testing that for some condition -- presumably 
RUNOPTS( POSIX(ON) ) -- LE ABENDs on initialization, before running a 
single user instruction, if the userid does not have an OMVS segment. 
So as a programmer I have no (simple) ability to provide a 
user-friendly message rather than a fairly obscure ABEND.

There *is* a simple way to do it but, IMHO, it is a kludge; add another step
to the JCL for the sole purpose of validating the user.
Were I a vendor, I would be embarrassed at having to suggest that to a
customer instead of fixing the code to produce a reasonable message.

Is there an open requirement on this?

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


Re: How tell if have OMVS Segment

2014-09-12 Thread Scott Ford
Charles:


I would think so, the logic to me is sound..Some LE supported languages do it 
automatically, I.E. Cobol, I think C or C++ does..

If it doesn't it should for sure.


Regards,

Scott





From: charl...@mcn.org
Sent: ‎Friday‎, ‎September‎ ‎12‎, ‎2014 ‎10‎:‎40‎ ‎AM
To: IBM Mainframe Discussion List





I am wondering about another possibility. I have not RTFM yet, but isn't it
possible to replace or provide one's own CEESTART? If so one might write a
replacement CEESTART that was merely a front-end to the IBM CEESTART, and
did this check before proceeding on to IBM CEESTART.

Such a solution would be fairly universal and could go on the CBT tape.

Charles

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of Shmuel Metz (Seymour J.)
Sent: Thursday, September 11, 2014 12:16 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: How tell if have OMVS Segment

In 028501cfcde7$0b645d20$222d1760$@mcn.org, on 09/11/2014
   at 10:37 AM, Charles Mills charl...@mcn.org said:

I have verified by testing that for some condition -- presumably 
RUNOPTS( POSIX(ON) ) -- LE ABENDs on initialization, before running a 
single user instruction, if the userid does not have an OMVS segment. 
So as a programmer I have no (simple) ability to provide a 
user-friendly message rather than a fairly obscure ABEND.

There *is* a simple way to do it but, IMHO, it is a kludge; add another step
to the JCL for the sole purpose of validating the user.
Were I a vendor, I would be embarrassed at having to suggest that to a
customer instead of fixing the code to produce a reasonable message.

Is there an open requirement on this?

--
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: How tell if have OMVS Segment

2014-09-11 Thread Elardus Engelbrecht
Charles Mills wrote:

Is there a function or MACRO that will tell me yea/nay on having an OMVS 
segment?

Try using IRRXUTIL or a similar Callable services to check on RACF how your own 
ACEE is setup. You may need access to IRR.RADMIN.** profile.

BPX1QDB is also a good one as suggested by others.

Groete / Greetings
Elardus Engelbrecht

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


Re: How tell if have OMVS Segment

2014-09-11 Thread Steve Comstock

Revised my earlier example; see embeded below


On 9/10/2014 7:35 PM, John McKown wrote:

On Wed, Sep 10, 2014 at 5:22 PM, Charles Mills charl...@mcn.org wrote:

I am responsible for an LE-enabled program that runs as a conventional STC
but uses various USS services and hence requires an OMVS segment. Currently,
if it does not have one, it fails with a U4093/90 (?) ABEND. I would like it
to be a little neater than that and put out a No OMVS segment message and
quit gracefully.

Is there a function or MACRO that will tell me yea/nay on having an OMVS
segment?

Thanks,

Charles


I have never done this because we set up the RACF facility which
automatically creates an OMVS segment if a RACF id which does not have
one attempts to do any UNIX work. But I am fairly sure the magic word
is querydub. It is documented here:
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/BPXZB1C0/2.145


77 QUERY-DUB PIC X(8) VALUE IS BPX1QDB'.
77 QD-RETVAL PIC S9(9) BINARY.
77 QD-RETRC PIC S9(9) BINARY.
77 QD-RETRSN PIC S9(9) BINARY.


CALL QUERY-DUB USING QD-RETVAL QD-RETRC QD-RETRSN.
IF QD-RETVAL IS EQUAL TO 4 THEN
 DISPLAY 'UNIX FACILITIES ARE NOT AVAILABLE TO THIS JOB DUE TO RACF
REQUIREMENTS'
UPON SYSOUT
 MOVE +20 TO RETURN-CODE
 STOP RUN
END-IF


I am fairly sure that something like the above will work for you. Oh,
for some reason I think you are using COBOL. But the above manual has
examples in HLASM too. C would be more difficult. You'd need to
declare BPX1QDB as having OS linkage conventions.


Maybe ...

#pragma linkage(BPX1QDB,OS);


int ret_val = 0;
int ret_code = 0;
int ret_reason = 0;

...


void BPX1QDB(int *, int *, int *);

...

   BPX1QDB(ret_val, ret_code, ret_reason);



I don't recall off
hand how to do a fetch and dynamic call in C.  And I don't have
any examples here at home.





typedef void (*mydnamcl) (int *, int *, int *);

   mydnamcl callptr;

   ...

 callptr = (mydnamcl) fetch(BPX1DQB);

 (callptr) (ret_val, ret_code, ret_reason);



Worth a shot.

-Steve Comstock

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


Re: How tell if have OMVS Segment

2014-09-11 Thread Charles Mills
Thanks all.

1. Source language is C++. I know how to call an assembler function from C++. 
It seems odd to me that IBM would make such a basic OMVS function available to 
assembler programs but only by the way available to C programs, but whatever.

2. Definitely no Rexx involved.

3. I have this nagging fear that the problem is that because the program is 
compiled #pragma RUNOPTS(POSIX(ON)) that as a result LE is failing it before my 
first user instruction executes, and therefore I have no ability to issue a 
more user-friendly message than a U4093 ABEND. I am trying to confirm that. I 
am currently wrestling with an internal you can't get there from here 
situation relative to testing with a no-OMVS-segment userid. Does anyone happen 
to *know* whether this is the case? That POSIX(ON) means LE requires an OMVS 
segment during program LE initialization?

I wish IBM wouldn't do this. Logically, a U4093/90 ABEND is no different from 
an error message, but it does not work that way with customer psychology. We 
send out a trial package, the customer runs the product (and yes, we document 
the need for an OMS segment, but who reads documentation? Not our customers.) 
and it gets a U4093 ABEND. Does the customer look it up? No, he picks up the 
phone, calls the salesman and says your product blows up when we try to run 
it. The salesman tells support. By then the customer has deleted the SYSOUT 
without noting the exact ABEND, so we have to persuade the disgruntled prospect 
to run the product AGAIN -- he inevitably reports no better -- it's STILL 
blowing up so we can get the ABEND code and diagnose the problem. In fact, get 
all of the symptoms because at that point we don't know that the ABEND number 
will be sufficient to diagnose the problem. A nice, readable message, either 
from LE or from us, would be a lot better all around. End of rant.

Charles

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Steve Comstock
Sent: Thursday, September 11, 2014 5:12 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: How tell if have OMVS Segment

Revised my earlier example; see embeded below


On 9/10/2014 7:35 PM, John McKown wrote:
 On Wed, Sep 10, 2014 at 5:22 PM, Charles Mills charl...@mcn.org wrote:
 I am responsible for an LE-enabled program that runs as a 
 conventional STC but uses various USS services and hence requires an 
 OMVS segment. Currently, if it does not have one, it fails with a 
 U4093/90 (?) ABEND. I would like it to be a little neater than that 
 and put out a No OMVS segment message and quit gracefully.

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


Re: How tell if have OMVS Segment

2014-09-11 Thread John McKown
On Thu, Sep 11, 2014 at 9:25 AM, Charles Mills charl...@mcn.org wrote:
 Thanks all.

 1. Source language is C++. I know how to call an assembler function from 
 C++. It seems odd to me that IBM would make such a basic OMVS function 
 available to assembler programs but only by the way available to C 
 programs, but whatever.

 2. Definitely no Rexx involved.

 3. I have this nagging fear that the problem is that because the program is 
 compiled #pragma RUNOPTS(POSIX(ON)) that as a result LE is failing it before 
 my first user instruction executes, and therefore I have no ability to 
 issue a more user-friendly message than a U4093 ABEND. I am trying to confirm 
 that. I am currently wrestling with an internal you can't get there from 
 here situation relative to testing with a no-OMVS-segment userid. Does 
 anyone happen to *know* whether this is the case? That POSIX(ON) means LE 
 requires an OMVS segment during program LE initialization?


I cannot find a simple document which says something like: A
POSIX(ON) application requires that an OMVS segment exist for the RACF
id which is running the application. I can see this:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ceea91c0/1.407
quote

CEE3632I  POSIX(ON) run-time option specified and the UNIX System Services
 feature is not available on the underlying operating system.

/quote

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ceea91c0/1.531
quote

 CEE5002S  POSIX function was not available. UNIX System Services were not
 started.
/quote

From which, one can conclude that using POSIX(ON) requires z/OS UNIX
System Services be available. Which requires, at least in z/OS V1R13+,
that the RACF user under which the program is running must have an
OMVS segment.

 I wish IBM wouldn't do this. Logically, a U4093/90 ABEND is no different from 
 an error message, but it does not work that way with customer psychology. We 
 send out a trial package, the customer runs the product (and yes, we document 
 the need for an OMS segment, but who reads documentation? Not our customers.) 
 and it gets a U4093 ABEND. Does the customer look it up? No, he picks up the 
 phone, calls the salesman and says your product blows up when we try to run 
 it. The salesman tells support. By then the customer has deleted the SYSOUT 
 without noting the exact ABEND, so we have to persuade the disgruntled 
 prospect to run the product AGAIN -- he inevitably reports no better -- it's 
 STILL blowing up so we can get the ABEND code and diagnose the problem. In 
 fact, get all of the symptoms because at that point we don't know that the 
 ABEND number will be sufficient to diagnose the problem. A nice, readable 
 message, either from LE or from us, would be a lot better all around. End of 
 rant.


I agree that a message to the effect of RUNNING A POSIX(ON)
APPLICATION REQUIRES AN OMVS SEGMENT would be nice. I guess that
today's businesses simply don't want to understand anything outside of
their specific market. That is why our company executives have said
We are in the health business, not the IT business. Which is what is
driving them to using ?aaS (SaaS, IaaS, PaaS, etc) in preference to
having on-site hardware/software beyond the desktop. In the old days,
this was lumped under time sharing and outsourcing. I am guessing,
and that's all it is, that eventually this company will have only
application programmers and _maybe_ a group to do telephony and
desktop support. They might even try to use as needed consultants
for that. (like Geek'R'Us or something).

 Charles

-- 
There is nothing more pleasant than traveling and meeting new people!
Genghis Khan

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: How tell if have OMVS Segment

2014-09-11 Thread Charles Mills
Thanks. Agree with what you say about business. What's to disagree with?

I find that x requires y is a general lack in the USS etc. documentation. I 
couldn't find POSIX(ON) requires an OMVS segment anywhere either. (Believe it 
or not, I searched TFM before posting what I wrote below.) But I suspect it 
does. *We* document that our product requires an OMVS segment -- why would it 
be so hard for the POSIX(ON) team to do the same thing?

Charles

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of John McKown
Sent: Thursday, September 11, 2014 8:37 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: How tell if have OMVS Segment

On Thu, Sep 11, 2014 at 9:25 AM, Charles Mills charl...@mcn.org wrote:
 Thanks all.

 1. Source language is C++. I know how to call an assembler function from 
 C++. It seems odd to me that IBM would make such a basic OMVS function 
 available to assembler programs but only by the way available to C 
 programs, but whatever.

 2. Definitely no Rexx involved.

 3. I have this nagging fear that the problem is that because the program is 
 compiled #pragma RUNOPTS(POSIX(ON)) that as a result LE is failing it before 
 my first user instruction executes, and therefore I have no ability to 
 issue a more user-friendly message than a U4093 ABEND. I am trying to confirm 
 that. I am currently wrestling with an internal you can't get there from 
 here situation relative to testing with a no-OMVS-segment userid. Does 
 anyone happen to *know* whether this is the case? That POSIX(ON) means LE 
 requires an OMVS segment during program LE initialization?


I cannot find a simple document which says something like: A
POSIX(ON) application requires that an OMVS segment exist for the RACF id which 
is running the application. I can see this:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ceea91c0/1.407
quote

CEE3632I  POSIX(ON) run-time option specified and the UNIX System Services
 feature is not available on the underlying operating system.

/quote

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ceea91c0/1.531
quote

 CEE5002S  POSIX function was not available. UNIX System Services were not
 started.
/quote

From which, one can conclude that using POSIX(ON) requires z/OS UNIX System 
Services be available. Which requires, at least in z/OS V1R13+, that the RACF 
user under which the program is running must have an OMVS segment.

 I wish IBM wouldn't do this. Logically, a U4093/90 ABEND is no different from 
 an error message, but it does not work that way with customer psychology. We 
 send out a trial package, the customer runs the product (and yes, we document 
 the need for an OMS segment, but who reads documentation? Not our customers.) 
 and it gets a U4093 ABEND. Does the customer look it up? No, he picks up the 
 phone, calls the salesman and says your product blows up when we try to run 
 it. The salesman tells support. By then the customer has deleted the SYSOUT 
 without noting the exact ABEND, so we have to persuade the disgruntled 
 prospect to run the product AGAIN -- he inevitably reports no better -- it's 
 STILL blowing up so we can get the ABEND code and diagnose the problem. In 
 fact, get all of the symptoms because at that point we don't know that the 
 ABEND number will be sufficient to diagnose the problem. A nice, readable 
 message, either from LE or from us, would be a lot better all around. End of 
 rant.


I agree that a message to the effect of RUNNING A POSIX(ON) APPLICATION 
REQUIRES AN OMVS SEGMENT would be nice. I guess that today's businesses simply 
don't want to understand anything outside of their specific market. That is why 
our company executives have said We are in the health business, not the IT 
business. Which is what is driving them to using ?aaS (SaaS, IaaS, PaaS, etc) 
in preference to having on-site hardware/software beyond the desktop. In the 
old days, this was lumped under time sharing and outsourcing. I am 
guessing, and that's all it is, that eventually this company will have only 
application programmers and _maybe_ a group to do telephony and desktop 
support. They might even try to use as needed consultants for that. (like 
Geek'R'Us or something).

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


Re: How tell if have OMVS Segment

2014-09-11 Thread John McKown
On Thu, Sep 11, 2014 at 11:16 AM, Charles Mills charl...@mcn.org wrote:
 Thanks. Agree with what you say about business. What's to disagree with?

 I find that x requires y is a general lack in the USS etc. documentation. I 
 couldn't find POSIX(ON) requires an OMVS segment anywhere either. (Believe 
 it or not, I searched TFM before posting what I wrote below.) But I suspect 
 it does. *We* document that our product requires an OMVS segment -- why would 
 it be so hard for the POSIX(ON) team to do the same thing?

 Charles

warning comments=sarcastic
Perhaps the UNIX people came from the COBOL team and were UNIX
developers in another life. The COBOL compiler messages are _not_
documented in a manual. According to what others have said, it is
because the COBOL team has said: There is no need. They are self
explanatory to a COBOL programmer.. Well, what is POSIX? From:
http://en.wikipedia.org/wiki/POSIX: POSIX (/ˈpɒzɪks/ poz-iks), an
acronym for Portable Operating System Interface, is a family of
standards specified by the IEEE for maintaining compatibility between
operating systems. POSIX defines the application programming interface
(API), along with command line shells and utility interfaces, for
software compatibility with variants of Unix and other operating
systems. . Which sarcasm plainly states /sarcasm that POSIX means
UNIX. From which it is _obvious_ that POSIX(ON) implies that z/OS UNIX
facilities are required. And that means the RACF id needs a OMVS
segment. So why bother to redundantly actually say it? And, as any
UNIX guru will tell you: If you don't know it, then don't try to use
it!. Those who can, write code. Those who can't write code, write
documentation. Users can do neither and so shouldn't be touching
keyboards anyway. Hum, I may have a touch of UNIXism in my blood.
/warning
-- 
There is nothing more pleasant than traveling and meeting new people!
Genghis Khan

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: How tell if have OMVS Segment

2014-09-11 Thread Scott Ford
Charles,


It sounds like IMHO, that IBM needs to have build or review Language Ref or 
Guides. I run into the same sort of issues. Especially, when you trying to 
shoot a bug or develop something new. LE services or function doc is getting 
better for sure. But mixing and matching functionality and code…boy






Scott





From: charl...@mcn.org
Sent: ‎Thursday‎, ‎September‎ ‎11‎, ‎2014 ‎12‎:‎16‎ ‎PM
To: IBM Mainframe Discussion List





Thanks. Agree with what you say about business. What's to disagree with?

I find that x requires y is a general lack in the USS etc. documentation. I 
couldn't find POSIX(ON) requires an OMVS segment anywhere either. (Believe it 
or not, I searched TFM before posting what I wrote below.) But I suspect it 
does. *We* document that our product requires an OMVS segment -- why would it 
be so hard for the POSIX(ON) team to do the same thing?

Charles

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of John McKown
Sent: Thursday, September 11, 2014 8:37 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: How tell if have OMVS Segment

On Thu, Sep 11, 2014 at 9:25 AM, Charles Mills charl...@mcn.org wrote:
 Thanks all.

 1. Source language is C++. I know how to call an assembler function from 
 C++. It seems odd to me that IBM would make such a basic OMVS function 
 available to assembler programs but only by the way available to C 
 programs, but whatever.

 2. Definitely no Rexx involved.

 3. I have this nagging fear that the problem is that because the program is 
 compiled #pragma RUNOPTS(POSIX(ON)) that as a result LE is failing it before 
 my first user instruction executes, and therefore I have no ability to 
 issue a more user-friendly message than a U4093 ABEND. I am trying to confirm 
 that. I am currently wrestling with an internal you can't get there from 
 here situation relative to testing with a no-OMVS-segment userid. Does 
 anyone happen to *know* whether this is the case? That POSIX(ON) means LE 
 requires an OMVS segment during program LE initialization?


I cannot find a simple document which says something like: A
POSIX(ON) application requires that an OMVS segment exist for the RACF id which 
is running the application. I can see this:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ceea91c0/1.407
quote

CEE3632I  POSIX(ON) run-time option specified and the UNIX System Services
 feature is not available on the underlying operating system.

/quote

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ceea91c0/1.531
quote

 CEE5002S  POSIX function was not available. UNIX System Services were not
 started.
/quote

From which, one can conclude that using POSIX(ON) requires z/OS UNIX System 
Services be available. Which requires, at least in z/OS V1R13+, that the RACF 
user under which the program is running must have an OMVS segment.

 I wish IBM wouldn't do this. Logically, a U4093/90 ABEND is no different from 
 an error message, but it does not work that way with customer psychology. We 
 send out a trial package, the customer runs the product (and yes, we document 
 the need for an OMS segment, but who reads documentation? Not our customers.) 
 and it gets a U4093 ABEND. Does the customer look it up? No, he picks up the 
 phone, calls the salesman and says your product blows up when we try to run 
 it. The salesman tells support. By then the customer has deleted the SYSOUT 
 without noting the exact ABEND, so we have to persuade the disgruntled 
 prospect to run the product AGAIN -- he inevitably reports no better -- it's 
 STILL blowing up so we can get the ABEND code and diagnose the problem. In 
 fact, get all of the symptoms because at that point we don't know that the 
 ABEND number will be sufficient to diagnose the problem. A nice, readable 
 message, either from LE or from us, would be a lot better all around. End of 
 rant.


I agree that a message to the effect of RUNNING A POSIX(ON) APPLICATION 
REQUIRES AN OMVS SEGMENT would be nice. I guess that today's businesses simply 
don't want to understand anything outside of their specific market. That is why 
our company executives have said We are in the health business, not the IT 
business. Which is what is driving them to using ?aaS (SaaS, IaaS, PaaS, etc) 
in preference to having on-site hardware/software beyond the desktop. In the 
old days, this was lumped under time sharing and outsourcing. I am 
guessing, and that's all it is, that eventually this company will have only 
application programmers and _maybe_ a group to do telephony and desktop 
support. They might even try to use as needed consultants for that. (like 
Geek'R'Us or something).

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

Re: How tell if have OMVS Segment

2014-09-11 Thread Charles Mills
And the answer is ...

I have verified by testing that for some condition -- presumably RUNOPTS( 
POSIX(ON) ) -- LE ABENDs on initialization, before running a single user 
instruction, if the userid does not have an OMVS segment. So as a programmer I 
have no (simple) ability to provide a user-friendly message rather than a 
fairly obscure ABEND.

I missed one obvious clue. U4093 is an LE initialization ABEND. That implies 
that the error is detected during initialization, not in response to some 
program function call.

The doc for the ABEND code is pretty poor. For U4093/90 V1R13 at least says

X'90' (144) Condition management for MVS could not be initialized.

Mmm. That's helpful. How about Required OMVS segment not found.

Charles

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Charles Mills
Sent: Thursday, September 11, 2014 9:17 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: How tell if have OMVS Segment

Thanks. Agree with what you say about business. What's to disagree with?

I find that x requires y is a general lack in the USS etc. documentation. I 
couldn't find POSIX(ON) requires an OMVS segment anywhere either. (Believe it 
or not, I searched TFM before posting what I wrote below.) But I suspect it 
does. *We* document that our product requires an OMVS segment -- why would it 
be so hard for the POSIX(ON) team to do the same thing?

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


Re: How tell if have OMVS Segment

2014-09-11 Thread Tony Harminc
On 11 September 2014 13:37, Charles Mills charl...@mcn.org wrote:
 The doc for the ABEND code is pretty poor. For U4093/90 V1R13 at least says

 X'90' (144) Condition management for MVS could not be initialized.

 Mmm. That's helpful. How about Required OMVS segment not found.

But that's not what it says. As I mentioned earlier, there are six or
eight environmental things that can cause initialization to fail, and
what the customer has to do to fix them isn't all the same thing.

LE (among others) is notorious for catching an error and turning it
into something else that gives less information. If they insist on
abending, they should at least show the orginal errno and errno2
(identifying them as such, of course), even if they are unable or
unwilling to show the text for them.

As for what you can do about this - the obvious thing is to run a
little program before the LE-enabled thing that checks out the
environment and either issues nice messages or if all is well passes
control to the LE part. It could be as simple as a separate job step.

Tony H.

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


Re: How tell if have OMVS Segment

2014-09-11 Thread Charles Mills
Well, we can quibble over the details but we agree the information is not as 
helpful as it might be.

We get a million-line LE dump. No doubt something possibly useful is buried in 
the dump.

Yes, I am well aware that there are some things I could do. I have another 
situation where I have to front-end a POSIX program. In that case it is because 
IIRC a COBOL program can't call a POSIX program, but my (POSIX) program has to 
be COBOL-callable, so I front-end it with a non-POSIX C program that calls the 
real program.

Executive decision on my part that the additional complexity is not worth it. I 
am going to add U4093/90 specifically to our documentation.

Charles

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Tony Harminc
Sent: Thursday, September 11, 2014 10:52 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: How tell if have OMVS Segment

On 11 September 2014 13:37, Charles Mills charl...@mcn.org wrote:
 The doc for the ABEND code is pretty poor. For U4093/90 V1R13 at least 
 says

 X'90' (144) Condition management for MVS could not be initialized.

 Mmm. That's helpful. How about Required OMVS segment not found.

But that's not what it says. As I mentioned earlier, there are six or eight 
environmental things that can cause initialization to fail, and what the 
customer has to do to fix them isn't all the same thing.

LE (among others) is notorious for catching an error and turning it into 
something else that gives less information. If they insist on abending, they 
should at least show the orginal errno and errno2 (identifying them as such, of 
course), even if they are unable or unwilling to show the text for them.

As for what you can do about this - the obvious thing is to run a little 
program before the LE-enabled thing that checks out the environment and either 
issues nice messages or if all is well passes control to the LE part. It could 
be as simple as a separate job step.

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


Re: How tell if have OMVS Segment

2014-09-11 Thread Ed Gould

Charles:

I agree that documentation is poor to non existent on most all of  
POSIX items. TCP manual stinks is the best thing I can say They also  
violated IBM rules on the messages in so many ways I gave up after  
listing the problems and going into an IBM discussion about it. The  
word I got and it was no way an official IBM position was that the  
POSIX people got a blank check (almost) for the rules and almost 20  
years later people are starting to wake up and finally see how we got  
screwed because of the blank check.
Another example is the SMPE packaging that JAVA violates the rules.  
It used to be the dreaded mega PTF VSAM tape(S?) that IBM used to put  
out now its one small APAR requires a re release of JAVA.


Ed
On Sep 11, 2014, at 11:16 AM, Charles Mills wrote:

Thanks. Agree with what you say about business. What's to disagree  
with?


I find that x requires y is a general lack in the USS etc.  
documentation. I couldn't find POSIX(ON) requires an OMVS segment  
anywhere either. (Believe it or not, I searched TFM before posting  
what I wrote below.) But I suspect it does. *We* document that our  
product requires an OMVS segment -- why would it be so hard for the  
POSIX(ON) team to do the same thing?


Charles

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM- 
m...@listserv.ua.edu] On Behalf Of John McKown

Sent: Thursday, September 11, 2014 8:37 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: How tell if have OMVS Segment

On Thu, Sep 11, 2014 at 9:25 AM, Charles Mills charl...@mcn.org  
wrote:

Thanks all.

1. Source language is C++. I know how to call an assembler  
function from C++. It seems odd to me that IBM would make such a  
basic OMVS function available to assembler programs but only by  
the way available to C programs, but whatever.


2. Definitely no Rexx involved.

3. I have this nagging fear that the problem is that because the  
program is compiled #pragma RUNOPTS(POSIX(ON)) that as a result LE  
is failing it before my first user instruction executes, and  
therefore I have no ability to issue a more user-friendly message  
than a U4093 ABEND. I am trying to confirm that. I am currently  
wrestling with an internal you can't get there from here  
situation relative to testing with a no-OMVS-segment userid. Does  
anyone happen to *know* whether this is the case? That POSIX(ON)  
means LE requires an OMVS segment during program LE initialization?




I cannot find a simple document which says something like: A
POSIX(ON) application requires that an OMVS segment exist for the  
RACF id which is running the application. I can see this:


http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ 
ceea91c0/1.407

quote

CEE3632I  POSIX(ON) run-time option specified and the UNIX System  
Services
 feature is not available on the underlying operating  
system.


/quote

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ 
ceea91c0/1.531

quote

 CEE5002S  POSIX function was not available. UNIX System Services  
were not

 started.
/quote

From which, one can conclude that using POSIX(ON) requires z/OS  
UNIX System Services be available. Which requires, at least in z/OS  
V1R13+, that the RACF user under which the program is running must  
have an OMVS segment.


I wish IBM wouldn't do this. Logically, a U4093/90 ABEND is no  
different from an error message, but it does not work that way  
with customer psychology. We send out a trial package, the  
customer runs the product (and yes, we document the need for an  
OMS segment, but who reads documentation? Not our customers.) and  
it gets a U4093 ABEND. Does the customer look it up? No, he picks  
up the phone, calls the salesman and says your product blows up  
when we try to run it. The salesman tells support. By then the  
customer has deleted the SYSOUT without noting the exact ABEND, so  
we have to persuade the disgruntled prospect to run the product  
AGAIN -- he inevitably reports no better -- it's STILL blowing  
up so we can get the ABEND code and diagnose the problem. In  
fact, get all of the symptoms because at that point we don't know  
that the ABEND number will be sufficient to diagnose the problem.  
A nice, readable message, either from LE or from us, would be a  
lot better all around. End of rant.




I agree that a message to the effect of RUNNING A POSIX(ON)  
APPLICATION REQUIRES AN OMVS SEGMENT would be nice. I guess that  
today's businesses simply don't want to understand anything outside  
of their specific market. That is why our company executives have  
said We are in the health business, not the IT business. Which is  
what is driving them to using ?aaS (SaaS, IaaS, PaaS, etc) in  
preference to having on-site hardware/software beyond the desktop.  
In the old days, this was lumped under time sharing and  
outsourcing. I am guessing, and that's all it is, that eventually  
this company will have only application programmers

How tell if have OMVS Segment

2014-09-10 Thread Charles Mills
I am responsible for an LE-enabled program that runs as a conventional STC
but uses various USS services and hence requires an OMVS segment. Currently,
if it does not have one, it fails with a U4093/90 (?) ABEND. I would like it
to be a little neater than that and put out a No OMVS segment message and
quit gracefully.

Is there a function or MACRO that will tell me yea/nay on having an OMVS
segment?

Thanks,

Charles

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


Re: How tell if have OMVS Segment

2014-09-10 Thread Paul Gilmartin
On 2014-09-10 16:22, Charles Mills wrote:
 
 Is there a function or MACRO that will tell me yea/nay on having an OMVS
 segment?
  
A WAG, since I haven't an OMVS-challenged ID to test.

What about the Rexx function, SYSCALLS('ON')?

-- gil

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


Re: How tell if have OMVS Segment

2014-09-10 Thread Scott Ford
Charles:


Are you using TCPIP ? If so when you init the stack, if no OMVS segment exists 
it will fail with a bad return code.

We run under LE also.






Regards,

Scott





From: charl...@mcn.org
Sent: ‎Wednesday‎, ‎September‎ ‎10‎, ‎2014 ‎6‎:‎22‎ ‎PM
To: IBM Mainframe Discussion List





I am responsible for an LE-enabled program that runs as a conventional STC
but uses various USS services and hence requires an OMVS segment. Currently,
if it does not have one, it fails with a U4093/90 (?) ABEND. I would like it
to be a little neater than that and put out a No OMVS segment message and
quit gracefully.

Is there a function or MACRO that will tell me yea/nay on having an OMVS
segment?

Thanks,

Charles

--
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: How tell if have OMVS Segment

2014-09-10 Thread Burrell, C. Todd (CDC/OCOO/OCIO/ITSO) (CTR)
Can't you make a call to RACF (or other security package) to check this?  

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Charles Mills
Sent: Wednesday, September 10, 2014 6:22 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: How tell if have OMVS Segment

I am responsible for an LE-enabled program that runs as a conventional STC but 
uses various USS services and hence requires an OMVS segment. Currently, if it 
does not have one, it fails with a U4093/90 (?) ABEND. I would like it to be a 
little neater than that and put out a No OMVS segment message and quit 
gracefully.

Is there a function or MACRO that will tell me yea/nay on having an OMVS 
segment?

Thanks,

Charles

--
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: How tell if have OMVS Segment

2014-09-10 Thread Scott Ford
Todd is right that's another way. Check the ACEE used by STC and see if it has 
the OMVS seg.






Regards,

Scott





From: Burrell, C. Todd (CDC/OCOO/OCIO/ITSO) (CTR)
Sent: ‎Wednesday‎, ‎September‎ ‎10‎, ‎2014 ‎6‎:‎34‎ ‎PM
To: IBM Mainframe Discussion List





Can't you make a call to RACF (or other security package) to check this?  

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Charles Mills
Sent: Wednesday, September 10, 2014 6:22 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: How tell if have OMVS Segment

I am responsible for an LE-enabled program that runs as a conventional STC but 
uses various USS services and hence requires an OMVS segment. Currently, if it 
does not have one, it fails with a U4093/90 (?) ABEND. I would like it to be a 
little neater than that and put out a No OMVS segment message and quit 
gracefully.

Is there a function or MACRO that will tell me yea/nay on having an OMVS 
segment?

Thanks,

Charles

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

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


Re: How tell if have OMVS Segment

2014-09-10 Thread Bob Rutledge

Charles Mills wrote:

I am responsible for an LE-enabled program that runs as a conventional STC
but uses various USS services and hence requires an OMVS segment. Currently,
if it does not have one, it fails with a U4093/90 (?) ABEND. I would like it
to be a little neater than that and put out a No OMVS segment message and
quit gracefully.

Is there a function or MACRO that will tell me yea/nay on having an OMVS
segment?


Is BPX1QDB what you're really looking for?

Bob

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


Re: How tell if have OMVS Segment

2014-09-10 Thread Charles Mills
Bob 

I suspect it is!

The following code obtains the dub status information for 
 the current task. The status indicates whether the current
 task has already been dubbed, is ready to be dubbed, or cannot
 be dubbed as a process (or thread). 

Yes, that's the sort of thing I was looking for: call foo() and get a return
code.

Am I correct in assuming that cannot be dubbed ... == lacking an OMVS
segment?

Charles

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of Bob Rutledge
Sent: Wednesday, September 10, 2014 4:01 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: How tell if have OMVS Segment

Charles Mills wrote:
 I am responsible for an LE-enabled program that runs as a conventional 
 STC but uses various USS services and hence requires an OMVS segment. 
 Currently, if it does not have one, it fails with a U4093/90 (?) 
 ABEND. I would like it to be a little neater than that and put out a 
 No OMVS segment message and quit gracefully.
 
 Is there a function or MACRO that will tell me yea/nay on having an 
 OMVS segment?

Is BPX1QDB what you're really looking for?

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


Re: How tell if have OMVS Segment

2014-09-10 Thread Tony Harminc
On 10 September 2014 19:17, Charles Mills charl...@mcn.org wrote:
 Am I correct in assuming that cannot be dubbed ... == lacking an OMVS 
 segment?

Close, but not exactly. There are several more subtle reasons that may
cause a dub to fail. What I've done (in assembler code, but it could
be in C and probably others) is to call a harmless and fast UNIX
service (I use sysconf() BPX1SYC) early in startup that will fail with
return and reason codes if UNIX services in general won't work. Then I
put out a message, rather than have TCP/IP or some other service I
need fail later on.

But there is a chicken  egg problem, in that the UNIX kernel service
to retrieve message text from return and/or reason codes itself
requires that your process be dubbed. (I complained about this years
ago, but at least back then IBM had no plans to change this
behaviour.) So I have a short list of hardcoded return and reason
codes taken from the book, and I issue a hopefully useful message to
explain the detailed reason rather then a generic dub failed
message. You can look up return code EMVSINITIAL and see what the
possible reason codes are - things like:
JRSAFNOUSER: The user ID is not defined to the security product
JRSAFNOGID: The user ID is in a group that has no GID
and so on. EMVSINITIAL is the common problem, but there might also be
other return codes that indicate startup problems: EMVSNOTUP, EMVSERR,
EMVSSAF2ERR, and maybe others.

Of course you'll want to show the actual return and reason codes so
that if IBM has added one since you checked, the end user can look it
up.

Your situation may well have a different chicken  egg issue; I don't
know what provokes LE to issue its U4093 abend, but it may be that it
tries to get dubbed on its own initiative and that's its polite way of
saying that the attempt failed. In which case you may be too late to
do what I suggested, or even to use querydub() as Bob did.

Tony H.

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


Re: How tell if have OMVS Segment

2014-09-10 Thread Charles Mills
Right. Thanks. I have since looked up the relevant return codes.

QDB_DUB_MAY_FAIL: The task has not been dubbed; an attempt to dub the task may 
fail.  The most likely reason for failure may be a missing or incomplete user 
security profile; or the lack of an OMVS segment. 

I would probably log any unexpected return code and proceed, hoping for the 
best. I would rather U4093 than not try in a situation where I might have 
succeeded.

I've never used the BPX1 services that I recall. They seem to be intended 
for assembler programs but I would hope I can find C calling instructions 
somewhere. Worst case I can just code up my own extern OS ...

I don't know exactly where I fail. My test userid has an OMVS segment. I just 
saw it fail ugly (U4093/90 I think) at a customer. The customer inexplicably 
(why do customers do these things to themselves?) has his system set up so all 
output from an STC is automatically and instantly purged, so whatever evidence 
of where I was has gone to bit heaven. Hopefully LE does not try the dub and 
fail before my user C code gets going, leaving me with no chance to diagnose 
the problem in a user-friendly manner.

I can get a userid set up on my system that does not have an OVMS segment but 
that is obviously a small chore of its own.   

Charles

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Tony Harminc
Sent: Wednesday, September 10, 2014 5:36 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: How tell if have OMVS Segment

On 10 September 2014 19:17, Charles Mills charl...@mcn.org wrote:
 Am I correct in assuming that cannot be dubbed ... == lacking an OMVS 
 segment?

Close, but not exactly. There are several more subtle reasons that may cause a 
dub to fail. What I've done (in assembler code, but it could be in C and 
probably others) is to call a harmless and fast UNIX service (I use sysconf() 
BPX1SYC) early in startup that will fail with return and reason codes if UNIX 
services in general won't work. Then I put out a message, rather than have 
TCP/IP or some other service I need fail later on.

But there is a chicken  egg problem, in that the UNIX kernel service to 
retrieve message text from return and/or reason codes itself requires that your 
process be dubbed. (I complained about this years ago, but at least back then 
IBM had no plans to change this
behaviour.) So I have a short list of hardcoded return and reason codes taken 
from the book, and I issue a hopefully useful message to explain the detailed 
reason rather then a generic dub failed
message. You can look up return code EMVSINITIAL and see what the possible 
reason codes are - things like:
JRSAFNOUSER: The user ID is not defined to the security product
JRSAFNOGID: The user ID is in a group that has no GID and so on. EMVSINITIAL is 
the common problem, but there might also be other return codes that indicate 
startup problems: EMVSNOTUP, EMVSERR, EMVSSAF2ERR, and maybe others.

Of course you'll want to show the actual return and reason codes so that if IBM 
has added one since you checked, the end user can look it up.

Your situation may well have a different chicken  egg issue; I don't know what 
provokes LE to issue its U4093 abend, but it may be that it tries to get dubbed 
on its own initiative and that's its polite way of saying that the attempt 
failed. In which case you may be too late to do what I suggested, or even to 
use querydub() as Bob did.

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


Re: How tell if have OMVS Segment

2014-09-10 Thread John McKown
On Wed, Sep 10, 2014 at 5:22 PM, Charles Mills charl...@mcn.org wrote:
 I am responsible for an LE-enabled program that runs as a conventional STC
 but uses various USS services and hence requires an OMVS segment. Currently,
 if it does not have one, it fails with a U4093/90 (?) ABEND. I would like it
 to be a little neater than that and put out a No OMVS segment message and
 quit gracefully.

 Is there a function or MACRO that will tell me yea/nay on having an OMVS
 segment?

 Thanks,

 Charles

I have never done this because we set up the RACF facility which
automatically creates an OMVS segment if a RACF id which does not have
one attempts to do any UNIX work. But I am fairly sure the magic word
is querydub. It is documented here:
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/BPXZB1C0/2.145


77 QUERY-DUB PIC X(8) VALUE IS BPX1QDB'.
77 QD-RETVAL PIC S9(9) BINARY.
77 QD-RETRC PIC S9(9) BINARY.
77 QD-RETRSN PIC S9(9) BINARY.


CALL QUERY-DUB USING QD-RETVAL QD-RETRC QD-RETRSN.
IF QD-RETVAL IS EQUAL TO 4 THEN
DISPLAY 'UNIX FACILITIES ARE NOT AVAILABLE TO THIS JOB DUE TO RACF
REQUIREMENTS'
   UPON SYSOUT
MOVE +20 TO RETURN-CODE
STOP RUN
END-IF


I am fairly sure that something like the above will work for you. Oh,
for some reason I think you are using COBOL. But the above manual has
examples in HLASM too. C would be more difficult. You'd need to
declare BPX1QDB as having OS linkage conventions. I don't recall off
hand how to do a fetch and dynamic call in C.  And I don't have
any examples here at home.


-- 
There is nothing more pleasant than traveling and meeting new people!
Genghis Khan

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: How tell if have OMVS Segment

2014-09-10 Thread Tony Harminc
On 10 September 2014 20:54, Charles Mills charl...@mcn.org wrote:
[...]

Hopefully LE does not try the dub and fail before my user C code gets going, 
leaving me with no chance to
 diagnose the problem in a user-friendly manner.

That alternative explanation would then be that LE is catching a
return code from a routine you are calling, and turning it into an
abend. That's not nice either.

Tony H.

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


Re: How tell if have OMVS Segment

2014-09-10 Thread Paul Gilmartin
On Wed, 10 Sep 2014 17:54:36 -0700, Charles Mills wrote:

I don't know exactly where I fail. My test userid has an OMVS segment. I just 
saw it fail ugly (U4093/90 I think) at a customer.  ...

4093 sounds like -3, which is what Rexx uses for unknown host environment
or unknown host command.

-- gil

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


Re: How tell if have OMVS Segment

2014-09-10 Thread Steve Comstock

On 9/10/2014 7:35 PM, John McKown wrote:

On Wed, Sep 10, 2014 at 5:22 PM, Charles Mills charl...@mcn.org wrote:

I am responsible for an LE-enabled program that runs as a conventional STC
but uses various USS services and hence requires an OMVS segment. Currently,
if it does not have one, it fails with a U4093/90 (?) ABEND. I would like it
to be a little neater than that and put out a No OMVS segment message and
quit gracefully.

Is there a function or MACRO that will tell me yea/nay on having an OMVS
segment?

Thanks,

Charles


I have never done this because we set up the RACF facility which
automatically creates an OMVS segment if a RACF id which does not have
one attempts to do any UNIX work. But I am fairly sure the magic word
is querydub. It is documented here:
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/BPXZB1C0/2.145


77 QUERY-DUB PIC X(8) VALUE IS BPX1QDB'.
77 QD-RETVAL PIC S9(9) BINARY.
77 QD-RETRC PIC S9(9) BINARY.
77 QD-RETRSN PIC S9(9) BINARY.


CALL QUERY-DUB USING QD-RETVAL QD-RETRC QD-RETRSN.
IF QD-RETVAL IS EQUAL TO 4 THEN
 DISPLAY 'UNIX FACILITIES ARE NOT AVAILABLE TO THIS JOB DUE TO RACF
REQUIREMENTS'
UPON SYSOUT
 MOVE +20 TO RETURN-CODE
 STOP RUN
END-IF


I am fairly sure that something like the above will work for you. Oh,
for some reason I think you are using COBOL. But the above manual has
examples in HLASM too. C would be more difficult. You'd need to
declare BPX1QDB as having OS linkage conventions.


Maybe ...

#pragma linkage(BPX1QDB,OS);


int ret_val = 0;
int ret_code = 0;
int ret_reason = 0;

...


void BPX1QDB(int, int, int);

...

   BPX1QDB(ret_val, ret_code, ret_reason);





I don't recall off
hand how to do a fetch and dynamic call in C.  And I don't have
any examples here at home.




typedef void (*mydnamcl) (int, int, int);

   mydnamcl callptr;

   ...

 callptr = (mydnamcl) fetch(BPX1DQB);

 (callptr) (ret_val, ret_code, ret_reason);



Worth a shot.

-Steve Comstock

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