Trusted Contributor.
Trusted Contributor.
154 views

region recycle

Hi,

 

How often the regions should be recycled? Is it a weekly/monthly etc.  Is there a script like JCL, Powershell to automate the same.

0 Likes
6 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: region recycle

There is no recycling interval that's appropriate for all workloads. In many cases, there's no need to recycle a region at any regular interval; it can remain up indefinitely, either with no routine maintenance or with only SEPs occasionally being recycled, for example by running a transaction program that marks the SEP "dirty".

JCL regions will probably need periodic catalog maintenance and spool housekeeping to remove old data. See the product documentation; search for "MFCATMNT" for catalog maintenance, and search for "housekeeping" for spool housekeeping.

If you do wish to automate region recycling, you can easily automate that using scripting. You cannot use JCL to recycle a region (at least not the region running the JCL job), since JCL processing is part of the region; but you can use any non-ES scripting language to run the casstop and casstart commands. These are also described in the product documentation.
0 Likes
Highlighted
Trusted Contributor.
Trusted Contributor.

Re: region recycle

Hi Mike,

For stop/start region, Whats the difference between using /r and /l switches in the castop command. Which is the best pratice?

casstop /rregionname /uuserid /ppassword

casstop /lregionname /uuserid /ppassword

 

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: region recycle

The /r (or -r) option to casstop and similar CAS command-line options tells casstop to connect directly to CAS shared memory. It avoids network communication but requires that:

  • The user executing casstop must have permission to open and write to CAS shared memory.
  • The region is running on the same system where the casstop command is executed.
  • On Windows, I believe the casstop command must be executed from the same session as the region is running in. (It's possible CAS uses a global object for its shared memory and this is not required.)

The /l and /s (or -l / -s) options tell casstop to make the shutdown request over the network. That means permission to access shared memory is not required, and the region may be running remotely.

With /s, you give casstop the protocol, hostname, and port of the listener to send the shutdown request to. This is the same listener as is used for ESMAC, typically the "Web Services and J2EE" listener for the region.

With /l, you tell casstop to search the MFDS directory for the region, and send the stop request to the listener associated with that region's "MF ES" service. The /l option is equivalent to /s except that you do not need to know the listener's hostname and port.

Best practice depends on your environment and needs. For interactive users on the same system as the region, /r will often work, and if it doesn't, the user can try again with /l. Scripted solutions may prefer to use /l so they are less sensitive to changes in where regions are located or how they are started.

The casstop documentation is available at:
https://www.microfocus.com/documentation/enterprise-developer/ed50/ED-VS2017/HRADRHCOMM02.html

 

0 Likes
Highlighted
Trusted Contributor.
Trusted Contributor.

Re: region recycle

Hi Mike,

In case the region is in not responding state then whether we need to provide casstop & then casstart or directly casstart command will work.

Because in one of our test environment online region goes to not responding state. then i provide casstart command:

casstart /r

CASCD0167I ES Daemon successfully auto-started 22:55:58
CASCD0050I ES "TST3-ONL" initiation is starting 22:55:58

 

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: region recycle

If the region is running, you must stop it before starting it again, or startup will fail. In that case casstart might initially appear to work but eventually the region will report that it is already running, and it will not be restarted.

It's always safe to attempt casstop if you need to restart the region, so there's no reason to omit it. If you have reason to believe the region is in an error state, you can do a forced stop with "casstop -f" and then restart it once all region processes have exited.

The "non-responding" state is not a reliable indicator of region health. It only means that MFDS was unable to get a response from MFCS (the communications server component) before the configured timeout. Often this is because the timeout is too short; the default of 5 seconds is much too short for many reasonable configurations. The timeout can be caused by heavy load or network congestion. If you intend to leave the MFDS monitor feature enabled in production, I strongly recommend increasing the timeout to something more reasonable, perhaps 30 seconds.

Also, because the MFDS monitor feature only probes the communications server, it tells you nothing about the health of CAS (the application server component), and in particular about available SEPs, the state of CICS processing, running jobs, initiators, etc. Better mechanisms for polling region health include monitoring HSF statistics, using utilities such as casfile and casout, invoking a deployed COBOL web service or CICS Web Interface server, running a simple job, and so on - anything that tests both communications and application server.

0 Likes
Highlighted
Trusted Contributor.
Trusted Contributor.

Re: region recycle

Hi,

Is there a way to find out what happened exactly to the batch region since there was slowness observed 2 or 3 weeks earlier for 30 minutes. And the region performance came back to normal after killing 2 of the DB jobs.

As nothing abnormal found in the console logs.

In case the issue re-occurs what immediate troubleshooting can be done, like runing the mfes diagnostics so that i can raise an incident case.

 

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.