IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Two receive maps in same program


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rashmirgowda

New User


Joined: 18 Jun 2008
Posts: 25
Location: india

PostPosted: Tue Jul 05, 2011 9:03 pm
Reply with quote

Hi,

I am having two maps(MAP1 and MAP2) in a mapset(MAPSM).I am displaying both the maps just one one after the other.

I am updating fields F1 in MAP1 and F2 in MAP2.I am trying to receive a both the maps.But after receive of first map MAP1 both the maps got displayed and screen waits for input.After ENTER key is pressed,program processing continues to receive second Map MAP2.Please advise.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Jul 05, 2011 9:27 pm
Reply with quote

RTFM
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Jul 05, 2011 9:48 pm
Reply with quote

Hello,

If you are unwilling/unable to read the specifics in the documentation, suggest you look for another program that does this successfully and look at the code being used. . .
Back to top
View user's profile Send private message
Gautam512

Active User


Joined: 05 Oct 2005
Posts: 308
Location: Vizag / US

PostPosted: Wed Jul 06, 2011 2:31 am
Reply with quote

Can you please show us the mapset definitions used for the 2 maps....
Back to top
View user's profile Send private message
rashmirgowda

New User


Joined: 18 Jun 2008
Posts: 25
Location: india

PostPosted: Wed Jul 06, 2011 9:13 pm
Reply with quote

Symbolic Mapset definition for 2 maps:

01 MAP1I.
02 FILLER PIC X(12).
02 FIELD1 PIC X(05).
.
.
.
01 MAP1O REDEFINES MAP1I.
02 FILLER PIC X(12).
02 FIELD1 PIC X(05).
.
.
.
01 MAP2I.
02 FILLER PIC X(12).
02 FIELD2 PIC X(05).
.
.
.
01 MAP2O REDEFINES MAP2I.
02 FILLER PIC X(12).
02 FIELD2 PIC X(05).

In Program i have coded two Receive map as below:

EXEC CICS RECEIVE MAP (MAP1)
MAPSET (MAPS)
INTO (MAP1I)
RESP (WS-CICS-RESP)
END-EXEC

IF WS-CICS-RESP NOT = DFHRESP (NORMAL) AND
WS-CICS-RESP NOT = DFHRESP (MAPFAIL)
Send error message
END-IF

EXEC CICS RECEIVE MAP (MAP2)
MAPSET (MAPS)
INTO (MAP2I)
RESP (WS-CICS-RESP)
END-EXEC

IF WS-CICS-RESP NOT = DFHRESP (NORMAL) AND
WS-CICS-RESP NOT = DFHRESP (MAPFAIL)
Send error message
END-IF


After Receieve of Second map MAP2,whole screen is throwed and screen is waiting for response.When i press ENTER,the flow starts after the second RECEIVE command.Please guide me.It should not wait for response,the flow should continue.
Back to top
View user's profile Send private message
shibub

New User


Joined: 16 Oct 2009
Posts: 13
Location: Bangalore

PostPosted: Thu Jul 07, 2011 10:44 am
Reply with quote

Quote:

EXEC CICS RECEIVE MAP (MAP1)
MAPSET (MAPS)
INTO (MAP1I)
RESP (WS-CICS-RESP)
END-EXEC

IF WS-CICS-RESP NOT = DFHRESP (NORMAL) AND
WS-CICS-RESP NOT = DFHRESP (MAPFAIL)
Send error message
END-IF

EXEC CICS RECEIVE MAP (MAP2)
MAPSET (MAPS)
INTO (MAP2I)
RESP (WS-CICS-RESP)
END-EXEC

IF WS-CICS-RESP NOT = DFHRESP (NORMAL) AND
WS-CICS-RESP NOT = DFHRESP (MAPFAIL)
Send error message
END-IF


I believe the requirement is not clear!, are you trying to receive MAP2 without displaying it (Soon after receiving MAP1)? icon_eek.gif
Back to top
View user's profile Send private message
rashmirgowda

New User


Joined: 18 Jun 2008
Posts: 25
Location: india

PostPosted: Thu Jul 07, 2011 12:45 pm
Reply with quote

I have SEND both the maps MAP1 and MAP2 initially...After that i am modifying few fields in MAP2.In this case i am using both RECEIVE maps for MAP1 and MAP2 one after the another.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Thu Jul 07, 2011 5:03 pm
Reply with quote

send recieve;send receive
What do you think would happen when you do 'send send' - yes, the second wipes the first so you cannot interface with the first.
Back to top
View user's profile Send private message
rashmirgowda

New User


Joined: 18 Jun 2008
Posts: 25
Location: india

PostPosted: Thu Jul 07, 2011 5:34 pm
Reply with quote

You mean to say i should not give two send maps simulatenously.But my requirement is need to display both maps initially.After modifying a fields in both maps...How to issue RECEIVE map for both the maps? Please advise.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Thu Jul 07, 2011 5:38 pm
Reply with quote

Quote:
You mean to say i should not give two send maps simulatenously.But my requirement is need to display both maps initially.After modifying a fields in both maps...How to issue RECEIVE map for both the maps? Please advise.
Rewrite as a single map.

Repeat: rewrite the logic to use a single map.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Jul 07, 2011 7:57 pm
Reply with quote

Hello,

Quote:
But my requirement is need to display both maps initially.
That is NOT a requirement. . .
Back to top
View user's profile Send private message
Gautam512

Active User


Joined: 05 Oct 2005
Posts: 308
Location: Vizag / US

PostPosted: Sat Jul 09, 2011 1:48 am
Reply with quote

Hi Rashmi,

I have once solution (might be helpful),

Ans: You can use only 1 Map in the Mapset, change the screen layout to show it as 2 different Maps.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts DB2 Event passed to the Application P... DB2 1
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts EZT program to build a flat file with... All Other Mainframe Topics 9
Search our Forums:

Back to Top