On Sat, 19 Mar 2011 06:09:31 -0500, John McKown <[email protected]> wrote:
>I'm not a expert, but I'd look at two possibilities. Neither am I, but I did a few experiments a couple of years ago. >Another possibility, but more difficult to implement, is to continue to >use your UNIX code. This can be done in CICS, but only in what is called >an Open Transaction Environment (OTE) or OPENAPI. This environment runs >the code on a separate TCB from the normal quasi-reentrant TCB (QR) that >most CICS programmers are used to. This requires the program to be >written to be threadsafe, which restricts which EXEC CICS functions can >be used. I do believe this is not true. One can use any EXEC CICS command, threadsafe or not, in a threadsafe program. CICS will switch back to the QR TCB when it needs to execute a non-threadsafe command. > And requires more careful coding of the program. Now, this is true. One has indeed to write threadsafe code. Just declaring a module threadsafe in the PCT will definitely not make it so... This being said, one can use the fopen, fread and fwrite functions in a CICS program. And one can do so on regular MVS datasets as well as on files in the hierarchical file system. There is however an issue when it comes to serialization... Indeed, any access to a given file by any given task may and will interfere with any access from any other task that wants to access the same file. And it is up to the developer to include the proper serialization within the application program. Now, if today you are using this technique in an MPP, then the serialization issue may already (partly) have been solved. Indeed, an MPP will also serve multiple transaction for different users, although, if my memory serves me right, it does this in a different way than CICS does. CICS dispatches work for different transactions running in parallel to a number of TCBs within the same region, where IMS will serially assign an MPP region to a transaction and complete that transaction before assigning the MPP to the next one. (Someone with a more fresh recollection than my 20+ years old experience with IMS can confirm this, please? Thanks!) Cheers, Jantje. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html

