Re: What crashing COBOL systems reveal about applications maintenance -- GCN

2020-05-14 Thread Thomas David Rivers
Hi Wayne! If you'd like to recompile that C code too - just drop us a note! Newer versions of Systems/C have better optimization too! - Dave Rivers - Wayne Bickerdike wrote: We're going through the COBOL 6 compile exercise, on a Z13. The only hiccups have been source control and the odd

EC6 ABEND with X'00FFCE54' in R15

2020-08-07 Thread Thomas David Rivers
I'm running a small program that uses BPX pthreads along with CEEPIPI. The program is a Systems/C program that uses BPX pthreads to start up a HEAVY thread that then creates a CEEPIPI environment, calls a simple IBM C (LE) function and returns, then destroys the CEEPIPI environment and then the p

Re: EC6 ABEND with X'00FFCE54' in R15

2020-08-09 Thread Thomas David Rivers
Thanks all! Turns out I was confused by the EC6 doc; thinking the reason-code should be in R15. But - it's not - it's clearly where it needs to be... I'm getting an EC6 ABEND with a REASON code of which means that the BPX _exit() was invoked with subtasks (in this case, pthread sub

Re: EC6 ABEND with X'00FFCE54' in R15

2020-08-09 Thread Thomas David Rivers
Joe Monk wrote: Umm... dont you maintain a table of your pthreads? Like storing off their ids somewhere? If not maybe you should? Then you can have a routine in your exit that kills off the pthreads from the table using their id before you exit... Joe O Yeah - but how do you kill a pthread?

Using CEEPIPI in multiple tasks (BPX PTHREADS)

2020-08-15 Thread Thomas David Rivers
I have been struggling to basically do the following: 1) Allocate a CEEPIPI pre-initialization table with one empty entry. 2) Initialize the table with CEEPIPI init_sub_dp. 3) Add an entry to it with CEEPIPI add_entry (which LOADs the module for me.) It also provides the entry-po

Re: About Enterprise PL/I - barking (up the wrong tree?)

2020-09-02 Thread Thomas David Rivers
Robert Prins wrote: Dear all, A few days ago I posted the following to , addressed specifically to Peter Elderon: "And the corresponding PL/I source is ?" Note for what follows: PL/I has a truckload of builtin functions to work with dates and times, but none of them

Re: linker error c++ multithreaded program

2020-09-04 Thread Thomas David Rivers
I don't believe thread-level-storage is supported in the z/OS environment? - Dave R. - (p.s. the latest Dignus release now has support for pthreads, and includes many functions missing from the IBM (LE) implementation but doesn't include thread-level-storage... the implementation of that c

Support for 128-bit arithmetic - was: Re: PL/I support of vector instructions?

2020-09-09 Thread Thomas David Rivers
Seymour J Metz wrote: I was asking whether it supported vector instructions for FIXED, not for FLOAT.; in particular, whether it supported FIXED BIN(127,0). -- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 You would not need vector instructions to support FIXED BIN(127,s) (quad-w

Re: Support for 128-bit arithmetic - was: Re: PL/I support of vector instructions?

2020-09-11 Thread Thomas David Rivers
Paul Gilmartin wrote: On Thu, 10 Sep 2020 15:35:37 +, Seymour J Metz wrote: Yes, you can always do multiple precision that way, but there is a performance hit, especially from those conditional branches. Maybe we need skip instructions such as the 7090 had. Some computer archit

Re: Support for 128-bit arithmetic - was: Re: PL/I support of vector instructions?

2020-09-12 Thread Thomas David Rivers
On Fri, Sep 11, 2020 at 10:56:00PM -0300, Clark Morris wrote: > [Default] On Wed, 09 Sep 2020 20:35:48 -0400, in bit.listserv.ibm-main > Thomas David Rivers wrote: > > >> snip > The way I read the code it is adding unsigned integers since only ADD > LOGICAL instruct

Re: Support for 128-bit arithmetic - was: Re: PL/I support of vector instructions?

2020-09-12 Thread Thomas David Rivers
Paul Gilmartin wrote: On Sat, 12 Sep 2020 07:35:00 -0400, Thomas David Rivers wrote: ADD UNSIGNED doesn't trigger the FIXED OVERFLOW exception, while SIGNED operations do. Since C doesn't want FIXED OVERFLOW exceptions, (almost) all of the arithmetic calculations should be

Re: LOAD/LINK exit

2019-06-26 Thread Thomas David Rivers
Michael Stein wrote: On Thu, Jun 13, 2019 at 02:10:32PM -0400, Steve Thompson wrote: I seem to recall that there is a way to look at a LOAD/FETCH via an exit. csvfetch https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.3.0/com.ibm.zos.v2r3.ieaa800/csvfetch01.htm The CSVFETCH exit pr

Re: LOAD/LINK exit

2019-06-27 Thread Thomas David Rivers
Steve Thompson wrote: I would say yes. Note the following: CSVFETCH exit routine environment The exit routine receives control in the following environment: In supervisor state with PSW key 0. Yeah... that makes it less useful; but I suppose there might be security concerns around k

Re: LOAD/LINK exit

2019-06-28 Thread Thomas David Rivers
Peter Relson wrote: I suppose there might be security concerns around knowing what gets fetched? It has nothing to do with "knowing" anything. It has to do with the environment in which the code calling the exit runs, and avoiding crippling the system by doing something differently that w

Re: LOAD/LINK exit

2019-07-01 Thread Thomas David Rivers
Peter Relson wrote: BPX ptrace...Does that mean performance is not an issue in that case? That seems like a logical conclusion. When the system is running in a privileged state, just about the only safe way to give control to non-privileged work running as an exit or extention under th

CMS OS SIMULATION BSAM OPEN and ABEND for non-existing files on INPUT

2019-07-18 Thread Thomas David Rivers
I'm getting down-in-the-weeds on OS SIMULATION on CMS. I have an older program where it does a FILEDEF for a non-existing file; then the program does an OPEN (..,INPUT) for the given DDNAME from the filedef. In the older program, the ABEND exit is driven - so we fail the OPEN gracefully. But -

Adding "plain text" files to CMS MACLIB

2019-07-25 Thread Thomas David Rivers
So... The CMS MACLIB GEN/ADD command seems to require that the file being added to the maclib be an ASM macro (and have the proper MACRO statements in it.) Is there a way to just add a plain text file to a MACLIB? I gather there has to be some approach that accomplishes this because I have some

Re: Adding "plain text" files to CMS MACLIB

2019-07-25 Thread Thomas David Rivers
Paul Gilmartin wrote: On Thu, 25 Jul 2019 11:25:55 -0400, Thomas David Rivers wrote: Is there a way to just add a plain text file to a MACLIB? I gather there has to be some approach that accomplishes this because I have some maclibs here that have that... but, I'm not sure what the &

Re: Local time in C on z/OS

2019-08-15 Thread Thomas David Rivers
Phil Smith III wrote: I have a C POSIX application that writes timestamps on its output. It's always produced a GMT timestamp (pardon me, UTC), and that's sort of fugly, so I thought maybe I could fix it. The fundamental problem with "local time" is the definition of "local". If we mak

Size of area passed to the pthread initiailization routine in BPX pthread_create

2019-09-10 Thread Thomas David Rivers
In the Callable Services documentation, in the pthread_create description, the usage notes describe the thread initialization routine. This routine is called with R13 pointing at 208 bytes of save area, and with R1 pointing to a parm block. That parm block contains: a. The address of an i

Description of the format of a SYSUDUMP

2019-09-18 Thread Thomas David Rivers
Well - I've been reading SYSUDUMPs for a long time, but I've never found a pretty precise description of the various pieces of the dump. The newer z/OS doc seems to just want to point you to IPCS, but I rather like just reading the dump. My particular question is the LINES -

Re: Description of the format of a SYSUDUMP

2019-09-18 Thread Thomas David Rivers
Gereldy wrote: Seems like I recall, at some point, a pretty precise document on the format of a SYSUDUMP - but I can't seem to find it now... if anyone remembers what that might be a pointer to that would be welcome. I guess I would describe it as the storage that would be shown in li

Re: Description of the format of a SYSUDUMP

2019-09-19 Thread Thomas David Rivers
Paul Gilmartin wrote: On Wed, 18 Sep 2019 15:36:14 -0400, Thomas David Rivers wrote: I guess I'm asking "what is the chunk of memory described in 'SAME AS ABOVE'" ? Seems like a document somewhere might explain that definitively... ? Was that the entirety o

Documentation on PTATSCHEDPARAM in BPXYPTAT?

2019-10-10 Thread Thomas David Rivers
I see this field in the BPXYPTAT macro: PTATSCHEDPARAM DSF Pthread GetSchedParam/SetSchedParam value But - I can find no BPX function that retrieves or sets that value (seems like z/OS would have to be informed if it changed.) And, I can't seem to find any documentation on that fi

Best way for a task to give up the CPU and let other tasks run?

2019-10-17 Thread Thomas David Rivers
Does anyone happen to know the best way for a running task to give up running and let another task run? But - this isn't "give up" as in ending the task, just giving up the CPU to allow another task to run and then returning to this task. Sorta like "I'm done for the moment if something else wou

Re: Best way for a task to give up the CPU and let other tasks run?

2019-10-17 Thread Thomas David Rivers
Don Poitras wrote: CALLDISP https://www.ibm.com/support/knowledgecenter/SSLTBW_2.4.0/com.ibm.zos.v2r4.ieaa100/clldis.htm Yeah - I stumbled over CALLDISP - but isn't that AUTHORIZED? What about just a regular un-AUTH'd program? - Dave R. - p.s. *Thanks* for the pointer... -- riv...@d

"old" OS/390 documentation

2019-10-22 Thread Thomas David Rivers
I know there was a lot of discussion on this, but my searches have not been fruitful. I had a link to the last published OS/390 (V2R10) doc, but can't seem to find it on the IBM web site any more. Does anyone happen to have a pointer to it? - Many thanks! - - Dave Rivers - -- riv...@dignus

Re: Best way for a task to give up the CPU and let other tasks run?

2019-10-30 Thread Thomas David Rivers
Thomas David Rivers wrote: Does anyone happen to know the best way for a running task to give up running and let another task run? But - this isn't "give up" as in ending the task, just giving up the CPU to allow another task to run and then returning to this task. Sorta lik

Problems with ESTAEX invoked in AMODE 64 when assembled without SYSTATE AMODE=64

2020-03-23 Thread Thomas David Rivers
I think I've run into an interesting problem with ESTAEX when it is invoked in AMODE 64 without SYSTATE AMODE=64 set at assembly time. That is, this is code that could potentially run in either AMODE 31 or AMODE 64... so it's not assembled with SYSTATE AMODE=64. What it _looks_ like from the dum

Re: Problems with ESTAEX invoked in AMODE 64 when assembled without SYSTATE AMODE=64

2020-03-23 Thread Thomas David Rivers
Joe Monk wrote: "When you run in AMODE 64 (as indicated by specifying AMODE64=YES through the SYSSTATE macro) and invoke ESTAEX, your ESTAEX routine will get control in AMODE 64." https://www.ibm.com/support/knowledgecenter/SSLTBW_2.4.0/com.ibm.zos.v2r4.ieaa200/iea3a2_Description3.htm So looks

Re: Problems with ESTAEX invoked in AMODE 64 when assembled without SYSTATE AMODE=64

2020-03-23 Thread Thomas David Rivers
Joe Monk wrote: "When you run in AMODE 64 (as indicated by specifying AMODE64=YES through the SYSSTATE macro) and invoke ESTAEX, your ESTAEX routine will get control in AMODE 64." https://www.ibm.com/support/knowledgecenter/SSLTBW_2.4.0/com.ibm.zos.v2r4.ieaa200/iea3a2_Description3.htm So looks

Re: Problems with ESTAEX invoked in AMODE 64 when assembled without SYSTATE AMODE=64

2020-03-25 Thread Thomas David Rivers
Ed Jaffe wrote: On 3/23/2020 2:15 AM, Thomas David Rivers wrote: I think I've run into an interesting problem with ESTAEX when it is invoked in AMODE 64 without SYSTATE AMODE=64 set at assembly time. That is, this is code that could potentially run in either AMODE 31 or AMODE 64... so

Re: Problems with ESTAEX invoked in AMODE 64 when assembled without SYSTATE AMODE=64

2020-03-25 Thread Thomas David Rivers
Peter Relson wrote: What it _looks_ like from the dump is that ESTAEX is invoked (via PC - this is just problem state) and on return, the address in the PSW has the AMODE bit set - but we are in AMODE 64, so now my PSW address is pointing to the wrong place. Some day, maybe I'll start readin

Re: Problems with ESTAEX invoked in AMODE 64 when assembled without SYSTATE AMODE=64

2020-03-26 Thread Thomas David Rivers
Peter Relson wrote: Yes, you are misreading the dump. Not that it's obvious... Thanks for that explanation! Makes perfect sense - I should have thought about it myself :-) My guess is that my earlier caution is what came to pass. You did not show the time of error regs. You should have.

ESPIE question (does ESPIE "cover" ATTACH'd sub-tasks)

2020-04-01 Thread Thomas David Rivers
I'm sure many on this list will know the answer to this, and I've been reading various manuals trying to find it... But - if a primary task issues an ESPIE SET to establish a ESPIE exit on a particular event, does that ESPIE exit get control if an ATTACH'd sub-task triggers the event? In my casu

Re: ESPIE question (does ESPIE "cover" ATTACH'd sub-tasks)

2020-04-02 Thread Thomas David Rivers
Binyamin Dissen wrote: What advantage do you see in an ESPIE over an ESTAE? IIRC, there are quite a few conditions where it doesn't get control. And no clean way to percolate. Mostly - catching an error (bad memory reference) in an ESTAE exit... - Dave Rivers - -- riv...@dignus.com

Re: XL C\C ++ sizeof of datatypes

2020-04-27 Thread Thomas David Rivers
Charles Mills wrote: Is that true? I know the first part is true: sizeof(foo) or sizeof foo is evaluated at compile time, not run time. But "not invoked until run time" is also true for most operators, right? a + b is *generally* evaluated at run time. I have a user-defined macro #define elemen

Re: XL C\C ++ sizeof of datatypes

2020-04-27 Thread Thomas David Rivers
Seymour J Metz wrote: The difference is that sizeof is parsed as an operator. Sometimes programs have parameterized declarations and the compiler must generate code to calculate sizeof. -- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 This is true - for C99 variable length array

S0F9 and SOFD ABENDs and SVC dumps - oh my!

2020-04-28 Thread Thomas David Rivers
I have a program that fires up about 1000 tasks, and each of these tasks fire up a sub-task... (I say "tasks" but these are actually BPX threads - started with BPX pthread_create.) Each of the 1000 tasks/threads starts a sub-thread and waits for its completion. Most of the time when I run the p

unCATALOG after a RENAME

2017-04-11 Thread Thomas David Rivers
I've got some old code here that is doing a strange thing trying to rename a non-VSAM file. After invoking the DFSMS RENAME service; which has met with success (return-code is 0) to rename a file in the VTOC from the "old" name to the "new"name; it then goes on to un-CATALOG the "old" name. What

Re: unCATALOG after a RENAME

2017-04-11 Thread Thomas David Rivers
retired mainframer wrote: When you say "a file in the VTOC," did you deliberately mean to distinguish that from a case where you rename a dataset in the catalog? Did the rename command specify a volume? Was the old DSN catalogued on the volume whose VTOC you are updating? Is the new DSN catal

Re: unCATALOG after a RENAME

2017-04-11 Thread Thomas David Rivers
Lizette Koehler wrote: You may need to do the UNCATALOG if NON-SMS manged. You should not do the UNCATALOG if SMS manged. Personally, I would probably do the process with DFDSS and use RENUNC and CATALOG parm. Simpler, easier, and safer Lizette Thanks Lizette, I was hoping to directl

Re: unCATALOG after a RENAME

2017-04-11 Thread Thomas David Rivers
Lizette Koehler wrote: The rule is NO UNCATALOGED DATASET in SMS MANAGED POOLs. It theoretically should not work if you try to uncatalog a dataset that is SMS Managed. This should fail. Lizette Hi Lizette, Well - this is my confusion then. In the documentation for the unCATALOG fun

Re: unCATALOG after a RENAME

2017-04-12 Thread Thomas David Rivers
retired mainframer wrote: If the dataset in question is not SMS managed, CAMLST/RENAME makes no effort to update the catalog. Therefore your UNCAT and CAT steps are necessary and should succeed. If the dataset in question is SMS managed, coordinates the required changes to the VTOC, the VTOC i

Re: unCATALOG after a RENAME

2017-04-13 Thread Thomas David Rivers
Hmm... Now I have examples of SMS-managed un-CATALOG failing, and non-SMS-managed un-CATALOG failing. But, I can't seem to reproduce the failure in-house. I thought perhaps that my order-of-operations was wrong? Here's what the code is doing: RENAME (rename the file on the VTOC) CATAL

Re: unCATALOG after a RENAME (rename a non-VSAM file.)

2017-04-18 Thread Thomas David Rivers
retired mainframer wrote: Run some test cases, at least one for an SMS volume, at least one for a non-SMS volume: List the catalog entry for the old DSN List the catalog entry for the new DSN (expect failure) List the VTOC for the old DSN List the VTOC for the new DSN (expect failure

Re: unCATALOG after a RENAME (rename a non-VSAM file.)

2017-04-18 Thread Thomas David Rivers
Tony Harminc wrote: On 18 April 2017 at 11:18, Thomas David Rivers wrote: Unless, another pair of eyes has seen some kind of documentation or example of "this is the proper way to rename a non-VSAM file." The TSO RENAME command in theory takes care of all this, at

Re: unCATALOG after a RENAME (rename a non-VSAM file.)

2017-04-18 Thread Thomas David Rivers
I should add that I found this from the bitsavers archive: http://www.textfiles.com/bitsavers/pdf/ibm/360/os/tso/GY28-6776-0_TSO_Command_Processor_PLM_Vol_6_Mar71.pdf - Dave R. - -- riv...@dignus.comWork: (919) 676-0847 Get your mainframe programming tools at ht

Re: Can XLC printf() take "%D(*,*)"?

2017-04-26 Thread Thomas David Rivers
Charles Mills wrote: I don't seem to be able to declare a D variable in C++. Nope - _Decimal types are not support in C++ (it would mess up the type hiearchy too much which gets into name mangling issues, etc...) So - you can only declare _Decimal values in C. Systems/C doesn't support

Re: Can XLC printf() take "%D(*,*)"?

2017-04-26 Thread Thomas David Rivers
Charles Mills wrote: I wonder how C passes a potentially 16-byte string by value. Not sure what you mean by that question... a C string constant is an array of characters; otherwise a C 'string' is typically a pointer to a character or a declared array of characters. When you pass an arra

Re: Can XLC printf() take "%D(*,*)"?

2017-04-26 Thread Thomas David Rivers
Charles Mills wrote: I'd like to format fixed point decimal (packed, in other words) numbers in a common subroutine that would be passed the precision and scaling. Can printf() and friends take '*' and then a passed integer for its (n,p) values - analogous to the way printf() width and precision

Re: strcasecmp() comparing punctuation in ASCII?

2017-06-01 Thread Thomas David Rivers
Charles Mills wrote: It's clearly doing everything in ASCII: strcasecmp("Z", "0") 122 It's interesting. I use the same compare function for both a sort and for a binary search, so it all works correctly -- it's just not working the way I think it is. Charles I find that very odd...

BSAM, DCBBUFOF, DCBBLKSI and buffer sizes

2017-06-01 Thread Thomas David Rivers
When BSAM reads a file that has a block prefix length (the size of which is specified in DCBBUFOF) then the block prefix is returned in the BSAM data (unlike QSAM which skips over that data.) And, there are several accomodations/requirements made regarding the DCBBLKSI field and the sizes of buff

Re: strcasecmp() comparing punctuation in ASCII?

2017-06-01 Thread Thomas David Rivers
Paul Gilmartin wrote: On Thu, 1 Jun 2017 11:44:29 -0700, Charles Mills wrote: (For anyone not familiar, strcasecmp() is documented as https://www.ibm.com/support/knowledgecenter/SSLTBW_2.2.0/com.ibm.zos.v2r2.bpxbd00/rsrccm.htm .) Where I read: o There are no errno values defined. Tha

[Fwd: BSAM, DCBBUFOF, DCBBLKSI and buffer sizes]

2017-06-02 Thread Thomas David Rivers
I think this only got posted to the bit.listserve and never made it to the ibm-main mailing list... so - resending it. - Dave Rivers - -- riv...@dignus.comWork: (919) 676-0847 Get your mainframe programming tools at http://www.dignus.com --

Re: PL/I CHARACTER(*) VARYING question

2017-07-07 Thread Thomas David Rivers
Frank Swarbrick wrote: For PL/I experts: Can a PL/I procedure declared with a CHARACTER(*) VARYING parm be called passing a CHARACTER VARYINGZ or CHARACTER VARYING4 argument? Thanks, Frank Those are different data attributes, but the answer is "kinda yes". The VARYINGZ and VARYING4 value

BPX COND_SETUP/COND_WAIT, the SIR and "pushing back" signals

2024-04-24 Thread Thomas David Rivers
Trying to work out a problem where a BPX_COND_WAIT is returning with an EINVAL and the Jr-errno indicating JRNotSetup. The basic flow-of-control is: invoke COND_SETUP invoke COND_WAIT so - the only way I can get this EINVAL (which doesn't happen every time mind you) is if there is a

Re: BPX COND_SETUP/COND_WAIT, the SIR and "pushing back" signals

2024-04-24 Thread Thomas David Rivers
Well - on a whim - I put this question to Facebook's Meta.ai: In z/OS - how does a "Signal Interface Routine" know that the COND_SETUP service has been called, so it can "push back" a signal? and it gave me this answer: In z/OS, a Signal Interface Routine (SIR) can determine if the CO

Re: BPX COND_SETUP/COND_WAIT, the SIR and "pushing back" signals

2024-04-24 Thread Thomas David Rivers
So - of course - the Meta.ai was having some "hallucinations"... Which brings me back to my original question - how can the SIR know that COND_SETUP has been invoked and that a signaled should be "pushed back"? - Thanks - - Dave R. - -- riv...@dignus.comWork: (919)

Re: BPX COND_SETUP/COND_WAIT, the SIR and "pushing back" signals

2024-04-24 Thread Thomas David Rivers
And - to follow-up one more time, the SIR documentation from the MVSSIGSETUP service has this to say: If the interrupt cannot be processed at this time, possibly due to general register 13 not currently containing the address of a program stack, or the last service called on the current

Control Block field that provides the last USS System-Call?

2024-04-25 Thread Thomas David Rivers
I've been scouring control-blocks wondering if there is a field somewhere that happens to provide the most recent USS system-call (to be able to, in a SIR, determine of cond_setup was the most recent call.) Does anyone happen to know if that exists somewhere? - Many thanks - - Dave Rivers

Re: Control Block field that provides the last USS System-Call?

2024-04-26 Thread Thomas David Rivers
Thanks Rob! Unfortunately - this is intended to be used in a SIR that needs to answer the question of "was the last service a cond_setup?" to be able to "push back" a signal, without calling a BPX service. (Calling a BPX service breaks the cond_setup.) IBM documents that the SIR needs to "push b

Re: BPX COND_SETUP/COND_WAIT, the SIR and "pushing back" signals

2024-04-26 Thread Thomas David Rivers
> > And - to follow-up one more time, the SIR documentation from the MVSSIGSETUP > service has this to say: > > >If the interrupt cannot be processed at this time, possibly due to general >register 13 not currently containing the address of a program stack, or > the last >service ca

Control dispatcher time-slice?

2024-05-06 Thread Thomas David Rivers
We've got a test (with pthread-created TCBs) that we'd like to really have dispatched with tiny time slices so we can make sure things are working correctly... But - it seems that all of our time slices are "big" so we don't get the conflicts we'd like to exercise. Is there a way to tell the disp

Re: questions on HLL support of > 31-bit addressing

2024-09-02 Thread Thomas David Rivers
The Dignus and IBM C/C++ compilers support 31-bit and 64-bit environments. IBM's PL/I and COBOL also support 64-bit environments. We also have support for AR mode with __far pointers in the C compiler. The compiler generates code to go into AR mode when dereferencing a __far pointer. The use

Re: Sort for not there?

2016-01-07 Thread Thomas David Rivers
Paul Gilmartin wrote: On Wed, 6 Jan 2016 19:01:15 -0500, Tony Harminc wrote: And this all started with arbitrary (GOFF) files as input to SMP/E, which has, AFAIK, no delimiter option on e.g. the ++MOD statement. JCL isn't the only thing with this problem. A single GOFF file could plausibly c

Re: Quadword Alignment in OBJ Modules (Was: COBOL v5)

2016-01-27 Thread Thomas David Rivers
Ed Jaffe wrote: On 1/27/2016 9:25 AM, Barry Lichtenstein wrote: Note that the binder has been producing program objects for over 25 years. It is difficult to make significant enhancements to OBJ object module and load module formats. Some important things have been added such as AMODE 64 an

Re: Linking C module with SSL

2016-03-10 Thread Thomas David Rivers
Robin Atwood wrote: I am trying to convert an XL/C module to use SSL. From the pre-link-edit step I get messages like: @ST00010 gsk_environment_init and then from the link-edit: IEW2456E 9207 SYMBOL @ST00010 UNRESOLVED. MEMBER COULD NOT BE INCLUDED FROM THE DESIGNAT

Re: usleep()

2020-10-02 Thread Thomas David Rivers
Paul Gilmartin wrote: What is IBM's rationale for supporting the deprecated usleep but not POSIX nanosleep on z/OS? https://pubs.opengroup.org/onlinepubs/9699919799/functions/nanosleep.html#tag_16_350 And providing the idiosyncratic cond_timed_wait. -- gil We added nanosleep() t

Re: C RTL regcomp() fails with more than 9 (groups)

2020-10-05 Thread Thomas David Rivers
Kirk Wolf wrote: Can be demonstrated with the following test program. This works fine with regcomp() on linux and other RE platforms (PCRE, javascript, python, etc). I dunno why that would fail - tried it with a couple of UNIXs and of course Dignus Systems/C, all got return-code of 0. (Had

SVC 99 RLSE text unit on DISP=SHR allocation with a PDS/PDSE member name

2020-10-27 Thread Thomas David Rivers
I have a DYNALLOC set up with a default of adding the RLSE text unit (to release the space after a CLOSE.) This is to retrieve a system-provided DD name for an eventual OPEN OUTPUT operation, for opening a DSN(MEM) PDS/PDSE member. The PDS in question already exists (happens to be a PDSE.)

Value of PSW program MASK in an attached sub-task

2020-11-09 Thread Thomas David Rivers
I seem to have a situation where the program mask for my attached sub-task is getting all the bits set (indicating, for example, the receipt of, say, FIXED-POINT OVERFLOW) when the parent task does not have those set. Does anyone know what determines the setting of the program mask for the ATTACH

Re: Value of PSW program MASK in an attached sub-task

2020-11-10 Thread Thomas David Rivers
Thomas David Rivers wrote: I seem to have a situation where the program mask for my attached sub-task is getting all the bits set (indicating, for example, the receipt of, say, FIXED-POINT OVERFLOW) when the parent task does not have those set. Just to reply to myself - for any possible

Re: Value of PSW program MASK in an attached sub-task

2020-11-10 Thread Thomas David Rivers
Bernd Oppolzer wrote: Just because of interest: the program mask was set by the ESPIE macro, according to the interrupts you wanted to be caught by the ESPIE routine, and it had nothing to do with the ATTACH macro, which attached the subtask; am I correct? So it is in fact an ESPIE topic, not r

No BPX-level interface for __passwd_applid? Was: Re: Code to verify LOGON password

2021-01-15 Thread Thomas David Rivers
Kirk Wolf wrote: /* Check password for a userid. Note: requires program-controlled environment To build: c99 -o checkpass checkpass.c i extattr +p checkpass */ #define _POSIX_SOURCE #include #include #include #include #include #include int main(int argc, char** argv) { if

zero-length PC section, the binder, and resulting AMODE/RMODE

2021-01-26 Thread Thomas David Rivers
Sometimes, it seems pretty easily, the output of HLASM will include a zero-length PC (Private CSECT) section with a valid of X'00' for the FLAG field, as evidenced from both the HLASM listing and the ESD data in the ESD card of the output file. This can happen quite by accident and is clearly uni

Re: zero-length PC section, the binder, and resulting AMODE/RMODE

2021-01-27 Thread Thomas David Rivers
Binyamin Dissen wrote: How would a zero length CSECT be placed in a load module? It doesn't take up any space - so it would just be given the next offset, a following CSECT would be placed at the same offset I assume. The question really is, do any of the other attributes associated with

STORAGE KEY of loaded executable

2021-01-31 Thread Thomas David Rivers
I have a situation where I LOAD a program, with a PSW KEY of 8, then branch to it. The program switches to KEY 9, but wants to reference some data in the loaded CSECT (say, for example, a =F constant in the literal area.) This blows up, I'm guessing because the key isn't the same as the loaded m

Re: STORAGE KEY of loaded executable

2021-02-01 Thread Thomas David Rivers
Binyamin Dissen wrote: On Sun, 31 Jan 2021 18:34:11 -0500 Thomas David Rivers wrote: :> When you LOAD a program, how do you control the KEY :> for the memory the LOAD'd program occupies? Can you, or :> does z/OS always LOAD (non-auth) programs in KEY=8? If you m

Re: STORAGE KEY of loaded executable

2021-02-01 Thread Thomas David Rivers
Peter Relson wrote: . May I ask why you need to switch to key 9? That is very atypical. I believe that the Storage Protect Override facility, as implemented in z/OS with Key 9, was created so that CICS transactions could avoid accidental overlays of CICS key 8 storage. So unless you're try

Re: zero-length PC section, the binder, and resulting AMODE/RMODE

2021-02-02 Thread Thomas David Rivers
Thomas David Rivers wrote: I could find nothing in the "Program Management: Advanced Facilities" doc that indicated an AMODE flag value of B'00' is any different/special verses B'01' (it is surprising that there are 2 AMODE 24 options there.) Someone kindly

Re: zero-length PC section, the binder, and resulting AMODE/RMODE

2021-02-03 Thread Thomas David Rivers
Thomas David Rivers wrote: I could find nothing in the "Program Management: Advanced Facilities" doc that indicated an AMODE flag value of B'00' is any different/special verses B'01' (it is surprising that there are 2 AMODE 24 options there.) I _did_ find a pare

Re: zero-length PC section, the binder, and resulting AMODE/RMODE

2021-02-05 Thread Thomas David Rivers
Barry Lichtenstein wrote: The binder will simply discard the "private code" (unnamed) CSECT (section), if it has text. It never gets incorporated into the module being bound, so it should have no effect on it. Binder has behaved like this since near the beginning (early 90's, around when PM3

Re: ptrace + SVC 144 + R14 + dbx setting register values

2018-06-19 Thread Thomas David Rivers
Peter Relson wrote: if SVCs architecturally have this restriction SVCs do not architecturally have this restriction. Given what I know in general (not specific to USS), I would not make the assumption that "...because the SVC 144 routine uses register 14 to exit" is true. It might be t

load module loaded address between BPX LOAD (load_hfs) and ptrace+fork+exec?

2018-07-10 Thread Thomas David Rivers
In a program, you can issue the BPX LOAD service to load a program into memory... and similar to the LOAD macro, this returns the address where the module was loaded, and the starting address. Now - is there any guarantee that if you then do a BPX FORK and then a BPX EXEC to execute the module, t

BPX PTRACE PT_CONTINUE always getting EINTR?

2018-07-17 Thread Thomas David Rivers
Does anyone happen to know why the BPX PTRACE PT_CONTINUE request would get a return code of -1 with an errno of EINTR? I seem to be bumping into that for some strange reason; the IBM doc gives a warning that the program should not have a SIGCHLD handler or strange EINTR results would happen, but

Re: S0C6 in CSRC4RG1

2018-07-19 Thread Thomas David Rivers
David Crayford wrote: It's always best to get storage on the stack and avoid the heap if you can. z/OS C/C++ supports the GCC extensions that allow you to align storage using variable attributes. char buffer[1408] __attribute__((__aligned__(16))) ; // only works in 64-bit Unless the stac

Re: S0C6 in CSRC4RG1

2018-07-22 Thread Thomas David Rivers
David Crayford wrote: On 20/07/2018 12:38 AM, Thomas David Rivers wrote: David Crayford wrote: It's always best to get storage on the stack and avoid the heap if you can. z/OS C/C++ supports the GCC extensions that allow you to align storage using variable attributes. char buffer

Re: S0C6 in CSRC4RG1

2018-07-22 Thread Thomas David Rivers
Tom Marchant wrote: On Thu, 19 Jul 2018 12:38:06 -0400, Thomas David Rivers David Crayford wrote: I don't think LE allows the stack to be above-the-bar XPLINK-64 allocates the stack above the bar. I don't know if that can be overridden. Thanks Tom! We are just n

Re: EBCDIC (was: Json table characters)

2018-08-10 Thread Thomas David Rivers
Charles Mills wrote: Thank you -- I did not know about not. I see here https://en.cppreference.com/w/cpp/language/operator_alternative that there is a whole family of these including not_eq. I have encountered IBM files that used the C++ trigraphs: ??< for { and so forth. What an unreadable

Re: EBCDIC Bad History (was: Json table characters)

2018-08-10 Thread Thomas David Rivers
David Crayford wrote: On 10/08/2018 7:34 PM, Peter Relson wrote: I have no idea why the health checker header files in SYS1.SIEAHDR.H(HZS*) chose to use them. Because no one was willing to take a stand that everyone has a system like yours that can handle the braces, at the expense of some

Re: Using the Binder API and MetalC

2018-08-14 Thread Thomas David Rivers
Kirk Wolf wrote: I believe that the real issue is that the binder api is packaged as a DLL, and AFAIK you need to run under LE and use LE/"C" linkage conventions to call it. Consider writing an RFC for "*z/OS MVS Program Management: Advanced Facilities" *to clarify whether Metal C is supported w

BPX ptrace (BPX1PTR) and writing to the child program's memory

2017-08-24 Thread Thomas David Rivers
I'm trying to get BPX1PTR to write to a child program's memory (the child is set up as PT_TRACE_ME, and the parent is waited for the child to get loaded (e.g. sitting in the parent after LoadHFS notification.) Both the PT_WRITE_I and PT_WRITE_BLOCK requests claim they "worked", (the retcode and

Re: BPX ptrace (BPX1PTR) and writing to the child program's memory

2017-08-25 Thread Thomas David Rivers
Just so this doesn't languish forever in the newsgroup history; I found the problem - programmer error :-) - Thanks! - - Dave Rivers - -- riv...@dignus.comWork: (919) 676-0847 Get your mainframe programming tools at http://www.dignus.com -

Re: Create subtask w/out a load module?

2017-08-26 Thread Thomas David Rivers
Barry Schwarz wrote: On Fri, 25 Aug 2017 22:41:35 -0400, Thomas David Rivers wrote: The ATTACH (or ATTACHX) macro is used to create a subtask - but it requires (basically) a separate load module... Is there a mechanism to create a subtask within the currently loaded load-module

ATTACH EXTR=exit and saving registers (save _all_ registers?)

2017-08-29 Thread Thomas David Rivers
When you specify the EXTR= parameter on an ATTACH, you are indicating the offset of an exit to asynchoronously receive control when the sub-task ends. This exit is invoked as many are, in that a 72-byte save area is addressed by R13 for saving/restoring the registers. The documentation even goes

Re: ATTACH EXTR=exit and saving registers (save _all_ registers?)

2017-08-29 Thread Thomas David Rivers
Steve Smith wrote: You'll have to spell it as ETXR, and if by "offset" you mean offset from 0, then sure. You can do what you want with the registers. The ETXR runs under an IRB on the mother task, so I'm not sure why any of them need to be saved. Beyond that, I've no idea what you're plannin

Re: ATTACH EXTR=exit and saving registers (save _all_ registers?)

2017-08-29 Thread Thomas David Rivers
Steve Smith wrote: The doc isn't "wrong", it's just a bit overstated. It's a good idea to follow normal linkage conventions (well normal from 1970) and they're encouraging that. This is an ancient facility, and for all I know it may have been a more vital requirement in the past. Also, I have

Re: ATTACH EXTR=exit and saving registers (save _all_ registers?)

2017-08-29 Thread Thomas David Rivers
Tom Marchant wrote: On Tue, 29 Aug 2017 15:59:53 -0400, Thomas David Rivers wrote: The doc seems ambiguous to me; which leads me down this path of doing funky save-area machinations to ensure that all registers are saved - not just the "normal" ones. STM 14,12,12(

Re: ATTACH EXTR=3D3Dexit and saving registers (save _all_ registers?)

2017-08-30 Thread Thomas David Rivers
Peter Relson wrote: If I didn't have to save/restore R15 and R1, then I could totally get away with something very close to standard linkage Huh? You can precisely use standard linkage. Standard linkage starts with "save all". It does not require "restore all". If a service (or protocol) d

  1   2   >