Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

how to execute MASSINSERT concurrently?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Thu Jan 10, 2013 9:38 am    Post subject: how to execute MASSINSERT concurrently?
Reply with quote

if transaction A produces the following 4 messages:
Code:

aaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaa

and issue WRITE FILE with MSSINSERT option.

at the same time, anothe transaction B produces the following 4 messages:
Code:

BBBBBBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBBBBBB

and issue WRITE FILE with MSSINSERT option.

but according to my test, when TRAN A is writing file with MSSINSERT option, tran B cannot execute the same command against the same file.

Can anybody please tell me how to make WRITE FILE with MASSINSERT currently possible?

I want to procedure below result:
Code:

aaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaa
BBBBBBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBBBBBB



thanks in advance.[/quote]
Back to top
View user's profile Send private message

Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Thu Jan 10, 2013 9:56 am    Post subject: Reply to: how to execute MASSINSERT concurrently?
Reply with quote

Are these KSDS or ESDS records?
Back to top
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Thu Jan 10, 2013 10:41 am    Post subject:
Reply with quote

it's a ESDS file.
Back to top
View user's profile Send private message
Binop B

Active User


Joined: 18 Jun 2009
Posts: 407
Location: Nashville, TN

PostPosted: Fri Jan 11, 2013 2:23 am    Post subject:
Reply with quote

Hi dejunzhu,

What is the issue that you are facing ?

You say
Quote:
but according to my test, when TRAN A is writing file with MSSINSERT option, tran B cannot execute the same command against the same file.


If TRAN-B is executing only after TRAN-A then output should have come as you would have wanted...
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Fri Jan 11, 2013 2:32 am    Post subject: Reply to: how to execute MASSINSERT concurrently?
Reply with quote

I forgot to mention that when the MASSINSERT "WRITE" is complete, you must issue an explicit UNLOCK FILE (my advice) as soon as possible or, if you're at task termination, CICS will issue an implicit UNLOCK for you.

In your example, it's basically a horse race and TRNA was invoked first to issue the MASSINSERT, then TRNB can then issue the MASSINSERT as soon as the explicit or implcit UNLOCK is issued.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7905
Location: Bellevue, IA

PostPosted: Fri Jan 11, 2013 5:03 am    Post subject:
Reply with quote

Quote:
Can anybody please tell me how to make WRITE FILE with MASSINSERT currently possible?
If you read the CICS Application Programming Guide manual, you will find that MASSINSERT locks the empty record area to be used so no other transaction can access it. For an ESDS, that means MASSINSERT is a purely sequential operation, and concurrent transactions CANNOT be executed to do MASSINSERT against the same ESDS file at one time. Hence, the behavior you are seeing is normal and expected and cannot be changed by you.
Back to top
View user's profile Send private message
Jose Mateo

Active User


Joined: 29 Oct 2010
Posts: 110
Location: Puerto Rico

PostPosted: Fri Jan 11, 2013 7:58 pm    Post subject: Reply to: how to execute MASSINSERT concurrently?
Reply with quote

Good day to all!
I would like to add to what Robert has already mention, because you are working with a ESDS file the records are appended to the file. So the first MASS INSERT has to be completed before the second could append more records to the file. Does it make sense?
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Fri Jan 11, 2013 9:15 pm    Post subject: Reply to: how to execute MASSINSERT concurrently?
Reply with quote

Hi Jose,

Quote:
Does it make sense?
Yup, at least to everyone except TS . . . icon_neutral.gif

d
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Fri Jan 11, 2013 9:17 pm    Post subject: Reply to: how to execute MASSINSERT concurrently?
Reply with quote

Quote:
Yup, at least to everyone except TS . . .


but is enough to look at all the others TS posts to see that very little of what we say is appreciated

He just accepts only the answers that agree with his point of view !
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Fri Jan 11, 2013 9:21 pm    Post subject: Reply to: how to execute MASSINSERT concurrently?
Reply with quote

What Jose has described is similar to a program, which reads a record for update, which locks out all other updates as the CI is locked to other tasks. As soon as a rewrite or unlock is issued, the CI is free. That's why it is important to get in/get out as quickly as possible and with completion of a MASSINSERT, an immediate/explicit (programmatic) UNLOCK FILE is the recommended approach. Don't wait until task termination for CICS to issue an implicit UNLOCK FILE because others tasks are waiting.
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Fri Jan 11, 2013 9:22 pm    Post subject: Reply to: how to execute MASSINSERT concurrently?
Reply with quote

Hi Enrico,

I am just ever so thankful than i will never technically support that "development" or have any customer dealings with that institution . . .

d
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Fri Jan 11, 2013 9:24 pm    Post subject: Reply to: how to execute MASSINSERT concurrently?
Reply with quote

Dick,

It's funny how you frame the TS's environment as an "institution" icon_lol.gif

Freudian slip, perhaps? icon_wink.gif
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Fri Jan 11, 2013 9:43 pm    Post subject: Reply to: how to execute MASSINSERT concurrently?
Reply with quote

Hi Bill,

Just trying to get extra mileage . . . icon_cool.gif

d
Back to top
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Mon Jan 14, 2013 6:58 am    Post subject:
Reply with quote

calm down, experts, no need to blame on me, I have already agreed with your helpful view points.
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Mon Jan 14, 2013 8:11 am    Post subject:
Reply with quote

Hello,

Quote:
calm down, experts
From what i read, things have been quite calm.

Quote:
no need to blame on me
Ah, well, it appears there is . . .

After more than 4 years, you still insist on trying or asking about things that are already documented as bad choices. Then (often) you want to challange the replies given by some exceptional IT people.

Quote:
I have already agreed with your helpful view points.
How would anyone here know that icon_confused.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Mon Jan 14, 2013 1:45 pm    Post subject: Reply to: how to execute MASSINSERT concurrently?
Reply with quote

Quote:
calm down, experts, no need to blame on me, I have already agreed with your helpful view points.


given Your attitude and Your stubbornness

we are and have been very calm and patient ( even too much )

lot of blame to be put on You

You mostly disagree with what we tell You

if You have a bit of honesty inside You ( probably I expect too much ) and reread Your topics
You will see that usually there is <one/some> constructive reply to Your question
and MANY ( TOO MANY ) more to convince You that Your expectations are wrong

if You do not change Your attitude You will face lots of problems in Your life, in Your career

and pretty soon also in the forum icon_cool.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts execute APP if they are not ADDRESS T... italo_pm CLIST & REXX 3 Fri Aug 12, 2016 2:15 am
No new posts Execute multiple DB2 Load commands in... faizm DB2 4 Wed Aug 03, 2016 12:53 pm
No new posts CEXEC not able to execute if no SLINE... boyti ko CLIST & REXX 2 Wed Apr 13, 2016 4:31 pm
No new posts CALL MACRO EXECUTE FORM - Setting the... sudarshan.srivathsav PL/I & Assembler 7 Tue Feb 09, 2016 10:32 pm
No new posts How steps execute in Job in case of a... richiewalia JCL & VSAM 4 Tue Jan 12, 2016 12:34 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us