View previous topic :: View next topic
|
Author |
Message |
dejunzhu
Active User
Joined: 08 May 2008 Posts: 390 Location: China
|
|
|
|
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 |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Are these KSDS or ESDS records? |
|
Back to top |
|
|
dejunzhu
Active User
Joined: 08 May 2008 Posts: 390 Location: China
|
|
|
|
it's a ESDS file. |
|
Back to top |
|
|
Binop B
Active User
Joined: 18 Jun 2009 Posts: 407 Location: Nashville, TN
|
|
|
|
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 |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Jose Mateo
Active User
Joined: 29 Oct 2010 Posts: 121 Location: Puerto Rico
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hi Jose,
Quote: |
Does it make sense? |
Yup, at least to everyone except TS . . .
d |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
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 |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Dick,
It's funny how you frame the TS's environment as an "institution"
Freudian slip, perhaps? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hi Bill,
Just trying to get extra mileage . . .
d |
|
Back to top |
|
|
dejunzhu
Active User
Joined: 08 May 2008 Posts: 390 Location: China
|
|
|
|
calm down, experts, no need to blame on me, I have already agreed with your helpful view points. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
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 |
|
Back to top |
|
|
|