MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Receive map with mapname in a variable name
Goto page Previous  1, 2
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> CICS and Middleware
View previous topic :: View next topic  
Author Message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Tue Dec 05, 2006 10:33 am    Post subject: Reply with 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.

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
View user's profile Send private message
Jamylady
Beginner


Joined: 04 Nov 2004
Posts: 68
Topics: 22

PostPosted: Thu Dec 07, 2006 5:36 am    Post subject: Reply with quote

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
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Thu Dec 07, 2006 12:30 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Jamylady
Beginner


Joined: 04 Nov 2004
Posts: 68
Topics: 22

PostPosted: Fri Dec 08, 2006 5:09 am    Post subject: Reply with quote

Thanks a million to all those who enlightened me with lot of new knowledge
Thanks again
JA
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> CICS and Middleware All times are GMT - 5 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group