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

File Contention Ideas (Batch & Fileaid/File Manager)


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

New User


Joined: 24 Jun 2007
Posts: 57
Location: US

PostPosted: Sat Mar 22, 2014 3:29 am
Reply with quote

Hi,

Need some advise/ideas on below issue.
During batch process window, if someone is holding a file in FileAid/FMgr the jobs get abended due to contention.

Trying to find a way to scan thru the list of file contenstions (Ex: Starting ABCD.SYS.*) and USER IDs which are holding the files. This information can be used to free the files before starting the batch.

Appreciate any ideas!!

Thanks & Regards,
DJ
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3049
Location: NYC,USA

PostPosted: Sat Mar 22, 2014 4:39 am
Reply with quote

You can see more here,

www.ibmmainframes.com/about53352.html
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3049
Location: NYC,USA

PostPosted: Sat Mar 22, 2014 5:40 am
Reply with quote

Control the EDIT access to individuals RACF ID's and create a one time job to do so. and then set a negative dependency between each other.
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 917
Location: The Universe

PostPosted: Sat Mar 22, 2014 8:10 am
Reply with quote

jpdeshai wrote:
... During batch process window, if someone is holding a file in FileAid/FMgr the jobs get abended due to contention.
  • If there is a data set usage problem, one of the jobs is delayed. If it is canceled, it is being done manually by operators.
  • While I hate to advertise any CA product, the CA-MIM product will notify a TSO user holding a data set required by a batch job.
  • While a scheduler could, in theory, detect a TSO user or another batch job holding a data set required for a batch job it wants to submit, in practice this is not possible; the scheduler would have to know, in detail, the data sets required for the batch job.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Sat Mar 22, 2014 2:30 pm
Reply with quote

The billion euro question is :

why are production datasets in use by FileAid?

I wouldnt want my financial data being processed by a company like this.
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: Sun Mar 23, 2014 7:52 am
Reply with quote

Hello,

Quote:
•If there is a data set usage problem, one of the jobs is delayed. If it is canceled, it is being done manually by operators.
Or possibly by an Automation process that is triggered by the message to prevent this. However I believe the "holder" should be terminated, not the production job trying to allocate the dataset.

As Peter mentions, why are production dataset being "held" by FileAid?
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3049
Location: NYC,USA

PostPosted: Sun Mar 23, 2014 1:55 pm
Reply with quote

It need not necessary to be production datasets, so it could be for test regions and mock up files.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Sun Mar 23, 2014 2:27 pm
Reply with quote

Rohit, you could be right. About that I couldnt care less, in bad test environments everybody is bumping into each other.
In the good ones, this problem wouldnt probably exist. In production it
is forbidden. At least that is my almost 40 year experience.
Back to top
View user's profile Send private message
jpdeshai

New User


Joined: 24 Jun 2007
Posts: 57
Location: US

PostPosted: Sun Mar 23, 2014 3:18 pm
Reply with quote

It can be for production or test region...
Most of the times people forget batch window and they just keep browsing the files or they leave the session active go home which takes some time to close.
Any of these May cause batch issues.Ian just thinking of running an utility and send out an email so that they come out before batch.that's my idea.
Back to top
View user's profile Send private message
jpdeshai

New User


Joined: 24 Jun 2007
Posts: 57
Location: US

PostPosted: Sun Mar 23, 2014 3:20 pm
Reply with quote

Some kind of Rexx tool similar ISGECMON
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


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

PostPosted: Sun Mar 23, 2014 4:51 pm
Reply with quote

Remove access to production data from all but production IDs. If people need to see a production dataset they can ask for a job to be scheduled that will copy the dataset, after management sign-off, - possibly into a dasd pool that gets emptied every day.

Also, anyone leaving for the day and not terminating their session should themselves be terminated as a securty risk.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3049
Location: NYC,USA

PostPosted: Sun Mar 23, 2014 8:37 pm
Reply with quote

Peter, Right, I agree.

You may look here,

ibmmainframes.com/about54914.html

However, why does developers and testers have access to production and mock up file's? And even if it is required it must be given for a day with proper approvals. If this is not in place then none of us or any tool can help you to what you are trying to achieve here.

only production support people can have access to all the files pertaining to all the applications they are supporting.

Also, let's assume you have some tool which lets user know to free some datasets before batch starts and what if again someone locks it during batch window ? How would you control this?
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Mon Mar 24, 2014 7:18 pm
Reply with quote

PeterHolland wrote:
The billion euro question is :

why are production datasets in use by FileAid?

I wouldnt want my financial data being processed by a company like this.
Some shops allow File-AID batch programs in the production JCL. That's one possibility.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Mon Mar 24, 2014 7:23 pm
Reply with quote

Quote:
Some shops allow File-AID batch programs in the production JCL. That's one possibility.

not a problem with that,
but then there should be NO CONTENTION, unless the job scheduling was FUBAR
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Mon Mar 24, 2014 8:49 pm
Reply with quote

Our backups need exclusive access. Even if someone at the help desk is browsing a database, it messes up batch.

Another problem we've had is long running test jobs with production load libraries concatenated. That messes with the pre-promote backups.

We WERE having trouble with long running data extracts from production, but it finally got to the point where they had to forbid those. They just make a frequent copy of the databases to a read-only set and we have to use those.
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Mon Mar 24, 2014 8:52 pm
Reply with quote

Sorry...to answer the original question...I used a program out on the CBT tape called 'whohas' that runs an enqueue scan on datasets. I made wrappers for it and it comes in very handy for preventing trouble like this.

For our test batches, a batch version checks for people in the database, and ends with a condition code 8 if it finds anyone. We can then ask them to get out and rerun the job. Once it finishes ok, the rest of the batch keeps going. This has saved a LOT of batch backouts and broken schedules.

Are you looking for something like that? I still have the source code!
Back to top
View user's profile Send private message
jpdeshai

New User


Joined: 24 Jun 2007
Posts: 57
Location: US

PostPosted: Tue Mar 25, 2014 8:10 am
Reply with quote

Hi Ed Goodman,

Yes, I am looking similar to that. Could you be kind enough to share the code?

There are lot of reasons why we have access. I just need some utility which I can run before my batch starts and find out if any file is locked. (Is it 100% proof? may not be!!! but upto somelevel icon_smile.gif)
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 917
Location: The Universe

PostPosted: Tue Mar 25, 2014 9:15 am
Reply with quote

jpdeshai wrote:
... There are lot of reasons why we have access. I just need some utility which I can run before my batch starts and find out if any file is locked. (Is it 100% proof? may not be!!! but upto somelevel icon_smile.gif)
No, it is not 100% "proof." The allocation may be a fraction of a second after the scan was performed.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3049
Location: NYC,USA

PostPosted: Tue Mar 25, 2014 10:54 am
Reply with quote

You may also wants to look at

pic.dhe.ibm.com/infocenter/zos/v1r12/index.jsp?topic=%2Fcom.ibm.zos.r12.f54pc00%2Fsnitb.htm

Also, it looks like your shop does look secured the way you are described accesses given to individuals and these tools may give you ID's to let them come out of the file but there is no assurance of having great success over contention.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3049
Location: NYC,USA

PostPosted: Tue Mar 25, 2014 11:51 am
Reply with quote

I meant..
Quote:

Also, it looks like your shop does NOT look secured the way you are described accesses given to individuals and these tools may give you ID's to let them come out of the file but there is no assurance of having great success over contention.
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Tue Mar 25, 2014 6:23 pm
Reply with quote

The pedigree of this code...Ashley of FADH Software put it on the CBT,
my co-worker Vikram got it working on our system, I changed the
output format a bit to make it easier to feed utilities.

Code:

         TITLE 'WHOSGOT - Dataset allocation display facility'                 
***Start of Specifications********************************************         
*                                                                               
* MODULE NAME : WHOSGOT                                                         
*                                                                               
* FUNCTION    : Provide details of dataset allocations                         
*                                                                               
* STATUS      : OS/390 1.3.0      TSO/E 2.5.0                                   
*                                                                               
* ATTRIBUTES  : Unauthorised, AMODE 31, RMODE Any                               
*                                                                               
* ENTRY CONDITIONS: Parmlist pointing to Dataset name                           
*                                                                               
* EXIT  CONDITIONS: Return code 0 - Normal, function complete                   
*                                                                               
* MACROS      :                                                                 
*               GQSCAN   - GRS Queue scan                                       
*               STLINENO - Control screen handling                             
*               PUTLINE  - Terminal I/O routine                                 
*                                                                               
* EXTERNAL ROUTINES : None                                                     
*                                                                               
* NOTES     :  None                                                             
*                                                                               
*                                                                               
*                                               Ashley - FADH Software         
*                                                                               
* CHANGE ACTIVITY:                                                             
*                                                                               
*  1) New Module development.                               05/98 (AS)         
*  2) Use PUTLINE for terminal I/O.                      20/07/98 (AS)         
*                                                                               
****End of Specifications*********************************************         
WHOSGOT  CSECT                                                                 
WHOSGOT  AMODE 31                                                               
WHOSGOT  RMODE ANY                                                             
         B     EYECATCH(,R15)           skip over eyecatcher                   
MODID    DC    CL8'WHOSGOT '            Module identifier                       
         DC    CL8'VER 1.0'             Version number                         
         DC    CL8'20/07/98'            Date                                   
EYECATCH EQU   (*-MODID)+4                                                     
         BAKR  R14,0                    Save status etc. on Stack               
         USING WHOSGOT,R12              Base reg assignment                     
         LR    R12,R15                  Setup 1st base                         
         LA    R13,SAVE                 savearea for others                     
*                                                                               
         USING CPPL,R1                  Addressability for CPPL                 
         MVC   UPTADDR,CPPLUPT          save UPT adcon                         
         MVC   ECTADDR,CPPLECT          save ECT adcon                         
         DROP  R1                       drop it again                           
*                                                                               
         L     R2,0(,R1)                Address of Parameter list               
         LH    R3,0(,R2)                Length of parameters                   
         LH    R15,2(,R2)               get the offset                         
         LA    R2,4(R15,R2)             skip to start of parms                 
         LA    R15,4(,R15)              adjust length                           
         SR    R3,R15                   and calc parms length                   
         LTR   R3,R3                    any parms given ?                       
         BZ    NOPARMS                  if not, tell 'em                       
         LA    R9,RNAME                 point to RNAME buffer                   
         XR    R10,R10                  clear length count                     
CHKDSN   EQU   *                                                               
         CLI   0(R2),X'00'              is this a null ?                       
         BE    CHKDSNL                  if so, skip it                         
         CLI   0(R2),X'40'              is this a blank ?                       
         BE    CHKDSNL                  if so, skip it                         
         CLI   0(R2),X'7D'              is this a quote ?                       
         BE    CHKDSNL                  if so, skip it                         
         MVC   0(1,R9),0(R2)            build DSName                           
         LA    R9,1(,R9)                next byte in RNAME buffer               
         LA    R10,1(,R10)              increment DSName length                 
CHKDSNL  EQU   *                                                               
         LA    R2,1(,R2)                onto next byte                         
         BCT   R3,CHKDSN                and round we go                         
         LTR   R10,R10                  did we get a DSName ?                   
         BZ    NOPARMS                  if not, tell them                       
         OC    RNAME,=44C' '            make it uppercase                       
*                                                                               
*        MVC   TXTMSG1+31(44),RNAME     build title message                     
*        MVC   INFOLINE,TXTMSG1         place in output buffer                 
*        STLINENO LINE=1                clear the screen                       
*        BAL   R11,PUTLRTN              and display line                       
*                                                                               
         USING PSA,R0                   addressability for PSA                 
         L     R8,FLCCVT                get address of CVT                     
         DROP  R0                       drop it again                           
         USING CVT,R8                   addressability for CVT                 
*                                                                               
         USING RIB,R2                   Addressability for RIB's               
         USING RIBVAR,R3                                                       
         USING RIBE,R4                                                         
*                                                                               
         XC    QTOKEN,QTOKEN            clear scan token                       
ENQSCAN  EQU   *                                                               
         GQSCAN AREA=(SCANBUFF,4096),                                  X       
               REQLIM=MAX,                                             X       
               SCOPE=ALL,                                              X       
               RESNAME=(QNAME,RNAME,(R10)),                            X       
               REQCNT=1,                                               X       
               TOKEN=QTOKEN                                                     
         ST    R15,SCANRC               save return code                       
         CH    R15,=H'4'                no enqueues ?                           
         BE    NOTALLOC                 if so, inform user                     
         BAL   R10,CONVRIB              go and display details                 
         CLC   SCANRC,=F'0'             did the scan complete ?                 
         BE    END                      if so, out we go                       
         B     ENQSCAN                  and round we go again                   
*                                                                               
PUTLRTN  EQU   *                                                               
         STM   R8,R9,SAVER8R9           save registers                         
         LM    R8,R9,UPTADDR            load UPT and ECT adcons                 
         PUTLINE PARM=PUTBLK,UPT=(R8),ECT=(R9),ECB=ECBADS,             X       
               OUTPUT=(OUTTXT1,TERM,SINGLE,DATA),MF=(E,IOPLADS)                 
         LM    R8,R9,SAVER8R9           reload registers                       
         BR    R11                      return to caller                       
NOTALLOC EQU   *                                                               
*        MVC   INFOLINE,ERRMSG1         place in output buffer                 
*        BAL   R11,PUTLRTN              and display line                       
         B     END                      and out we go                           
NOPARMS  EQU   *                                                               
         MVC   INFOLINE,ERRMSG2         place in output buffer                 
         BAL   R11,PUTLRTN              and display line                       
         B     END                      and out we go                           
END      EQU   *                                                               
         XR    R15,R15                  clear return code                       
         PR                             restore callers status                 
*                                                                               
CONVRIB  EQU   *                                                               
         LA    R2,SCANBUFF              start of RIB data area                 
         LR    R7,R1                    get loop counter                       
SETRIBA  EQU   *                                                               
         LA    R3,RIBEND-RIB(,R2)       point to variable section               
         L     R5,RIBNRIBE              count of entries for this RIB           
         LH    R6,RIBVLEN               length of variable section             
         LA    R4,RIBEND-RIB(R6,R2)     point to RIBE                           
SETRIBB  EQU   *                                                               
         MVI   TXTMSG2+26,C' '          blank out optional text                 
         MVC   TXTMSG2+27(52),TXTMSG2+26                                       
         CLC   CVTSNAME,RIBESYSN        same system ?                           
         BE    SAMESYS                  if so, no extra text                   
         MVC   TXTMSG2+26(9),=C'on system'                                     
         MVC   TXTMSG2+36(8),RIBESYSN   save system name                       
SAMESYS  EQU   *                                                               
         MVC   TXTMSG2+10(3),=C'SHR'    default to shared                       
         TM    RIBERFLG,RIBETYPE        is it a 'shared' request ?             
         BO    REQTSET                  if so, indicator set correctly         
         MVC   TXTMSG2+10(3),=C'EXC'    set to 'Exclusive'                     
REQTSET  EQU   *                                                               
         MVC   TXTMSG2+17(8),RIBEJBNM   now move in jobname                     
         MVC   TXTMSG2+41(39),RNAME     build title message                     
         MVC   INFOLINE,TXTMSG2         place in output buffer                 
         BAL   R11,PUTLRTN              and display line                       
RIBLOOP  EQU   *                                                               
         LA    R4,RIBEEND-RIBE(,R4)     point to next RIBE                     
         BCT   R5,SETRIBB               and round we go                         
         LR    R2,R4                    now pointing at next RIB               
         BCT   R7,SETRIBA               and onto next complete RIB             
         BR    R10                      and return to caller                   
*                                                                               
*---------------------------------------------------------------------         
*                                                                               
         LTORG                                                                 
*                                                                               
SAVE     DC    18F'0'                   Savearea for others                     
         ORG   SAVE+4                                                           
         DC    C'F1SA'                  Indicate linkage stack                 
         ORG                                                                   
*                                                                               
SAVER8R9 DC    2F'0'                    save area                               
*                                                                               
SCANRC   DS    F                        Area for Scan return code               
QTOKEN   DC    F'0'                     GQSCAN token                           
*                                                                               
QNAME    DC    CL8'SYSDSN'                                                     
RNAME    DC    CL44' '                                                         
*                                                                               
UPTADDR  DC    F'0'                     User Profile Table address             
ECTADDR  DC    F'0'                     Environment Control Table addr         
ECBADS   DC    F'0'                     ECB for PUTLINE                         
IOPLADS  DC    4F'0'                    I/O parameter block                     
*                                                                               
PUTBLK   PUTLINE MF=L                   List form of PUTLINE                   
*                                                                               
OUTTXT1  DC    H'84'                    Length of line data (inc. hdr)         
         DC    H'0'                     Reserved                               
INFOLINE DC    CL80' '                  Output data area                       
*                                                                               
ERRMSG1  DC    CL80'Dataset-is not allocated'                                   
ERRMSG2  DC    CL80'Dataset-name not provided, utility terminated'             
TXTMSG1  DC    CL80'Dataset-allocation summary for'                             
TXTMSG2  DC    CL80'Allocat-d     to          on system     '                   
THANX    DC    CL80'Thankx to Ashley - recompiled by bvickram@usa.net'         
*                                                                               
SCANBUFF DS    XL4096'00'                                                       
*                                                                               
         CVT   DSECT=YES                                                       
         IHAPSA                                                                 
         IKJCPPL                                                               
         ISGRIB                                                                 
*                                                                               
R0       EQU   0                                                               
R1       EQU   1                                                               
R2       EQU   2                                                               
R3       EQU   3                                                               
R4       EQU   4                                                               
R5       EQU   5                                                               
R6       EQU   6                                                               
R7       EQU   7                                                               
R8       EQU   8                                                               
R9       EQU   9                                                               
R10      EQU   10                                                               
R11      EQU   11                                                               
R12      EQU   12                                                               
R13      EQU   13                                                               
R14      EQU   14                                                               
R15      EQU   15                                                               
         END                                                                   


Get this assembled and try it out. I ended up naming it WG2 for some reason, so I invoke it in REXXs and such as 'WG2 WTSO.WNEG.REPORT'.

The really polished JCL that I have runs a list of database datasets from an IMS utility, then runs WG2 against all of them, then filters out the IMS region from the enqueue list, then gets a 0/4 return code depending on who is in there.

Give the original code a shot and see how you do with it.

My assemble JCL still looks like this (last update 2007), so I think that's what I used to build it. I can't speak for the odd options that are shown, or if they are appropriate for your system.
Code:

//STEP01    EXEC ASMHCL,                                         
//***      PARM.L='MAP,LET,LIST,NCAL,RENT,AMODE(24),RMODE(24)',   
//         PARM.L='MAP,LET,LIST,RENT,AMODE(24),RMODE(24)'         
//C.SYSIN     DD   DSN=WTSO.WNEG.SOURCE(WHOSGOT),DISP=SHR         
//C.SYSLIB    DD   DSN=SYS1.MACLIB,DISP=SHR                       
//            DD   DSN=ISP.SISPLPA,DISP=SHR                       
//            DD   DSN=ISP.SISPLOAD,DISP=SHR                     
//L.SYSLMOD   DD   DSN=WTSO.WNEG.LOAD(WHOSGOT),DISP=SHR           
//L.SYSPRINT DD SYSOUT=*                                         
//L.SYSLIB    DD   DSN=ISP.SISPLPA,DISP=SHR                       
//            DD   DSN=ISP.SISPLOAD,DISP=SHR                     
//L.SYSIN     DD   DUMMY                                         
Back to top
View user's profile Send private message
jpdeshai

New User


Joined: 24 Jun 2007
Posts: 57
Location: US

PostPosted: Tue Mar 25, 2014 9:47 pm
Reply with quote

Thanks a lot Ed. will give it a try. Guess I need some time to understand the code. (Assembler icon_smile.gif)
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Wed Mar 26, 2014 10:34 am
Reply with quote

A Netview solution could be :

set a CHRON timer to execute a Netview Rexx at certain intervals.

The Netview Rexx :

issues a D GRS command
traps the output from this command
parses the trapped output
kills all the culprits found
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Wed Mar 26, 2014 6:15 pm
Reply with quote

You might also consider using the ISPF service QUERYENQ.
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Wed Mar 26, 2014 7:41 pm
Reply with quote

Don,
Does that QUERYENQ reach across "lpars?"

I think we tried that and it would show if the job/person holding the file was on the same "box," but not if they were on a different box.
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 -> SYNCSORT Goto page 1, 2  Next

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Search two or more word with FILEAID Compuware & Other Tools 15
No new posts Access to non cataloged VSAM file JCL & VSAM 18
Search our Forums:

Back to Top