| View previous topic :: View next topic |
| Author |
Message |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Tue Dec 05, 2006 10:33 am Post subject: |
|
|
Big question is why do you want a generic SEND/RECEIVE? Normally done because the SEND/RECEIVE is done by one specific module that has all the possible handle conditions set and appropriately anticipated. Maps are usually module oriented, and as such, the SEND/RECIEVE is module oriented. VSAM file reads/writes, DB2 access, are system level and could be handled generically.
COPY is a COBOL Compiler directive. COPY has no effect on Pre-Compilers - CICS or DB2. Either precompile the copybook - very dangerous, or use something like endevor or panvalet which will include copybooks prior to a Pre-Compiler step. Otherwise, you can't put CICS commands in a copybook and expect the COBOL Compiler to expand the source stream prior to the Pre-Compiler step.
So, unless you only have one module doing the SEND/RECEIVE and have a utility to expand your source stream prior to Pre-compile, you should not attempt to place CICS commands in copybooks.
| Quote: | | But now even before I get to execute any CICS command, I am getting an ASRA because I was trying to move a value to a map filed (DATEO) which is actually a linkage section variable. Am i doing some thing stupid here? |
I don't know. Have you provided addressability to the MAP declared in LINKAGE by either a PROCEDURE DIV USING parm or SETting the ADDRESS of the MAP to a POINTER or the ADDRESS OF an AREA? Until you do that there is no 'ADDRESS OF DNPM41'. _________________ Dick Brenholtz
American living in Varel, Germany |
|
| Back to top |
|
 |
Jamylady Beginner
Joined: 04 Nov 2004 Posts: 68 Topics: 22
|
Posted: Thu Dec 07, 2006 5:36 am Post subject: |
|
|
| Quote: |
Big question is why do you want a generic SEND/RECEIVE? Normally done because the SEND/RECEIVE is done by one specific module that has all the possible handle conditions set and appropriately anticipated. Maps are usually module oriented, and as such, the SEND/RECIEVE is module oriented. VSAM file reads/writes, DB2 access, are system level and could be handled generically.
|
Yes, that is a valid question now. We have many programs and looks like receive, send and return paragraphs are the same except for the map names. So I was thinking of using it as a copy book. Now feel like it is not worth doing because of these complication.
Thanks
JA |
|
| Back to top |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Thu Dec 07, 2006 12:30 pm Post subject: |
|
|
| I have created generic SEND/RECEIVE programs in the past as a test platform for other reasons (one screen takes the name of the map/mapset and then displays the screen and the results entered on the screen) but it is not trivial and it actually adds enough code that the logic is hard to follow and it may impose restrictions on your maps depending on how you read the RECEIVEd data. In production it might be better to keep what you have. |
|
| Back to top |
|
 |
Jamylady Beginner
Joined: 04 Nov 2004 Posts: 68 Topics: 22
|
Posted: Fri Dec 08, 2006 5:09 am Post subject: |
|
|
Thanks a million to all those who enlightened me with lot of new knowledge
Thanks again
JA |
|
| Back to top |
|
 |
|
|
|