Re: C++ reinterpret_cast question

2020-01-29 Thread Allan Kielstra
Also, I trust that you know what you're doing! Depending on the implementation of C++, a pointer to a function can sometimes be a pointer to a function descriptor. So be careful with what you do with opts_char. (But you say that the resulting code basically works so that is good.) Also, on

Re: C++ reinterpret_cast question

2020-01-29 Thread Allan Kielstra
FWIW, you don't get this warning with 2.4.1 (or 2.3.1). What version are you using? -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Re: Migrating to new compiler release

2020-01-14 Thread Allan Kielstra
Thanks a lot, Charles! That's going to occupy a lot of the team's time next week trying to answer that question! So far, I know of at least one that is having a very hard time. -- For IBM-MAIN subscribe / signoff / archive

Re: Migrating to new compiler release

2020-01-14 Thread Allan Kielstra
Hi Frank There are a few relatively minor differences in code generated but these tend to be mostly focused on taking advantage of z15. I assume you're not compiling for z15 (yet)? Other than z15 exploitation, this is like a really big continuous delivery PTF. There is always the

Re: Dynamic and static linked COBOL programs

2020-01-02 Thread Allan Kielstra
Actually, you can still do DYNAMic call with call literal. CALL 'ABC" can still be DYNAM. Mostly good news: If you look around page 405 of the Version 6.3 PG (and there is a corresponding page for previous versions of the compiler) you will find a description of INFO BYTES. Offset 8, bit 5

Re: Looking for some large COBOL program examples

2019-12-10 Thread Allan Kielstra
Since I know what I want the answer to be."V6 is almost as fast as V4" :-) my hope is you get, say, 19000 lines of data division and 1000 of procedure division! That's just my way of saying that, in my experience, no two 2 line programs are the same in terms of compilation resources.

Re: How can I generate a UUID in a z/OS COBOL Program

2019-11-01 Thread Allan Kielstra
We're actually working on generating UUID directly from COBOL. I would expect to see it in V6.2 and V6.3 in a continuous delivery PTF fairly soon. We'll post more information when it does become available. -- For IBM-MAIN

Re: casting with XL C\C++ compiler

2019-09-27 Thread Allan Kielstra
POSIX(ON) is perfectly fine for new code. From an administration perspective, the user running a POSIX(ON) program needs a RACF OMVS Segment. That's really not that big a deal. Obviously, if you run in USS, you already have that set up. If you have existing code (say COBOL) that is running

Re: casting with XL C\C++ compiler

2019-09-27 Thread Allan Kielstra
Hi Charles We are listening! https://www-01.ibm.com/servers/resourcelink/svc00100.nsf/pages/xlCC++V231ForZOsV23?OpenDocument This is a web deliverable that co-exists (does not overwrite) the existing xlC compiler. I have personally used it to develop C++ code with initializer lists,

Re: casting with XL C\C++ compiler

2019-09-26 Thread Allan Kielstra
The first bit of guidance is ... Don't Do That!! I could not quite figure out what you meant, but this compiled for me with no errors struct S { int i; }; void X() { S * p; char Buffer[1000]; p = (S *) Buffer; p = reinterpret_cast(Buffer); // no way static_cast will

Re: COBOL runtime routine abend S0C4 or IEC036I 002-08 message and abend 002 closing VB file never written to

2019-09-10 Thread Allan Kielstra
Yes, please. Open a case/PMR. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Re: GIM69168E messages on COBOL V6.2 upgrade

2019-03-15 Thread Allan Kielstra
Please open a PMR against COBOL V6.2. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Re: COBOL 4.2, 5.1 and 5.2 EOS Dates

2019-02-05 Thread Allan Kielstra
Apologies: The V5.1 and V5.2 date is April 30, 2020. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

COBOL 4.2, 5.1 and 5.2 EOS Dates

2019-02-05 Thread Allan Kielstra
More than once on this forum, folks have asked about when Enterprise COBOL V4.2 will enter EOS. This announcement has the details: http://www-01.ibm.com/common/ssi/ShowDoc.wss?docURL=/common/ssi/rep_ca/2/897/ENUS919-022/index.html=en_locale=en V5.1, V5.2 will be EOS May 30, 2020. V4.2 will be

Re: COBOL 64bit

2018-10-17 Thread Allan Kielstra
It is only available in 31-bit. An interesting question to ask is: if it were available in 64-bit but mixing and matching 31- and 64-bit modules was not possible (i.e., you would have to recompile all modules in an application), would that be interesting? Or is it the case that it is vital

Re: C errno from COBOL

2018-10-11 Thread Allan Kielstra
Hi Frank: I'm not sure if this will work for all times and in all cases. Here is my C program simulating a C API that sets errno: #include int cfunc() { errno = 8; } Compiled with no options with z/OS V2.3 XL C/C++ Here is a small COBOL program I wrote CBL

Re: z13s not in Canada wasRe: [External] Re: Amazon Prime meltdown leads to IBM LinuxONE

2018-07-30 Thread Allan Kielstra
Canadian Content usually refers to Canadian content in cultural products. For example, on radio, a certain percentage (which varies through the day) of programming must be composed by or performed by or recorded by Canadian artists. Similarly, a certain amount of television programming on

Re: CBT tape file 321 Cobol Analyzer

2018-06-20 Thread Allan Kielstra
Is there some specific information about the COBOL program that you are trying to find? -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Re: Best Group for COBOL Question(s)

2018-05-30 Thread Allan Kielstra
This list is followed pretty closely by the team so you can ask questions about COBOL here. You can also go to the COBOL Cafe (Discussion forum section) and ask questions there. There is an RFE on this topic and it has been accepted. There is no target date for that RFE. The issue is this:

Re: Dr. John Ehrman

2018-02-20 Thread Allan Kielstra
John was an exceedingly gracious individual without whom a lot of us would have been lost. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Re: Silly C problem adding hex 6C

2018-02-08 Thread Allan Kielstra
Now you ran into another problem (((char *)pointer) + offset) is how you want to bind that expression. (And I still think using structs is better) (and you may have to add (int*) in front of the line above) -- For IBM-MAIN

Re: Silly C problem adding hex 6C

2018-02-08 Thread Allan Kielstra
The size of a char in 1 byte. Try (char *) ASXB = (char *) ASCB + 0x6c; /* lazy version */ But that's not really very nice C code. Rather than using int * variables, it would be preferable to provide a C struct describing the layout of storage and using a pointer (or a pointer to a pointer)

Re: COBOL source code quality check for performance

2018-01-25 Thread Allan Kielstra
Another thing you can do with the new compiler is use the option RULES(NOLAXPERF) This will cause the compiler to add messages to the listing when you do things like use display data items for loop induction variables or in reference modifications. It's a good idea to use this option and

Re: Random number generation in a fixed range via utility program(s) only?

2017-12-11 Thread Allan Kielstra
I'm not sure if this qualifies as "utilities" or "scripting." You did invite submissions from the USS community. And, in that community, those concepts can get mixed. At any rate, here is my effort using USS od -d /dev/urandom 2>/dev/null | head -8000 | cut -d" " -f2- | sed "s/ *//g" | cut

Re: Cobol 5/6 - Compile listing integrated into load module

2017-12-06 Thread Allan Kielstra
The source is included as part of the TEST data. All of the TEST data is in a NOLOAD section in the object file. With V6.2, TEST(SEPARATE) is supported and the TEST data can be in a separate data set. The TEST option is described in the PG. Since TEST(SEPARATE) is new (to V6 anyway) you can

Re: Does IBM document the interface to the DB2 COBOL coprocessor?

2017-11-09 Thread Allan Kielstra
No we don't document these interfaces. I can say that there are variations for co- and pre-processors and the interfaces for EXEC CICS, EXEC SQL and EXEC SQLIMS are not the same. Out of curiosity, why were you asking? -- For

Re: COBOL calling Java - S922 error

2017-09-12 Thread Allan Kielstra
(The machine I am using has many versions of Java; hence the extra directory) In my installation, I actually have 5(!) copies of J7.0 libjvm.so. Four of them (bin/j9vm, bin/classic, lib/s390/j9vm, lib/s390/classic) are identical. The fifth (lib/s390/default) is well over twice as large so I

Re: COBOL calling Java - S922 error

2017-09-12 Thread Allan Kielstra
(It's Allan, not Alan. But that is a common mistake.) I changed the Java to /usr/lpp/java/IBM/J7.0 and I also changed the run step to set PATH= (That is, PATH has no members in it when I run the program). And, as luck would have it, my program still works. I also ran the program in a

Re: COBOL calling Java - S922 error

2017-09-11 Thread Allan Kielstra
I did get this to work using USS. I had to change the following calls: Call "IBMZOS_NewStringPlatform" Call "IBMZOS_NewStringPlatform" CALL 'IBMZOS_GetStringPlatformLength' CALL 'IBMZOS_GetStringPlatform' (I don't know why that change was made, but it

Re: xkcd is too true, but posted at the wrong time.

2017-08-31 Thread Allan Kielstra
The start date and end date for DST was adjusted sometime in the decade of the 2000s. Again, this was done as an energy saving scheme. I can't find the evidence of it at the moment but I recall another instance of the law of unintended consequences. Apparently, (at least in the US) early in

Re: MSGIEW2678S Module contains one or more deferred classes

2017-08-11 Thread Allan Kielstra
Yes a C DLL does have all static variables allocated and initialized when a DLL is loaded. This is usually fine. However suppose you had a few thousand independent programs that you linked into a DLL simply for packaging purposes. And suppose that each program had a lot of static storage

Re: REGION=0M leads to CPU through the roof

2017-07-24 Thread Allan Kielstra
Do you have access to Application Performance Analyzer (APA) or Strobe (or FreezeFrame)? If not, can you cut the program down to some kernel that exhibits the same characteristic? Also, do you happen to have COBOL V5 or V6 (maybe the trial version)?

Re: REGION=0M leads to CPU through the roof

2017-07-24 Thread Allan Kielstra
I want to be clear on one thingThe program produces the same result and has the same return code in both cases? Possibly another way of asking the same thing is: why did you alter the region size in the first place? --

Re: Long execution & high CPU usage due to decimal overflow (PGM 00A) and large system trace tables

2017-05-16 Thread Allan Kielstra
It sounds like it's time to open a PMR. Do you want to do that and can you do that? -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Re: Long execution & high CPU usage due to decimal overflow (PGM 00A) and large system trace tables

2017-05-16 Thread Allan Kielstra
Hi Peter I have a suspicion that this is a mixed language program. That is, it consists of COBOL and, say C. (Or it uses COBOL features with a C run time implementation such as XML or OO COBOL.) Can you confirm this is the case?

Re: How to find Cobol (and C) Working Storage variables in an SVCDUMP

2017-05-11 Thread Allan Kielstra
Bernd's assembler technique will work. I have no idea why I can't find a description of this (taken from /usr/include/stdio.h) #ifndef __gtca #define __gtca() _gtca() #ifdef __cplusplus extern "builtin" #else #pragma linkage(_gtca,builtin) #endif const void

Re: How to find Cobol (and C) Working Storage variables in an SVCDUMP

2017-05-11 Thread Allan Kielstra
If a C or PL/I or COBOL (or any LE high level language) program calls an assembler program, it will have set GPR12 to the CEE Anchor correctly before making the call. Assuming that you are completely lost in space in LE and you need the CEE anchor, there is a service called CEEARLU. It is

Re: How to find Cobol (and C) Working Storage variables in an SVCDUMP

2017-05-11 Thread Allan Kielstra
This statement: >>CEECSA is always address by reg 12, while inside a LE module. is not strictly true. GPR12 is only required to point to CEECSA on entry to and exit from a procedure. Compilers are free to use GPR12 for whatever other purpose they chose at other program points. That means

Re: How to find Cobol (and C) Working Storage variables in an SVCDUMP

2017-05-10 Thread Allan Kielstra
Bernd has already started the reply, but I would like to add a little bit. (First, I should say that most of this stuff IS documented in the PG and MG, but...) To find a specific W-S variable, you will need a listing. If you start with a dump, you will find a stack frame for your COBOL

Re: How are Program Object sections with Defer attribute loaded?

2017-05-10 Thread Allan Kielstra
That's actually a trickier question than you might imagine! There are a number of cases: the case where your module consists of COBOL, PL/I and assembler only and all other cases. All other cases include cases where the COBOL run time support is implemented in a language other than the

Re: Interesting article on UNICODE.

2017-05-08 Thread Allan Kielstra
In addition to PIC X, COBOL does have PIC N: National characters. These are basically UTF-16 characters. (With the property alluded to by Charles Mills: these are fixed two byte data items.) COBOL also offers DBCS characters. Also, there are some UTF-8 functions such as ULEN that operate

Re: COBOL integrated pre-processor, API in general

2017-04-17 Thread Allan Kielstra
I wouldn't necessarily assume that there is a fixed API for EXEC CICS, EXEC SQL, EXEC SQLIMS. It's always possible that each one of these gets some sort of custom treatment from the compiler. -- For IBM-MAIN subscribe /