Blue sky threading - was: IBM C and Cobol Threading question

2014-05-16 Thread Jon Perryman
Storage overlays for multi-threaded servers such as CICS and IMS do exist but are far less than UNIX threading. CICS allows the use of key 9 and programs are usually conversational (vaguely remember that most storage is free while waiting for a terminal response). IMS runs code in dependent

Re: IBM C and Cobol Threading question

2014-05-14 Thread John McKown
On Tue, May 13, 2014 at 7:24 AM, Scott Ford scott_j_f...@yahoo.com wrote: John, Are you speaking of Sub Address Space storage ? I've never heard of Sub Address Space storage. I can't figure out what you mean. What I meant was storage which is in a subpool, such as 130, which is automatically

Re: IBM C and Cobol Threading question

2014-05-14 Thread Shane Ginnane
On Wed, 14 May 2014 06:50:09 -0500, John McKown wrote: I've never heard of Sub Address Space storage. I can't figure out what you mean. Try subspace group. Shane ... -- For IBM-MAIN subscribe / signoff / archive access

Re: IBM C and Cobol Threading question

2014-05-14 Thread John McKown
On Wed, May 14, 2014 at 7:47 AM, Shane Ginnane ibm-m...@tpg.com.au wrote: On Wed, 14 May 2014 06:50:09 -0500, John McKown wrote: I've never heard of Sub Address Space storage. I can't figure out what you mean. Try subspace group. I have some minimal knowledge of that, thanks to CICS

Re: IBM C and Cobol Threading question

2014-05-14 Thread Scott Ford
From the MVS extended Addressability Manual …SA22-7618-08 A subspace is a specific range of storage in the private area of an address space, designed to limit the storage a program can reference. A program that is associated with a subspace cannot reference some of the private area storage

Re: IBM C and Cobol Threading question

2014-05-14 Thread Binyamin Dissen
Subspace groups are not secure. A program can freely reset their subspace group. If you play nicely, the subspace groups help. On Wed, 14 May 2014 08:09:02 -0500 John McKown john.archie.mck...@gmail.com wrote: :On Wed, May 14, 2014 at 7:47 AM, Shane Ginnane ibm-m...@tpg.com.au wrote: : : On

Re: IBM C and Cobol Threading question

2014-05-14 Thread John McKown
On Wed, May 14, 2014 at 8:59 AM, Binyamin Dissen bdis...@dissensoftware.com wrote: Subspace groups are not secure. A program can freely reset their subspace group. Another wonderful idea shot down by cruel reality. If you play nicely, the subspace groups help. Just blue skying, but I

Re: IBM C and Cobol Threading question

2014-05-13 Thread John McKown
On Mon, May 12, 2014 at 10:11 PM, Jon Perryman jperr...@pacbell.net wrote: In assembler, we usually do this by allocating the storage to a shared subpool or allocating the storage to a TCB that we know is the last TCB to terminate. This allows assembler programmers to choose the time that the

Re: IBM C and Cobol Threading question

2014-05-13 Thread Scott Ford
John, Are you speaking of Sub Address Space storage ? Regards, Scott From: john.archie.mck...@gmail.com Sent: ‎Tuesday‎, ‎May‎ ‎13‎, ‎2014 ‎7‎:‎33‎ ‎AM To: IBM Mainframe Discussion List On Mon, May 12, 2014 at 10:11 PM, Jon Perryman jperr...@pacbell.net wrote: In assembler, we

Re: IBM C and Cobol Threading question

2014-05-13 Thread Jon Perryman
Having the job step TCB own the storage is the best default for shared storage but it is not always correct. As I said before, shared storage really means when do I free the storage if not specifically freed.  Lets use UNIX processes as an example. It is the UNIX equivalent of an MVS job but

Re: IBM C and Cobol Threading question

2014-05-13 Thread John Gilmore
Some comments. The terms 'local' and 'global' have well-established definitions and uses---They specify the scopes of set symbols at assembly time---in the HLASM macro language, and their usurpation for other purposes is ill-advised. '...that way madness lies; let me shun that; No more of

Re: IBM C and Cobol Threading question

2014-05-13 Thread Scott Ford
John, So what you call setting a token, IEANTCR ..then allocating storage based on the return address ? A block of storage ? Curious ... Scott ford www.identityforge.com from my IPAD On May 13, 2014, at 1:32 PM, John Gilmore jwgli...@gmail.com wrote: Some comments. The terms 'local'

Re: IBM C and Cobol Threading question

2014-05-12 Thread Tom Ross
The distinction between COBOL's distinction of WORKING-STORAGE and LOCAL-STORAGE is essentially the same as the PL/I and then C distinction of static and automatic storage. As far as I can judge from earlier posts in this thread the shared facility is not a dynamic shared control block; it is a

Re: IBM C and Cobol Threading question

2014-05-12 Thread Jon Perryman
In assembler, we usually do this by allocating the storage to a shared subpool or allocating the storage to a TCB that we know is the last TCB to terminate. This allows assembler programmers to choose the time that the storage will be automatically freed if recovery / termination occurs for our

Re: IBM C and Cobol Threading question

2014-05-09 Thread Scott Ford
All: I am not trying to pour cold water on any ideas or dis-credit anyone, that's not me . I have a weird kinda legacy issue I am trying to solve. Basically, COBOL STC calling Assembler subroutines. The STC(s), are single threaded or single TCB and the real issue is we need them to run

Re: IBM C and Cobol Threading question

2014-05-09 Thread John Gilmore
Scott, Is this message table in fact a static one than you change only infrequently, e.g., when you also make changes in the routines that use it? If so, you should consider making it into a load module or, preferably, a program object. It can then be brought into storage using a LOAD or LOADX.

Re: IBM C and Cobol Threading question

2014-05-09 Thread Scott Ford
John, Yes sir it is static …I like the idea of a load module ..easier for sure..and I can protect it.. A big thanks.. Hey do you know if a Heap can be passed in a C thread ? Regards, Scott From: John Gilmore Sent: ‎Friday‎, ‎May‎ ‎9‎, ‎2014 ‎11‎:‎26‎ ‎AM To: IBM Mainframe Discussion

IBM C and Cobol Threading question

2014-05-08 Thread Tom Ross
I have written a C program using threads and have a question. I have an ext= ernal message table that I need to be persistent between threads. The mess= age table is loaded from an external QSAM file. Program in Cobol loads the = table. I want to be able to use the message table in other threads.

Re: IBM C and Cobol Threading question

2014-05-08 Thread Scott Ford
Tom, Thank you very much, I appreciate the clarification, I thought this was how threading worked with Cobol but wanted to make sure. Regards, Scott From: Tom Ross Sent: ‎Thursday‎, ‎May‎ ‎8‎, ‎2014 ‎2‎:‎02‎ ‎AM To: IBM Mainframe Discussion List I have written a C program using

Re: IBM C and Cobol Threading question

2014-05-08 Thread John McKown
Tom, Looking here: http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/igy3pg31/4.4 quote For the data that you want to isolate to an individual program invocation instance, define the data in the LOCAL-STORAGE SECTION. In general, this choice is appropriate for working data in threaded

Re: IBM C and Cobol Threading question

2014-05-08 Thread Jon Perryman
I personally would STRONGLY discourage this implementation. You're not the only one in your environment. Why not do it correctly and allocate from shared storage pool. Use either C's or assemblers implementation. Remember if you do it once, someone else will think this clever and use it

Re: IBM C and Cobol Threading question

2014-05-08 Thread Scott Ford
John, As always my friend excellent points. I have a follow on question can you pass a created user heap from thread to thread ?? Regards, Scott From: John McKown Sent: ‎Thursday‎, ‎May‎ ‎8‎, ‎2014 ‎10‎:‎04‎ ‎AM To: IBM Mainframe Discussion List Tom, Looking here:

Re: IBM C and Cobol Threading question

2014-05-08 Thread John Gilmore
The distinction between COBOL's distinction of WORKING-STORAGE and LOCAL-STORAGE is essentially the same as the PL/I and then C distinction of static and automatic storage. As far as I can judge from earlier posts in this thread the shared facility is not a dynamic shared control block; it is a

Re: IBM C and Cobol Threading question

2014-05-08 Thread Scott Ford
Jon, Its not my call ….I am only the guy asking the questions. From: Jon Perryman Sent: ‎Thursday‎, ‎May‎ ‎8‎, ‎2014 ‎10‎:‎05‎ ‎AM To: IBM Mainframe Discussion List I personally would STRONGLY discourage this implementation. You're not the only one in your environment. Why not

Re: IBM C and Cobol Threading question

2014-05-08 Thread Scott Ford
Jon, Can you point me to the shared memory you spoke of in C …I would prefer to write this in C / Assembler…get away from Cobol, not that I don't like it. We are a small vendor …. It would be much appreciated From: John McKown Sent: ‎Thursday‎, ‎May‎ ‎8‎, ‎2014 ‎10‎:‎04‎ ‎AM To: IBM

IBM C and Cobol Threading question

2014-05-07 Thread Scott Ford
All: I have written a C program using threads and have a question. I have an external message table that I need to be persistent between threads. The message table is loaded from an external QSAM file. Program in Cobol loads the table. I want to be able to use the message table in other