View previous topic :: View next topic
|
Author |
Message |
abhijit.nayak01
Active User
Joined: 22 Mar 2009 Posts: 161 Location: South Africa
|
|
|
|
Hi,
I have a VSAM online file whose record gets cleared each moment but sometime it is not cleared. So, now I have kept the threshold limit of the record count as 100. If it reaches 100 then I will get an email that the file has more than 100 records. So basically what I am doing is mentioned as below:
My Main file is ABHIJIT.VSAM.MAIN file which has
Code: |
DEFINE CLUSTER-
(NAME(ABHIJIT.VSAM.MAIN)-
FREESPACE(25,25)-
OWNER(ATM)-
UNIQUE-
RECORDSIZE(1000,2500)-
SHR(2,3)-
KEYS(25,0))-
DATA-
(NAME(ABHIJIT.VSAM.MAIN.DATA)-
CYL(1000,1000))-
INDEX-
(NAME(ABHIJIT.VSAM.MAIN.INDEX)-
CYL(20,10)) |
Steps:
1) Copy the ABHIJIT.VSAM.MAIN file to the temporary file ABHIJIT.VSAM.TEMP with the same above mentioned definition using the below card
Code: |
REPRO INFILE(INPUT1) OUTFILE(OUTPUT1) SKIP(1) COUNT(100) |
2) Wait for 1 minute
Code: |
//HALT0002 EXEC PGM=HALT,PARM='1M' |
3) Again perform the step 1
4) If the RC of step 3 is 12 then send the email mentioning "Threshold limit reached".
But now there is a change in a requirement Not only the threshold email is needed but also the total number of records in the main VSAM file is needed.
Now I am wondering how I can get the number of records present in the main VSAM file without closing the file.
Kindly suggest. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
If you do not close the file to the online system, you CANNOT get an accurate count of the records in the VSAM file. CICS may cache data, for hours potentially, and complete updates when the file is closed or the online system comes down. |
|
Back to top |
|
|
abhijit.nayak01
Active User
Joined: 22 Mar 2009 Posts: 161 Location: South Africa
|
|
|
|
Hi Robert,
Thanks for your update. But I need the count when the file is not getting cleared.Is it possible to get the count by using REPRO. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Please explain the operation more clearly. What is the purpose of the file? How does it get "cleared"? Why does it sometimes not get cleared? When running your batch jobs is it open/closed to CICS? All of the time? Some of the time? Etc. |
|
Back to top |
|
|
abhijit.nayak01
Active User
Joined: 22 Mar 2009 Posts: 161 Location: South Africa
|
|
|
|
Hi Bill,
The file is always open in the CICS and sometime due to socket down the file records are not cleared and in that case the CICS team bounces the region. So, to automate the process the batch job runs in every one hour and based on the alert email the CICS team will bounce the socket. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Well, as Robert has said, you're not going to get a reliable count of records from a simple batch job if the file is still open to CICS.
Is there no way that the "socket" can be monitored for availability? The must be some message or other symptom that the socket is "down".
What do you mean "bounce" the region and "bounce" the socket? |
|
Back to top |
|
|
abhijit.nayak01
Active User
Joined: 22 Mar 2009 Posts: 161 Location: South Africa
|
|
|
|
Hi Bill,
The file is always open in the CICS and sometime due to socket down the file records are not cleared and in that case the CICS team bounces the region. So, to automate the process the batch job runs in every one hour and based on the alert email the CICS team will bounce the socket. |
|
Back to top |
|
|
Pete Wilson
Active Member
Joined: 31 Dec 2009 Posts: 590 Location: London
|
|
|
|
This seems like a bizarre process. What is it supposed to achieve? Is the purpose to create an almost up to date copy of the source MAIN file in your TEMP version for some batch process to use? How are the records in the MAIN file 'cleared'?
Suggest you read 'VSAM Demystified' manual to understand what you and cannot do with online CICS files. |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
CICS socket errors are accompanied by CICS messages. So the way to automate error handling is trapping the relevant messages and act accordingly. This can be done in NETVIEW, Tivoli CICS monitoring or SA/390. Ask your CICS support if thats possible. Im not sure they will understand cause you are using a procedure they are content with and maybe supplied by them. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
Is it possible to get the count by using REPRO. |
Yes, you can get the count using REPRO. However, as long as the file is open in CICS, the count you get using REPRO (OR ANY OTHER BATCH TOOL) will not be an accurate count, period. There is nothing you can do to change this, except close the file in CICS then get your count then open the file to CICS. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
in IT using the proper terminology is essential for good communication ...
Your usage of the term socket is pretty puzzling ...
<socket> has a very exact meaning...
wiser to explain what You mean an probably use a different term
also it is very odd to use an email to signal an <abnormal> situation |
|
Back to top |
|
|
abhijit.nayak01
Active User
Joined: 22 Mar 2009 Posts: 161 Location: South Africa
|
|
|
|
Hi,
Apology for the late response. The transaction gets the messages from frontend and then the CICS program processes the messages and sents the response/notification back to the frontend and the other system. Those response are stored in the file and they get cleared once they are sent. So, sometime the sockets from the frontend or CICS region are down but dont know who is down as blame game between the fronend and CICS is going on and the messages don't get cleared. Meanwhile the CICS team is also looking into this issue. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
So, sometime the sockets from the frontend or CICS region are down but dont know who is down as blame game between the fronend and CICS is going on |
You make no sense at all. From the z/OS V1R7.0 Comm Svr: IP Sockets Application Programming Interface Guide and Reference manual:
Quote: |
1.1.2 Understanding sockets concepts A socket uniquely identifies the endpoint of a communication link between two application ports. | A port represents an application process on a TCP/IP host, but the port | number itself does not indicate the protocol being used: TCP, UDP, or IP. | The application process might use the same port number for TCP or UDP | protocols. To uniquely identify the destination of an IP packet arriving | over the network, you have to extend the port principle with information | about the protocol used and the IP address of the network interface; this | information is called a socket. A socket has three parts: protocol, | local-address, local-port. Figure 2 illustrates the concept of a socket.
PICTURE 2
Figure 2. Socket concept
The term association is used to specify completely the two processes that comprise a connection: (protocol,local-address,local-port,foreign-address,foreign-port). The terms socket and port are sometimes used as synonyms, but note that the terms port number and socket address are not like one another. A port number is one of the three parts of a socket address, and can be represented by a single number (for example, 1028) while a socket address can be represented by (tcp,myhostname,1028). | A socket descriptor (sometimes referred to as a socket number) is a binary | integer that acts as an index to a table of sockets; the sockets are | currently allocated to a given process. A socket descriptor represents the | socket, but is not the socket itself. |
A "socket" is very specifically defined in z/OS, and the way you are using the term does NOT correspond to that definition. I suspect you mean the PORT between the front end and CICS is not connected;since sockets are designed to be dynamic (used only while needed), if your system design depends upon the connection being permanently available then part of the issue may well be that your design goes contrary to the way the system is suppsoed to work.
Furthermore, if a connection is made to a CICS port, a mesage is generated in the log. If the connection later dies (for whatever reason) there is also a message generated in the log. If there is controvery over the connection closing then it is because someone is not reviewing the logs. |
|
Back to top |
|
|
Binop B
Active User
Joined: 18 Jun 2009 Posts: 407 Location: Nashville, TN
|
|
|
|
To the experts...
I am checking the manuals now but I am not able to find anything... So I am not entirely confident... but if I remember correctly, wasn't there a file attribute which says the file update in CICS need not be cached and the CICS file can be immediately updated...
If there is an attribute as such, wouldn't that help the TS in this case ?
abhijit,
You could do a quick CICS file CLOSE and OPEN in the Batch before the REPRO step. I dont think this is an ideal solution but it would work in your case I guess... |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
It will be much better to find a way to monitor the existence of the problem "socket", whatever that be.
Closing the file to CICS will probably cause the "upstream" transaction to fail even when the socket is operating tickety-boo.
If a record is "added" then "deleted" (so that there is only intended to be one record on the file, as I understand it) then forcing a physical write (and perhaps read, I don't know) may impact performance. |
|
Back to top |
|
|
Gary McDowell
Active User
Joined: 15 Oct 2012 Posts: 139 Location: USA
|
|
|
|
enrico-sorichetti wrote: |
also it is very odd to use an email to signal an <abnormal> situation |
Why?
Our team does this process for all major daily testing cycle jobs that have successors. We sure as heck do NOT want all emails when a job runs to successful completion! My inbox would be full every day. If a major job fails (not successful completion) our team gets an Outlook email and optional iPhone message. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
most probably I used the wrong term I should have used emergency rather than abnormal
because an email does not guarantee the appropriate response/reaction time |
|
Back to top |
|
|
abhijit.nayak01
Active User
Joined: 22 Mar 2009 Posts: 161 Location: South Africa
|
|
|
|
Hi,
It seems we went more into socket issue. But I can't close and open the file in every three hours as my job runs in every 2 hours. But the funny thing I am doing after the day cut off I am closing the file and taking the backup of the file, disabling the CICS transaction ABC* involved with the program, purging the tasks related (CEMT I TASK TRA(ABC*) and then deleting and defining the file, opening and enabling the file, starting the CICS transaction. As after the cut off the batch system runs and updates the whole system. So, if the file records are not cleared before cutoff then there are chances of duplicate update.
I have the batch job ready for the above process but dont know how purge CICS task in batch. So, performing the above process manually.
Anyway i have made them agreed that giving the count of records is not wise so now they are agreed that they dont need the count. |
|
Back to top |
|
|
abhijit.nayak01
Active User
Joined: 22 Mar 2009 Posts: 161 Location: South Africa
|
|
|
|
Using email because we dont want to abend the job when the RC is 12 for the last copy step. As everybody is working on this issue and once the system gets stable we will abend the job when RC is 12 as a permanent fix instead of sending email. |
|
Back to top |
|
|
abhijit.nayak01
Active User
Joined: 22 Mar 2009 Posts: 161 Location: South Africa
|
|
|
|
there is a typo error with the hours. My job runs in every three hours. |
|
Back to top |
|
|
abhijit.nayak01
Active User
Joined: 22 Mar 2009 Posts: 161 Location: South Africa
|
|
|
|
Hi,
Is it possible to purge CICS task in batch. |
|
Back to top |
|
|
Binop B
Active User
Joined: 18 Jun 2009 Posts: 407 Location: Nashville, TN
|
|
|
|
abhijit.nayak01 wrote: |
Hi,
Is it possible to purge CICS task in batch. |
If you are looking for a detailed answer for this I would suggest you to start a new topic... Anyway... There are lot of tools which can be used to communicate to CICS in batch ... EXCI is one that I know of .. MTPBATCH is a utility from MacKinney... and there are many other third party tools .. there are lot of discussions already available about that in this forum... You can check with your site people and they should be able to provide you the best way of communicating to CICS in batch... |
|
Back to top |
|
|
Binop B
Active User
Joined: 18 Jun 2009 Posts: 407 Location: Nashville, TN
|
|
|
|
abhijit.nayak01 wrote: |
disabling the CICS transaction ABC* involved with the program, purging the tasks related (CEMT I TASK TRA(ABC*) |
... Hmm... So you just go and purge a active task while its running in production... I would have to say that it is not a good process... |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Quote: |
Is it possible to purge CICS task in batch. |
I think you need to go back to square one and redesign this entire process.... |
|
Back to top |
|
|
abhijit.nayak01
Active User
Joined: 22 Mar 2009 Posts: 161 Location: South Africa
|
|
|
|
Good Morning,
Thanks for your suggestions. I know purging the task in prod is not a good practice but this is only for some days.
I will look into the EXCI for purging the tasks in batch.
Thanks for your valuable inputs. |
|
Back to top |
|
|
|