<--- this section is related to other documentation as indicated --->

       ... volume 1 - Contents, Installation, Versions, Training ...

uvintro.doc contents.doc uvprices.doc install.doc versions.doc uvtrain.doc UNIXtips.doc COBtips.doc scripts.doc

                    ... Pre-Programmed Jobs (part 1) ...
    SCANjobs.doc  REPjobs.doc   INSERTjobs.doc TEXTjobs.doc
    LASERjobs.doc LABELjobs.doc NAMEjobs.doc
                    ... volume 2 - Program References ...
    uvlist.doc    uvhd.doc      uvhdcob.doc   uvcp.doc      uvsort.doc
    uvcopy1.doc   uvcopy2.doc   uvcopy3.doc   uvcopy4.doc   uvcopy5.doc
    uvqrpg.doc
                    ... Pre-Programmed Jobs (part 2) ...
    REPORTjobs.doc LISTjobs.doc  COPYjobs1.doc COPYjobs2.doc
    FIXjobs.doc    DROPjobs.doc  UVjobs1.doc   UVjobs2.doc
                ... volume 3 Pre-Programmed Jobs (part 3) ...
    afterY2K.doc   MFcnvrt.doc   SQLcnvrt.doc   SQLjobs.doc
    REFORMjobs.doc CMPjobs.doc   COBaids1.doc   COBaids2.doc   COBscan.doc
    ADMjobs.doc    AIDjobs.doc   VTOCjobs.doc   XREFjobs.doc   REORGjobs.doc
    TAPEjobs.doc   TIPjobs.doc
                ... volume 4 - Mainframe Conversion ...
    LIBStrsfr.doc  DATAtrsfr.doc  DATAcnvt1.doc  DATAcnvt2.doc  DATAcnvt3.doc
    COBcheck.doc   COBcnvrt.doc   COBextra.doc
    JCLcheck.doc   jprocx.doc     JCLcnvrt.doc   uvupsi.doc
                ... volume 5 - archived jobs (Y2K) ...
    DATEjob1.doc   DATEjob2.doc   DATEjob3.doc   AGEjobs.doc   VALjobs.doc
            ... volume 6 - unprinted (infrequently required) ...
    install.dos    - Installation guide for MS-DOS systems
    READme.doc     - how to find things without the hardcopy documentation
    survey.doc     - questionaire for mainframe users converting to UNIX
 ** uvlocks.doc    - Vancouver Utility File Locking options & Test Results **
    GENjobs.doc    - GENERATE TEST DATA files from operator templates
    WORDjobs.doc   - Wordstar, Wordperfect document conversions, etc
    DBASEjobs.doc  - DATABASE (DBASE,ALPHA4,FOXPRO) conversion, layouts, etc
    TESTjobs.doc   - PERFORMANCE TEST jobs: sorting, ISAM loading, scanning
    ISAMjobs.doc   - testing uvcopy ISAM file loading, accessing, updating
    FILEjobs.doc   - Production file maintenance using Vancouver Utilities
    SELECTjobs.doc - SELECT/DELETE records in fixed record length files
    COBmass.doc    - scanning for problems (SYSSWCH, DICE, control chars)
    COBspcl.doc    - special conversions (multi-punched DICE codes, etc)
    uvcsrun.doc    - run processor for control streams with IF/GO/NOP
    JCLfix.doc     - scan/replace jobs to fix problems (after conversion)
    ESCORT.doc     - converting ESCORT programs to uvcopy
    RPGjobs.doc    - mainframe RPG conversion aids

Goto:   Begin this document End this document UVSI Home-Page

uvlocks - Vancouver Utility File Locking Options & Test Results - CONTENTS

A1. BACKGROUND
 B1. File Locking Typ Options for Vancouver Utilties (review)
    - also documented in uvcopy.doc, uvcp.doc,& uvsort.doc
C1. Test Results - UV Seqntl vs UV Seqntl (IN:IN, IN:OUT, OUT:IN, OUT:OUT)
D1. Test Results - UV ISAM seq vs UV ISAM seq (IN:IN, IN:OUT, OUT:IN, OUT:OUT)
E1. Test Results - UV ISAM I-O I-O Updates (IN:IO, IO:IN, IO:IO)
F1. Test Results - COBOL SEQ vs UV SEQ (IN:IN, IN:OUT, OUT:IN, OUT:OUT)
G1. Test Results - COBOL ISAM seq vs UV ISAM seq (IN:IN,IN:OUT,OUT:IN,OUT:OUT)
H1. Test Results - COBOL ISAM I-O vs UV ISAM seq (I-O:IN, I-O:OUT)
I1. Test Results - TIP/ix ISAM (IN/IO/OUT) vs UV ISAM (IN/OUT)
J1. Test Results - TIP/ix ISAM (IN/IO/OUT) vs COBOL ISAM (IN/IO/OUT)
K1. Test Results - TIP/ix RELATIVE (IN/IO) vs COBOL RELATIVE (IN/IO)
L1. Test Results - TIP/ix SEQ (IN/IO/OUT) vs COBOL SEQ (OUT)
M1. Preparations for running File Lock Tests
 N1. Executing File Lock Tests
    - using TWO SCREENS
    - using the BACKGROUND
 O1. Suggested scripts for batch jobs to wait on file locks
    waitlkSS - script to wait for lock release on Sequential files
    waitlkIS - script to wait for lock release on Indexed files
    waitSS0  - uvcopy job called by waitlkSS (opens/closes Seqntl file)
    waitIS0  - uvcopy job called by waitlkIS (opens/closes ISAM file)
 P0. Listings of uvcopy jobs & COBOL programs used in File Lock Tests
    waitSS1    - uvcopy job to copy Seqntl file & pause before close
    waitSS2    - uvcopy job to copy Seqntl file, that may be locked by waitSS1
                 or may use equivalent 'uvcp' or 'uvsort'
    waitIS1    - uvcopy job to copy ISAM file & pause before close
    waitIS2    - uvcopy job to copy ISAM file, that may be locked by waitIS1
                 or may use equivalent 'uvcp' or 'uvsort'
    waitIR1    - uvcopy job for ISAM I-O update & pause before close
    waitIR2    - uvcopy job for ISAM I-O update, to file locked by waitIR1
                 no equivalent 'uvcp' for ISAM I-O updates
    coblokSE   - COBOL program to copy a Sequential file & pause before close
                 allowing waitSS1 (or uvcp) to be run to test file locks
    coblokIE   - COBOL program to copy an Indexed file & pause before close
                 allowing waitIS1 (or uvcp) to be run to test file locks

Goto:   Begin this document End this document UVSI Home-Page

A1. Vancouver Utility File Locking Options & Test Results

This section includes several advanced applications that may be useful at your site, but will probably require customization. Parameter files & test/demo data are included, so you can execute these jobs, to get a good understanding of how they work.

BACKGROUND

  1. File Locking options are provided for: uvcopy, uvcp,& uvsort.

  2. File Lock options are specified on the file 'typ' parameter, for example:


    uvcp fili1=dat1/file1,typ=ISFl1,rcs=40,filo1=dat2/file2,typ=ISFl0,rcs=40
    ========================================================================
                                 ^^                                ^^
    - 'l1' of 'typ=ISFl1' specifies READONLY for the ISAM input file.
    - 'l0' of 'typ=ISFl0' specifies Exclusive for the ISAM output file.
  1. File locking has always been provided for ISAM files via D-ISAM, which is linked into uvcopy, uvcp,& uvsort. D-ISAM is software from Byte Designs & is also used by TIP/ix D-ISAM is compatible with C-ISAM & Micro Focus COBOL

  2. As of January 1999, File Locking is now provided for Non-Indexed files (in the Vancouver Utilities - uvcopy, uvcp,& uvsort).

  3. UV lock options for UNIX SEQUENTIAL (non-indexed) files are: l0=RDWRlock(exclusive), l1=RDonly, l8=NOlock

  4. UV lock options for D-ISAM Indexed files are: l0=Exclusive(RD/WRlock), l1=RDonly, l2=Automatic, l4=Manual - DISAM does not allow NOlock (l8 does not apply to ISAM files) - DISAM provides l2/l4 auto/manual record locks (these do not apply to UV sequential non-indexed files)

  5. The effect of locking options depends on how the file is opened. File open Modes are: INPUT, OUTPUT, or I-O

  6. There are a lot of combinations of open mode & file lock options for the 2 files involved: file1 - open mode (IN,OUT,I-O) + lock-option (RDRWlock,RDlock,NOlock) file2 - open mode (IN,OUT,I-O) + lock-option (RDRWlock,RDlock,NOlock)

Goto:   Begin this document End this document UVSI Home-Page

B1. Vancouver Utility Lock Options - Review of FILE TYP LOCK OPTIONS

File Typ LOCK options

h1
  • wait on locked file, retries every 10 seconds until lock released
    (when other process closes the file)
  • retry time is gradually increased to every 5 minutes after 30 mins
  • displays waiting message showing total wait time
  note1 - you would use option 'h1' with EXCLUSIVE lock ('l0' or not coded)
        - typ=ISFh1l1 would not make sense, since it will never get a lock
l_
  • file locking options for DISAM Indexed files
    & for UNIX Sequential files as of January 1999
l0
  • EXCLUSIVE (default) RDlock+WRlock
  • other jobs cannot access, unless they specify READONLY for ISAM
    or NO-locking for non-indexed sequential files.
  • always use for output files (building new ISAM files).
l1
  • READONLY
  • inhibits all locking
  • works regardless of other jobs lock modes
  • intended for read only, attempted updates by the READONLY job
    will be rejected (error code 9 BAD FILE# ?)
l2
  • AUTOLOCK (applies only to ISAM files)
  • only 1 record locked at 1 time in this file
  • records are locked by the 'red' instruction
    & unlocked by whatever instruction follows
    (might be 'upd' to update the record)
l4
  • MANULOCK (applies only to ISAM files)
  • assumes the programmer will handle locking manually
    using the 'lck' uvcopy instruction ('islock' DISAM function)
  • Use this option if you want to open 2 paths for the same file
    (fili1 & filr1 for the same filename with typ=ISFl4)
   note - l2 & l4 ISAM 'RECORD locking' are seldom used
        - it is eaier to use the 'FILE locking' options
          (l0 & l1 for ISAM files; l0, l1,& l8 for Sequential files)
l8
  • NO locking, used only for Sequential files (not Indexed files)
  • For non-indexed files, only lock options l0, l1, l8 apply.

Goto:   Begin this document End this document UVSI Home-Page

C1. uvlocks.doc - Vancouver Utility File Locking Options & Test Results

test# C1 - UV SEQ INPUT vs UV SEQ INPUT


 Screen1: uvcopy waitSS1,fili1=dat1/fileS1,typ=RSFl0h0,filo1=dat2/fileS1
          =====================***********==============================
          uvcopy waitSS1  <-- can omit ,fili1=... defaults as shown above

 Screen2: uvcopy waitSS2,fili1=dat1/fileS1,typ=RSFl0h1,filo1=dat2/fileS1
          =====================***********==============================
          uvcopy waitSS2  <-- can omit ,fili1=... defaults as shown above
                            - option 'h1' waits/retries every 10 seconds

 Screen2a: uvcp fili1=dat1/fileS1,typ=RSFl0h1,rcs=40,filo1=dat2/fileS2
           ===========***********=====================================
           - Alternate 'uvcp' (or 'uvsort') vs 'uvcopy'
           - option 'h1' waits/retries every 10 seconds

 Screen2b: uvcp fili1=dat1/fileS1,typ=RSFl0h0,rcs=40,filo1=dat2/fileS2
           ===========***********=====================================
           - option 'h0' no wait, immediately rejected

UV lock options: l0=RD/WRlock, l1=RDlock, l8=NOlock, h0=NOwait, h1=wait

              |<-------------------- UV SEQ INPUT ------------------------>
     job1     |                    job2 lock options                      |
 lock options |   l0h0  |   l0h1  |   l1h0  |   l1h1  |   l8h0  |   l8h1  |
 ==========================================================================
       |      |         |         |         |         |         |         |
       | l0   |lock fail|  waits  |lock fail|  waits  |   runs  |   runs  |
       |      |         |         |         |         |         |         |
       |-------------------------------------------------------------------
  UV   |      |         |         |         |         |         |         |
 SEQ   | l1   |lock fail|   waits |   runs  |   runs  |   runs  |   runs  |
 INPUT |      |         |         |         |         |         |         |
       |-------------------------------------------------------------------
       |      |         |         |         |         |         |         |
       | l8   |   runs  |    runs |   runs  |   runs  |   runs  |   runs  |
       |      |         |         |         |         |         |         |

notes

  1. Note that since we are testing INPUT file SEQuential locking that: - input files are the same (dat1/fileS1), output files are different

  2. 'SYSTEM ERR setlock' is the error message, when the input file for job2 is already locked by job1 open for input. This message is decoded from the system error# & might vary on different UNIX systems.

  3. 'waits' means job2 (uvcp on screen2) waits on job1 (uvcopy on screen1) - until you reply on screen1, causing job1 to close files - job2 will then 'run' (after completing the current 10 second wait)

Goto:   Begin this document End this document UVSI Home-Page

C2. uvlocks.doc - Vancouver Utility File Locking Options & Test Results

test# C2 - UV SEQ INPUT vs UV SEQ OUTPUT


 Screen1: uvcopy waitSS1,fili1=dat1/fileS1,typ=RSFl0h0,filo1=dat2/fileS1
          =====================***********==============================
          uvcopy waitSS1  <-- may omit file defs, default as shown above

 Screen2a: uvcp fili1=dat1/fileS2,typ=RSFl0h0,rcs=40,filo1=dat1/fileS1
           ================================================***********
           - option 'h0' no wait, immediately rejected

 Screen2b: uvcp fili1=dat1/fileS2,typ=RSFl0h1,rcs=40,filo1=dat1/fileS1
           ================================================***********
           - option 'h1' waits/retries every 10 seconds

UV lock options: l0=RD/WRlock, l1=RDlock, l8=NOlock, h0=NOwait, h1=wait

              |<-------------------  UV SEQ OUTPUT ----------------------->
     job1     |                    job2 lock options                      |
 lock options |   l0h0  |   l0h1  |   l1h0  |   l1h1  |   l8h0  |   l8h1  |
 ==========================================================================
       |      |         |         |         |         |         |         |
       | l0   |file lock|  waits  |file lock|  waits  |   runs  |   runs  |
       |      |         |         |         |         |         |         |
       |-------------------------------------------------------------------
 UV    |      |         |         |         |         |         |         |
 SEQ   | l1   |file lock|   waits |file lock|  waits  |   runs  |   runs  |
 INPUT |      |         |         |         |         |         |         |
       |-------------------------------------------------------------------
       |      |         |         |         |         |         |         |
       | l8   |   runs  |    runs |   runs  |   runs  |   runs  |   runs  |
       |      |         |         |         |         |         |         |

notes

  1. Since we are testing INPUT vs OUTPUT file locking: - the input file on job1 is the same as the output file on job2 (& the other files do not match to avoid unwanted complications)

  2. The results are as expected, if any locks are specified on input & output, we can not output to a file that is being input.

Goto:   Begin this document End this document UVSI Home-Page

C3. uvlocks.doc - Vancouver Utility File Locking Options & Test Results

test# C3 - UV SEQ OUTPUT vs UV SEQ INPUT


 Screen1: uvcopy waitSS1,fili1=dat1/fileS1,typ=RSFl0h0,filo1=dat2/fileS1
          ===================================================***********

 Screen2: uvcp fili1=dat2/fileS1,typ=RSFl0h0,rcs=40,filo1=dat2/fileS2
          ===========***********=====================================

UV lock options: l0=RD/WRlock, l1=RDlock, l8=NOlock, h0=NOwait, h1=wait

              |<-------------------- UV SEQ INPUT ------------------------>
     job1     |                    job2 lock options                      |
 lock options |   l0h0  |   l0h1  |   l1h0  |   l1h1  |   l8h0  |   l8h1  |
 ==========================================================================
       |      |         |         |         |         |         |         |
       | l0   |lock fail|  waits  |lock fail|  waits  |   runs  |   runs  |
       |      |         |         |         |         |         |         |
       |-------------------------------------------------------------------
 UV    |      |         |         |         |         |         |         |
 SEQ   | l1   |lock fail|   waits |lock fail|  waits  |   runs  |   runs  |
 OUTPUT|      |         |         |         |         |         |         |
       |-------------------------------------------------------------------
       |      |         |         |         |         |         |         |
       | l8   |   runs  |    runs |   runs  |   runs  |   runs  |   runs  |
       |      |         |         |         |         |         |         |

notes

  1. Since we are testing OUTPUT seqntl vs INPUT seqntl: - the output file of job1 matches the input file of job2 (& other files dont match to avoid unwanted complications)

  2. The results are as expected, if any input locks are specified, we can not read a file while it is being written to with any output locks.

Goto:   Begin this document End this document UVSI Home-Page

C4. uvlocks.doc - Vancouver Utility File Locking Options & Test Results

test# C4 - UV SEQ OUTPUT vs UV SEQ OUTPUT


 Screen1: uvcopy waitSS1,fili1=dat1/fileS2,filo1=dat2/fileS1,typ=RSFl0h0
          =======================================***********============

 Screen2: uvcp fili1=dat1/fileS2,typ=RSF,rcs=40,filo1=dat2/fileS1,typ=RSFl0h0
          ============================================***********============

UV lock options: l0=RD/WRlock, l1=RDlock, l8=NOlock, h0=NOwait, h1=wait

              |<-------------------- UV SEQ OUTPUT ----------------------->
     job1     |                    job2 lock options                      |
 lock options |   l0h0  |   l0h1  |   l1h0  |   l1h1  |   l8h0  |   l8h1  |
 ==========================================================================
       |      |         |         |         |         |         |         |
       | l0   |file lock|  waits  |file lock|  waits  |   runs  |   runs  |
       |      |         |         |         |         |         |         |
 UV    |-------------------------------------------------------------------
 SEQ   |      |         |         |         |         |         |         |
 OUTPUT| l1   |file lock|   waits |FILE LOCK|  WAITS  |   runs  |   runs  |
       |      |         |         |         |         |         |         |
       |-------------------------------------------------------------------
       |      |         |         |         |         |         |         |
       | l8   |   runs  |    runs |   runs  |   runs  |   runs  |   runs  |
       |      |         |         |         |         |         |         |

notes

  1. Note that for OUTPUT SEQuential files, we do get 'FILE LOCKED' messages (vs 'PERMISSION DENIED' on input file locks - see previous page)

  2. Note the difference from INPUT SEQuential tests on previous page - we now get FILE LOCK & WAITS on l1 vs l1, RDlock vs RDlock

  3. Note the changes on the screen1 'uvcopy' & screen2 'uvcp' commands above - input files now different, uvcopy changed to dat1/fileS2 for no conflict - output files now same, uvcp changed to dat2/fileS1 to match uvcopy out

Goto:   Begin this document End this document UVSI Home-Page

D1. uvlocks.doc - Vancouver Utility File Locking Options & Test Results

test# D1 - UV ISAM INPUT (seq) vs UV ISAM INPUT (seq)


 Screen1: uvcopy waitIS1,fili1=dat1/fileI1,typ=ISFl0h0,filo1=dat2/fileI1
          =====================***********==============================

 Screen2: uvcp fili1=dat1/fileI1,typ=ISFl0h0,rcs=40,filo1=dat2/fileI2
          ===========***********=====================================

UV lock options: l0=RD/WRlock, l1=RDlock, l8=NOlock, h0=NOwait, h1=wait

              |<-------------------- UV ISAM INPUT ----------------------->
     job1     |                    job2 lock options                      |
 lock options |   l0h0  |   l0h1  |   l1h0  |   l1h1  |l2/l4+h0 |l2/l4+h1 |
 ==========================================================================
       |      |         |         |         |         |         |         |
       | l0   |file lock|  waits  |   runs  |   runs  |file lock|  waits  |
       |      |         |         |         |         |         |         |
       |-------------------------------------------------------------------
  UV   |      |         |         |         |         |         |         |
 ISAM  | l1   |   runs  |   runs  |   runs  |   runs  |   runs  |   runs  |
 INPUT |      |         |         |         |         |         |         |
       |-------------------------------------------------------------------
       |      |         |         |         |         |         |         |
       |l2/l4 |file lock|  waits  |   runs  |   runs  |   runs  |   runs  |
       |      |         |         |         |         |         |         |
       --------------------------------------------------------------------
       |      |         |         |         |         |         |         |
       | l8   |file lock|  waits  |file lock|  waits  |file lock|  waits  |
       |      |         |         |         |         |         |         |

notes

  1. Note that since we are testing INPUT ISAM sequential locking that: - input files are the same (dat1/fileI1), output files are different

  2. 'file locked' is the message used for ISAM seqntl INPUT files - vs 'SYSTEM ERR setlock' for non-indexed INPUT files (see test #1)

  3. 'l8' (NOlock) does not apply to ISAM files & is the same as default 'l0' (will not be shown on following test results for ISAM files)

Goto:   Begin this document End this document UVSI Home-Page

D2. uvlocks.doc - Vancouver Utility File Locking Options & Test Results

test# D2 - UV ISAM INPUT (seq) vs UV ISAM OUTPUT (seq)


 Screen1: uvcopy waitIS1,fili1=dat1/fileI1,typ=ISFl0h0,filo1=dat2/fileI1
          =====================***********==============================

 Screen2: uvcp fili1=dat1/fileI2,typ=ISFl0h0,rcs=40,filo1=dat1/fileI1
          ================================================***********

UV lock options: l0=RD/WRlock, l1=RDlock, l8=NOlock, h0=NOwait, h1=wait

              |<-------------------- UV ISAM OUTPUT ---------------------->
     job1     |                    job2 lock options                      |
 lock options |   l0h0  |   l0h1  |   l1h0  |   l1h1  |l2/l4+h0 |l2/l4+h1 |
 ==========================================================================
       |      |         |         |         |         |         |         |
       | l0   |file lock|  waits  |file lock|  waits  |file lock|  waits  |
       |      |         |         |         |         |         |         |
       |-------------------------------------------------------------------
       |      |         |         |         |         |         |         |
       | l1   |   runs  |   runs  |   runs  |   runs  |   runs  |   runs  |
  UV   |      |         |         |         |         |         |         |
 ISAM  |-------------------------------------------------------------------
 INPUT |      |         |         |         |         |         |         |
       |l2/l4 |file lock|  waits  |file lock|  waits  |file lock|  waits  |
       |      |         |         |         |         |         |         |
       |-------------------------------------------------------------------

notes

  1. Since we are testing filelocks for INPUT vs OUTPUT: - the input file for job1 is the same as the output file for job2 (& the other files do not match to avoid unwanted complications)

  2. Reading an ISAM file with 'l1=RDonly-lock' while being Written(output) by another job is a problem. The solution is to use exclusive if there is a possibility of a 2nd job writing/outputting/loading at same time.

  3. Note that we might want to use 'l1=RDonly-lock' while the 1st job is writing via open I-O & read/write random updates. - see test# E2.

Goto:   Begin this document End this document UVSI Home-Page

D3. uvlocks.doc - Vancouver Utility File Locking Options & Test Results

test# D3 - UV ISAM OUTPUT (seq) vs UV ISAM INPUT (seq)


 Screen1: uvcopy waitIS1,fili1=dat1/fileI1,typ=ISFl0h0,filo1=dat2/fileI1
          ===================================================***********

 Screen2: uvcp fili1=dat2/fileI1,typ=ISFl0h0,rcs=40,filo1=dat2/fileI2
          ===========***********=====================================

UV lock options: l0=RD/WRlock, l1=RDlock, l8=NOlock, h0=NOwait, h1=wait

              |<-------------------- UV ISAM INPUT ----------------------->
     job1     |                    job2 lock options                      |
 lock options |   l0h0  |   l0h1  |   l1h0  |   l1h1  |l2/l4+h0 |l2/l4+h1 |
 ==========================================================================
       |      |         |         |         |         |         |         |
       | l0   |file lock|  waits  |   runs  |   runs  |file lock|  waits  |
       |      |         |         |         |         |         |         |
       |-------------------------------------------------------------------
  UV   |      |         |         |         |         |         |         |
 ISAM  | l1   |file lock|  waits  |   runs  |   runs  |file lock|  waits  |
 OUTPUT|      |         |         |         |         |         |         |
       |-------------------------------------------------------------------
       |      |         |         |         |         |         |         |
       |l2/l4 |file lock|  waits  |   runs  |   runs  |   runs  |   runs  |
       |      |         |         |         |         |         |         |

notes

  1. Since we are testing filelocks for OUTPUT vs INPUT: - the OUTPUT file for job1 is the same as the INPUT file for job2 (& the other files do not match to avoid unwanted complications)

  2. Reading an ISAM file with 'l1=RDonly-lock' while being Written(output) by another job is a problem. The solution is to use exclusive if there is a possibility of a 2nd job writing/outputting/loading at same time.

  3. Note that we might want to use 'l1=RDonly-lock' while a 2nd job is writing via open I-O & read/write random updates. - see test# E1.

Goto:   Begin this document End this document UVSI Home-Page

D4. uvlocks.doc - Vancouver Utility File Locking Options & Test Results

test# D4 - UV ISAM OUTPUT (seq) vs UV ISAM OUTPUT (seq)


 Screen1: uvcopy waitIS1,fili1=dat1/fileI1,filo1=dat2/fileI1,typ=ISFl0h0
          =======================================***********============

 Screen2: uvcp fili1=dat1/fileI2,typ=ISF,rcs=40,filo1=dat2/fileI1,typ=ISFl0h0
          ============================================***********============

UV lock options: l0=RD/WRlock, l1=RDlock, l8=NOlock, h0=NOwait, h1=wait

              |<-------------------- UV ISAM OUTPUT ---------------------->
     job1     |                    job2 lock options                      |
 lock options |   l0h0  |   l0h1  |   l1h0  |   l1h1  |l2/l4+h0 |l2/l4+h1 |
 ==========================================================================
       |      |         |         |         |         |         |         |
       | l0   |file lock|  waits  |file lock|  waits  |file lock|  waits  |
       |      |         |         |         |         |         |         |
       |-------------------------------------------------------------------
  UV   |      |         |         |         |         |         |         |
 ISAM  | l1   |file lock|  waits  |file lock|  waits  |file lock|  waits  |
 OUTPUT|      |         |         |         |         |         |         |
       |-------------------------------------------------------------------
       |      |         |         |         |         |         |         |
       |l2/l4 |file lock|  waits  |file lock|  waits  |file lock|  waits  |
       |      |         |         |         |         |         |         |

notes

  1. These results are all the same - all FileLock or Wait if option 'h1' - because we are OUTPUTting an ISAM file & No other filelock is compatible

Goto:   Begin this document End this document UVSI Home-Page

E1. uvlocks.doc - Vancouver Utility File Locking Options & Test Results

test# E1 - UV ISAM INPUT (seq) vs UV ISAM I-O (update)


 Screen1: uvcopy waitIS1,fili1=dat1/fileI1,typ=ISFl0h0,filo1=dat2/fileI1
          =====================***********==============================

 Screen2: uvcopy waitIR1,filr1=dat1/fileI1,typ=ISFl0h0
          =====================***********============

UV lock options: l0=RD/WRlock, l1=RDlock, l8=NOlock, h0=NOwait, h1=wait

              |<----------------- UV ISAM I-O (update) ------------------->
     job1     |                    job2 lock options                      |
 lock options |   l0h0  |   l0h1  |   l1h0  |   l1h1  |l2/l4+h0 |l2/l4+h1 |
 ==========================================================================
       |      |         |         |         |         |         |         |
       | l0   |file lock|  waits  |bad file#|bad file#|file lock|  waits  |
       |      |         |         |         |         |         |         |
       |-------------------------------------------------------------------
  UV   |      |         |         |         |         |         |         |
 ISAM  | l1   |   runs  |   runs  |bad file#|bad file#|   runs  |   runs  |
 INPUT |      |         |         |         |         |         |         |
 (seq) |-------------------------------------------------------------------
       |      |         |         |         |         |         |         |
       |l2/l4 |file lock|  waits  |bad file#|bad file#|file lock|  waits  |
       |      |         |         |         |         |         |         |

notes

  1. Since we are testing filelocks for INPUT vs I-O update - the input file for job1 is the same as the random(only) file for job2

  2. I-O update job1 (waitIR2) attempts to open the file & if/when successful, it will update record key '0020' with date/time

  3. Option 'l1' causes 'bad file#' error, because option l1 (RDonly) is incompatible with the waitIR2 jobs attempt to update.

Goto:   Begin this document End this document UVSI Home-Page

E2. uvlocks.doc - Vancouver Utility File Locking Options & Test Results

test# E2 - UV ISAM I-O (update) vs UV ISAM INPUT (seq)


 Screen1: uvcopy waitIR1,filr1=dat1/fileI1,typ=ISFl0h0
          =====================***********============

 Screen2: uvcopy waitIS2,fili1=dat1/fileI1,typ=ISFl0h0,filo1=dat2/fileI2
          =====================***********==============================

UV lock options: l0=RD/WRlock, l1=RDlock, l8=NOlock, h0=NOwait, h1=wait

  UV  |<--------------------- UV ISAM INPUT (seq) --------------------------->|
 ISAM |                        job2 lock options                              |
  I-O |  l0h0  |  l0h1  |  l1h0  |  l1h1  |  l2h0  |  l2h1  |  l4h0  |  l4h1  |
 ==============================================================================
      |        |        |        |        |        |        |        |        |
  l0  |filelock| waits  |  runs  |  runs  |filelock| waits  |filelock|  runs  |
      |        |        |        |        |        |        |        |        |
      |        |        |        |        |        |        |        |        |
  l1  |badfile#|badfile#|badfile#|badfile#|badfile#|badfile#|badfile#|badfile#|
      |        |        |        |        |        |        |        |        |
      |        |        |        |        |        |        |        |        |
  l2  |filelock| waits  |  runs  |  runs  |filelock| waits  | HANG UP|  runs  |
      |        |        |        |        |        |        |        |        |
      |        |        |        |        |        |        |        |        |
  l4  |filelock| waits  |  runs  |  runs  |filelock| waits  |  runs  |  runs  |
      |        |        |        |        |        |        |        |        |

notes

  1. Since we are testing filelocks for I-O update vs INPUT: - the random(only) file for job1 is the same as the INPUT file for job2

  2. I-O update job1 (waitIR1) updates record key '0010' with date/time & waits for operator entry before closing the file

  3. Option 'l1' causes 'bad file#' error, because option l1 (RDonly) is incompatible with the waitIR1 job's attempt to update. (since waitR1 is run 1st, there is no point running waitR2)

  4. 'HANG UP' occurs when waitR1 is run with option 'l2' (Auto-lock) & waitIS2 is also run with 'l2' (Auto-lock) - when waitR1 is allowed to close, then waitIS1 runs OK. - This appears to be the only combination that hangs up without any kind of status message.

Goto:   Begin this document End this document UVSI Home-Page

E3. uvlocks.doc - Vancouver Utility File Locking Options & Test Results

test# E3 - UV ISAM I-O (update) vs UV ISAM I-O (update)


 Screen1: uvcopy waitIR1,filr1=dat1/fileI1,typ=ISFl0h0
          =====================***********============

 Screen2: uvcopy waitIR2,filr1=dat1/fileI1,typ=ISFl0h0
          =====================***********============

UV lock options: l0=RD/WRlock, l1=RDlock, l8=NOlock, h0=NOwait, h1=wait

              |<---------------- UV ISAM I-O (update) -------------------->
     job1     |                    job2 lock options                      |
 lock options |   l0h0  |   l0h1  |   l1h0  |   l1h1  |l2/l4+h0 |l2/l4+h1 |
 ==========================================================================
       |      |         |         |         |         |         |         |
       | l0   |file lock|  waits  |bad file#|bad file#|file lock|  waits  |
       |      |         |         |         |         |         |         |
       |-------------------------------------------------------------------
  UV   |      |         |         |         |         |         |         |
 ISAM  | l1   |bad file#|bad file#|bad file#|bad file#|bad file#|bad file#|
 I-O   |      |         |         |         |         |         |         |
 update|-------------------------------------------------------------------
       |      |         |         |         |         |         |         |
       |l2/l4 |file lock|  waits  |bad file#|bad file#|   runs  |   runs  |
       |      |         |         |         |         |         |         |

notes

  1. Since we are testing I-O Update on job1 vs I-O Update on job2 - the files are the same (only 1 file in random jobs)

  2. I-O update job1 (waitIR1) updates record key '0010' with date/time & waits for operator entry before closing the file

  3. I-O update job1 (waitIR2) attempts to open the file & if/when successful, it will update record key '0020' with date/time

  4. Option 'l1' causes 'bad file#' error, because option l1 (RDonly) is incompatible with the waitIR2 jobs attempt to update.

Goto:   Begin this document End this document UVSI Home-Page

F1. uvlocks.doc - Vancouver Utility File Locking Options & Test Results

test# F1 - COBOL SEQ INPUT vs UV SEQ INPUT


 Screen1: export DD_FILE1=dat1/fileS1 DD_FILE2=dat2/filS1
          ===============================================
       a. cobrun batx/coblokSE   (coblokSE=Exclusive)
       b. cobrun batx/coblokSD   (coblokSD=Default=RDlock)
       c. cobrun batx/coblokSA   (coblokSA=Automatic)
       d. cobrun batx/coblokSM   (coblokSM=Manual)

 Screen2: uvcp fili1=dat1/fileS1,typ=RSFl0h0,rcs=40,filo1=dat2/fileS2
          ===========***********=====================================

UV lock options: l0=RD/WRlock, l1=RDlock, l8=NOlock, h0=NOwait, h1=wait

              |<-------------------- UV SEQ INPUT ------------------------>
     job1     |                    job2 lock options                      |
 lock options |   l0h0  |   l0h1  |   l1h0  |   l1h1  |  l8h0   |   l8h1  |
 ==========================================================================
       |      |         |         |         |         |         |         |
       |Exclus|lock fail|  waits  |lock fail|  waits  |   runs  |   runs  |
       | (l0) |         |         |         |         |         |         |
       |-------------------------------------------------------------------
       |      |         |         |         |         |         |         |
       |Deflt |lock fail|   waits |   runs  |   runs  |   runs  |   runs  |
 COBOL | (l1) |         |         |         |         |         |         |
  SEQ  |-------------------------------------------------------------------
 INPUT |      |         |         |         |         |         |         |
       |Auto  |lock fail|   waits |   runs  |   runs  |   runs  |   runs  |
       | (l2) |         |         |         |         |         |         |
       |-------------------------------------------------------------------
       |      |         |         |         |         |         |         |
       |Manual|lock fail|   waits |   runs  |   runs  |   runs  |   runs  |
       | (l4) |         |         |         |         |         |         |
  1. 'SYSTEM ERR setlock' is the error meesage produced by uvcopy/uvcp/uvsort when they attempt to open INPUT SEQuential files that are LOCKED. (decoded from a system errnumber, might vary on different UNIX systems)

  2. COBOL programs specify locking options on the file select clause lock is Exclusive, Default(RDonly), lock is Automatic, lock is Manual UV equiv: l0 l1 l2 l4 (but l2/l4 are for ISAM files)

  3. uvcopy/uvcp/uvsort locking options for SEQuential files are: l0=RD/WRlock=Exc, l1=RDlock=Default(COBOL), l8=NOlock

  4. See the COBOL program 'coblokSE' (test Isam Exclusive) listed at the back - four cobol programs used to create test results on this page coblokSE=Exc, coblokSD=Default, coblokSA=Auto, coblokSM=Manual varying 'lock is' clause: Exclusive, omitted(Dflt), Automatic, Manual

Goto:   Begin this document End this document UVSI Home-Page

F2. uvlocks.doc - Vancouver Utility File Locking Options & Test Results

test# F2 - COBOL SEQ INPUT vs UV SEQ OUTPUT


 Screen1: export DD_FILE1=dat1/fileS1 DD_FILE2=dat2/filS1
          ===============================================
       a. cobrun batx/coblokSE   (coblokSE=Exclusive)
       b. cobrun batx/coblokSD   (coblokSD=Default=RDlock)
       c. cobrun batx/coblokSA   (coblokSA=Automatic)
       d. cobrun batx/coblokSM   (coblokSM=Manual)

 Screen2: uvcp fili1=dat1/fileS2,typ=RSFl0h0,rcs=40,filo1=dat1/fileS1
          ================================================***********

UV lock options: l0=RD/WRlock, l1=RDlock, l8=NOlock, h0=NOwait, h1=wait

              |<-------------------- UV SEQ OUTPUT ----------------------->
     job1     |                    job2 lock options                      |
 lock options |   l0h0  |   l0h1  |   l1h0  |   l1h1  |  l8h0   |   l8h1  |
 ==========================================================================
       |      |  output |         | output  |         |         |         |
       |Exclus|file lock|  waits  |file lock|  waits  |   runs  |   runs  |
       | (l0) |         |         |         |         |         |         |
       |-------------------------------------------------------------------
       |Deflt |  output |         | OUTPUT  |         |         |         |
       |RDonly|file lock|  waits  |FILE LOCK|  WAITS  |   runs  |   runs  |
 COBOL | (l1) |         |         |         |         |         |         |
  SEQ  |-------------------------------------------------------------------
 INPUT |      |  output |         |  output |         |         |         |
       |Auto  |file lock|   waits |file lock|  waits  |   runs  |   runs  |
       | (l2) |         |         |         |         |         |         |
       |-------------------------------------------------------------------
       |      |  output |         |  output |         |         |         |
       |Manual|file lock|   waits |file lock|  waits  |   runs  |   runs  |
       | (l4) |         |         |         |         |         |         |

notes

  1. Note the major difference from the previous page (COBOL SEQ INPUT locks) - Since this is OUTPUT, all file locks for uvcopy/uvcp (l0, l1) now cause locking, only NOlocks (l8) will run & of course this would destroy the file - possible with SEQuential, not with ISAM

  2. Note the INPUT file for COBOL (dat1/fileS1), now matches the OUTPUT file for uvcp (& the other files dont match to avoid confusion).

Goto:   Begin this document End this document UVSI Home-Page

F3. uvlocks.doc - Vancouver Utility File Locking Options & Test Results

test# F3 - COBOL SEQ OUTPUT vs UV SEQ INPUT


 Screen1: export DD_FILE1=dat1/fileS1 DD_FILE2=dat2/filS1
          ===============================================
       a. cobrun batx/coblokSE   (coblokSE=Exclusive)
       b. cobrun batx/coblokSD   (coblokSD=Default=RDlock)
       c. cobrun batx/coblokSA   (coblokSA=Automatic)
       d. cobrun batx/coblokSM   (coblokSM=Manual)

 Screen2: uvcp fili1=dat2/fileS1,typ=RSFl0h0,rcs=40,filo1=dat2/fileS2
          ===========***********=====================================

UV lock options: l0=RD/WRlock, l1=RDlock, l8=NOlock, h0=NOwait, h1=wait

              |<-------------------- UV SEQ INPUT ------------------------>
     job1     |                    job2 lock options                      |
 lock options |   l0h0  |   l0h1  |   l1h0  |   l1h1  |  l8h0   |   l8h1  |
 ==========================================================================
       |      |         |         |         |         |         |         |
       |Exclus|lock fail|  waits  |lock fail|  waits  |   runs  |   runs  |
       | (l0) |         |         |         |         |         |         |
       |-------------------------------------------------------------------
       |RDonly|         |         |         |         |         |         |
       | dflt |lock fail|  waits  |lock fail|  waits  |   runs  |   runs  |
 COBOL | (l1) |         |         |         |         |         |         |
  SEQ  |-------------------------------------------------------------------
 OUTPUT|      |         |         |         |         |         |         |
       |Auto  |lock fail|   waits |lock fail|  waits  |   runs  |   runs  |
       | (l2) |         |         |         |         |         |         |
       |-------------------------------------------------------------------
       |      |         |         |         |         |         |         |
       |Manual|lock fail|   waits |lock fail|  waits  |   runs  |   runs  |
       | (l4) |         |         |         |         |         |         |

notes

  1. The COBOL OUTPUT file (dat2/fileS1), now matches the INPUT file for uvcp (& the other files do not match to avoid confusion).

  2. Attempts to INPUT sequential locked files causes 'PERMISSION DENIED' messages (vs FILE LOCKED) for OUTPUT attempts or for ISAM INPUT & OUTPUT.

Goto:   Begin this document End this document UVSI Home-Page

F4. uvlocks.doc - Vancouver Utility File Locking Options & Test Results

test# F4 - COBOL SEQ OUTPUT vs UV SEQ OUTPUT


 Screen1: export DD_FILE1=dat1/fileS1 DD_FILE2=dat2/filS1
          ===============================================
       a. cobrun batx/coblokSE   (coblokSE=Exclusive)
       b. cobrun batx/coblokSD   (coblokSD=Default=RDlock)
       c. cobrun batx/coblokSA   (coblokSA=Automatic)
       d. cobrun batx/coblokSM   (coblokSM=Manual)

 Screen2: uvcp fili1=dat1/fileS2,typ=RSFl0h0,rcs=40,filo1=dat2/fileS1
          ================================================***********

UV lock options: l0=RD/WRlock, l1=RDlock, l8=NOlock, h0=NOwait, h1=wait

              |<-------------------- UV SEQ OUTPUT ----------------------->
     job1     |                    job2 lock options                      |
 lock options |   l0h0  |   l0h1  |   l1h0  |   l1h1  |  l8h0   |   l8h1  |
 ==========================================================================
       |      |  output |         | output  |         |         |         |
       |Exclus|file lock|  waits  |file lock|  waits  |   runs  |   runs  |
       | (l0) |         |         |         |         |         |         |
       |-------------------------------------------------------------------
       |RDonly|  output |         | OUTPUT  |         |         |         |
       | dflt |file lock|  waits  |FILE LOCK|  WAITS  |   runs  |   runs  |
 COBOL | (l1) |         |         |         |         |         |         |
  SEQ  |-------------------------------------------------------------------
 OUTPUT|      |         |         |  output |         |         |         |
       |Auto  |file lock|   waits |file lock|  waits  |   runs  |   runs  |
       | (l2) |         |         |         |         |         |         |
       |-------------------------------------------------------------------
       |      |         |         |  output |         |         |         |
       |Manual|file lock|   waits |file lock|  waits  |   runs  |   runs  |
       | (l4) |         |         |         |         |         |         |

notes

  1. Note the major difference from the previous page (COBOL SEQ INPUT locks) - Since this is OUTPUT, all file locks for uvcopy/uvcp (l0, l1) now cause locking, only NOlocks (l8) will run & of course this would destroy the file - possible with SEQuential, not with ISAM

  2. Note the OUTPUT files are now the same (dat2/fileS1), and the input files are now different (dat1/fileS1 vs dat1/fileS2)

Goto:   Begin this document End this document UVSI Home-Page

G1. uvlocks.doc - Vancouver Utility File Locking Options & Test Results

test# G1 - COBOL ISAM INPUT (seq) vs UV ISAM INPUT (seq)


 Screen1: export DD_FILE1=dat1/fileI1 DD_FILE2=dat2/filI1
          ===============================================
       a. cobrun batx/coblokIE   (coblokIE=Exclusive)
       b. cobrun batx/coblokID   (coblokID=Default=RDlock)
       c. cobrun batx/coblokIA   (coblokIA=Automatic)
       d. cobrun batx/coblokIM   (coblokIM=Manual)

 Screen2: uvcp fili1=dat1/fileI1,typ=ISFl0h0,rcs=40,filo1=dat2/fileI2
          ===========***********=====================================

UV lock options: l0=RD/WRlock, l1=RDlock, l8=NOlock, h0=NOwait, h1=wait

              |<----------------- UV ISAM INPUT (seq) -------------------->
     job1     |                    job2 lock options                      |
 lock options |   l0h0  |   l0h1  |   l1h0  |   l1h1  |l2/l4+h0 |l2/l4+h1 |
 ==========================================================================
       |      |         |         |         |         |         |         |
       |Exclus|file lock|  waits  |   runs  |   runs  |file lock|   waits |
       | (l0) |         |         |         |         |         |         |
       |-------------------------------------------------------------------
       |RDonly|         |         |         |         |         |         |
       | dflt |file lock|   waits |   runs  |   runs  |   runs  |   runs  |
 COBOL | (l1) |         |         |         |         |         |         |
 ISAM  |-------------------------------------------------------------------
 INPUT |      |         |         |         |         |         |         |
 (seq) |Auto  |file lock|   waits |   runs  |   runs  |   runs  |   runs  |
       | (l2) |         |         |         |         |         |         |
       |-------------------------------------------------------------------
       |      |         |         |         |         |         |         |
       |Manual|file lock|   waits |   runs  |   runs  |   runs  |   runs  |
       | (l4) |         |         |         |         |         |         |
  1. COBOL programs specify locking options on the file select clause lock is Exclusive, Default(RDonly), lock is Automatic, lock is Manual

  2. The equivalent uvcopy/uvcp/uvsort locking options are: l0=RD/WRlock=Exc, l1=RDlock=Default(COBOL), l2=Automatic, l4=Manual

  3. l8 not used for ISAM files, l8(nolock) for seqntl files uvcopy/uvcp/uvsort (if specified it would be same as l0, the UV default)

  4. l2/l4 Auto/Manual would not normally be used with uvcopy/uvcp/uvsort (COBOL record locking options vs file locking options)

  5. See the COBOL program 'coblokIE' (test Isam Exclusive) listed at the back - four cobol programs used to create test results on this page coblokIE=Exc, coblokID=Default, coblokIA=Auto, coblokIM=Manual varying 'lock is' clause: Exclusive, omitted(Dflt), Automatic, Manual

Goto:   Begin this document End this document UVSI Home-Page

G2. uvlocks.doc - Vancouver Utility File Locking Options & Test Results

test# G2 - COBOL ISAM INPUT (seq) vs UV ISAM OUTPUT (seq)


 Screen1: export DD_FILE1=dat1/fileI1 DD_FILE2=dat2/filI1
          ===============================================
       a. cobrun batx/coblokIE   (coblokIE=Exclusive)
       b. cobrun batx/coblokID   (coblokID=Default=RDlock)
       c. cobrun batx/coblokIA   (coblokIA=Automatic)
       d. cobrun batx/coblokIM   (coblokIM=Manual)

 Screen2: uvcp fili1=dat1/fileI2,typ=ISFl0h0,rcs=40,filo1=dat1/fileI1
          ================================================***********

UV lock options: l0=RD/WRlock, l1=RDlock, l8=NOlock, h0=NOwait, h1=wait

              |<---------------- UV ISAM OUTPUT (seq) -------------------->
     job1     |                    job2 lock options                      |
 lock options |   l0h0  |   l0h1  |   l1h0  |   l1h1  |l2/l4+h0 |l2/l4+h1 |
 ==========================================================================
       |      |         |         |         |         |         |         |
       |Exclus|file lock|  waits  |file lock|  waits  |file lock|   waits |
       | (l0) |         |         |         |         |         |         |
       |-------------------------------------------------------------------
       |RDonly|         |         |         |         |         |         |
       | dflt |file lock|   waits |file lock|  waits  |file lock|  waits  |
 COBOL | (l1) |         |         |         |         |         |         |
 ISAM  |-------------------------------------------------------------------
 INPUT |      |         |         |         |         |         |         |
 (seq) |Auto  |file lock|   waits |file lock|  waits  |file lock|  waits  |
       | (l2) |         |         |         |         |         |         |
       |-------------------------------------------------------------------
       |      |         |         |         |         |         |         |
       |Manual|file lock|   waits |file lock|  waits  |file lock|  waits  |
       | (l4) |         |         |         |         |         |         |

notes

  1. The COBOL input file (dat1/fileS1) is now matched by the uvcp output file (& the other files do not match to avoid confusion).

  2. All options cause lock, you cannot OUTPUT to an ISAM INPUT file. ISAM does not provide the 'l8' option (only for non-indexed files), to override any file lock.

Goto:   Begin this document End this document UVSI Home-Page

G3. uvlocks.doc - Vancouver Utility File Locking Options & Test Results

test# G3 - COBOL ISAM OUTPUT (seq) vs UV ISAM INPUT (seq)


 Screen1: export DD_FILE1=dat1/fileI1 DD_FILE2=dat2/filI1
          ===============================================
       a. cobrun batx/coblokIE   (coblokIE=Exclusive)
       b. cobrun batx/coblokID   (coblokID=Default=RDlock)
       c. cobrun batx/coblokIA   (coblokIA=Automatic)
       d. cobrun batx/coblokIM   (coblokIM=Manual)

 Screen2: uvcp fili1=dat2/fileI1,typ=ISFl0h0,rcs=40,filo1=dat2/fileI2
          ===========***********=====================================

UV lock options: l0=RD/WRlock, l1=RDlock, l8=NOlock, h0=NOwait, h1=wait

              |<----------------- UV ISAM INPUT (seq) -------------------->
     job1     |                    job2 lock options                      |
 lock options |   l0h0  |   l0h1  |   l1h0  |   l1h1  |l2/l4+h0 |l2/l4+h1 |
 ==========================================================================
       |      |         |         |         |         |         |         |
       |Exclus|file lock|  waits  |   runs  |   runs  |file lock|   waits |
       | (l0) |         |         |         |         |         |         |
       |-------------------------------------------------------------------
       |RDonly|         |         |         |         |         |         |
       | dflt |file lock|   waits |   runs  |   runs  |file lock|  waits  |
 COBOL | (l1) |         |         |         |         |         |         |
 ISAM  |-------------------------------------------------------------------
 OUTPUT|      |         |         |         |         |         |         |
 (seq) |Auto  |file lock|   waits |   runs  |   runs  |file lock|  waits  |
       | (l2) |         |         |         |         |         |         |
       |-------------------------------------------------------------------
       |      |         |         |         |         |         |         |
       |Manual|file lock|   waits |   runs  |   runs  |file lock|  waits  |
       | (l4) |         |         |         |         |         |         |

notes

  1. The COBOL output file (dat2/fileI1) is now matched by the uvcp input file (& the other files do not match to avoid confusion).

  2. Option 'l1' READonly allows us to read a file while it is being written.

Goto:   Begin this document End this document UVSI Home-Page

G4. uvlocks.doc - Vancouver Utility File Locking Options & Test Results

test# G4 - COBOL ISAM OUTPUT (seq) vs UV ISAM OUTPUT (seq)


 Screen1: export DD_FILE1=dat1/fileI1 DD_FILE2=dat2/filI1
          ===============================================
       a. cobrun batx/coblokIE   (coblokIE=Exclusive)
       b. cobrun batx/coblokID   (coblokID=Default=RDlock)
       c. cobrun batx/coblokIA   (coblokIA=Automatic)
       d. cobrun batx/coblokIM   (coblokIM=Manual)

 Screen2: uvcp fili1=dat1/fileI2,typ=ISFl0h0,rcs=40,filo1=dat2/fileI1
          ================================================***********

UV lock options: l0=RD/WRlock, l1=RDlock, l8=NOlock, h0=NOwait, h1=wait

              |<----------------- UV ISAM OUTPUT (seq) ------------------->
     job1     |                    job2 lock options                      |
 lock options |   l0h0  |   l0h1  |   l1h0  |   l1h1  |l2/l4+h0 |l2/l4+h1 |
 ==========================================================================
       |      |  output |         | output  |         |         |         |
       |Exclus|file lock|  waits  |file lock|  waits  |   runs  |   runs  |
       | (l0) |         |         |         |         |         |         |
       |-------------------------------------------------------------------
       |RDonly|  output |         | OUTPUT  |         |         |         |
       | dflt |file lock|  waits  |FILE LOCK|  WAITS  |   runs  |   runs  |
 COBOL | (l1) |         |         |         |         |         |         |
 ISAM  |-------------------------------------------------------------------
 OUTPUT|      |         |         |         |         |         |         |
 (seq) |Auto  |file lock|   waits |   runs  |   runs  |   runs  |   runs  |
       | (l2) |         |         |         |         |         |         |
       |-------------------------------------------------------------------
       |      |         |         |         |         |         |         |
       |Manual|file lock|   waits |   runs  |   runs  |   runs  |   runs  |
       | (l4) |         |         |         |         |         |         |

notes

  1. Note the major difference from the previous page (COBOL ISAM INPUT locks) - Since this is OUTPUT, the 'l1' RDonly options (Default in COBOL) now cause locking

  2. Note the output files are now the same (dat2/fileI1), and the input files are now different (dat1/fileI1 vs dat1/fileI2)

Goto:   Begin this document End this document UVSI Home-Page

H1. uvlocks.doc - Vancouver Utility File Locking Options & Test Results

test# H1 - COBOL ISAM I-O (update) vs UV ISAM INPUT (seq)


 Screen1: export DD_FILE1=dat1/fileI1 DD_FILE2=dat2/fileI1
          ================================================
       a. cobrun -1 batx/coblokIE  (coblokIE=Exclusive)
       b. cobrun -1 batx/coblokID  (coblokID=Default=RDlock)
       c. cobrun -1 batx/coblokIA  (coblokIA=Automatic)
       d. cobrun -1 batx/coblokIM  (coblokIM=Manual)
          NOTE: '-1' UPSI switch causes COBOL open I-O (vs open INPUT)

 Screen2: uvcp fili1=dat1/fileI1,typ=ISFl0h0,rcs=40,filo1=dat2/fileI2
          ===========***********=====================================

UV lock options: l0=RD/WRlock, l1=RDlock, l8=NOlock, h0=NOwait, h1=wait

              |<------------------ UV ISAM INPUT (seq) ------------------->
     job1     |                    job2 lock options                      |
 lock options |   l0h0  |   l0h1  |   l1h0  |   l1h1  |ld/l4+h0 |ld/l4+h1 |
 ==========================================================================
       |      |         |         |         |         |         |         |
       |Exclus|file lock|  waits  |   runs  |   runs  |file lock|  waits  |
       | (l0) |         |         |         |         |         |         |
       |-------------------------------------------------------------------
       |RDonly|         |         |         |         |         |         |
       | dflt |file lock|  waits  |   runs  |   runs  |file lock|  waits  |
 COBOL | (l1) |         |         |         |         |         |         |
 ISAM  |-------------------------------------------------------------------
  I-O  |      |         |         |         |         |         |         |
 update|Auto  |file lock|   waits |   runs  |   runs  |   runs  |   runs  |
       | (l2) |         |         |         |         |         |         |
       |-------------------------------------------------------------------
       |      |         |         |         |         |         |         |
       |Manual|file lock|   waits |   runs  |   runs  |   runs  |   runs  |
       | (l4) |         |         |         |         |         |         |

notes

Goto:   Begin this document End this document UVSI Home-Page

H2. uvlocks.doc - Vancouver Utility File Locking Options & Test Results

test# H2 - COBOL ISAM I-O (update) vs UV ISAM OUTPUT (seq)


 Screen1: export DD_FILE1=dat1/fileI1 DD_FILE2=dat2/fileI1
          ================================================
       a. cobrun -1 batx/coblokIE  (coblokIE=Exclusive)
       b. cobrun -1 batx/coblokID  (coblokID=Default=RDlock)
       c. cobrun -1 batx/coblokIA  (coblokIA=Automatic)
       d. cobrun -1 batx/coblokIM  (coblokIM=Manual)
          NOTE: '-1' UPSI switch causes COBOL open I-O (vs open INPUT)

 Screen2: uvcp fili1=dat1/fileI2,typ=ISFl0h0,rcs=40,filo1=dat1/fileI1
          ================================================***********

UV lock options: l0=RD/WRlock, l1=RDlock, l8=NOlock, h0=NOwait, h1=wait

              |<------------------ UV ISAM OUTPUT (seq) ------------------>
     job1     |                    job2 lock options                      |
 lock options |   l0h0  |   l0h1  |   l1h0  |   l1h1  |l2/l4+h0 |l2/l4+h1 |
 ==========================================================================
       |      |         |         |         |         |         |         |
       |Exclus|file lock|  waits  |file lock|  waits  |file lock|  waits  |
       | (l0) |         |         |         |         |         |         |
       |-------------------------------------------------------------------
       |RDonly|         |         |         |         |         |         |
       | dflt |file lock|  waits  |file lock|  waits  |file lock|  waits  |
 COBOL | (l1) |         |         |         |         |         |         |
 ISAM  |-------------------------------------------------------------------
  I-O  |      |         |         |         |         |         |         |
 update|Auto  |file lock|   waits |file lock|  waits  |file lock|  waits  |
       | (l2) |         |         |         |         |         |         |
       |-------------------------------------------------------------------
       |      |         |         |         |         |         |         |
       |Manual|file lock|   waits |file lock|  waits  |file lock|  waits  |
       | (l4) |         |         |         |         |         |         |

notes

Goto:   Begin this document End this document UVSI Home-Page

I1. uvlocks.doc - Vancouver Utility File Locking Options & Test Results

test# I1 - TIP/ix ISAM vs UV ISAM INPUT (seq)

Screen1: TIP/ix - pick a suitable file & change uvcp input to match SMSEC configures files to open for: Input, I-O, or Output. SMFILE configures files to open as: Exclusive, Shared,or NOlocking (SMSEC overrides SMFILE)


 Screen2: uvcp fili1=dat1/fileI1,typ=ISFl0h0,rcs=40,filo1=dat2/fileI2
          ===========***********=====================================

UV lock options: l0=RD/WRlock, l1=RDlock, l8=NOlock, h0=NOwait, h1=wait

  TIP/ix   |<---------------------UV ISAM INPUT (seq) ---------------------->|
 file/lock |                        lock options                             |
  options  |   l0h0   |   l0h1   |   l1h0   |   l1h1   |   l8h0   |   l8h1   |
 =============================================================================
     |     |          |          |          |          |          |          |
     | Exc |          |          |          |          |          |          |
     |     |          |          |          |          |          |          |
     -------------------------------------------------------------------------
     |     |          |          |          |          |          |          |
 IN  | Shr |          |          |          |          |          |          |
     |     |          |          |          |          |          |          |
     |------------------------------------------------------------------------
     |     |          |          |          |          |          |          |
     |NoLK |          |          |          |          |          |          |
     |     |          |          |          |          |          |          |
 ----|--------------------------------------------------------------------------
     |     |          |          |          |          |          |          |
     | Exc |          |          |          |          |          |          |
     |     |          |          |          |          |          |          |
     |------------------------------------------------------------------------
     |     |          |          |          |          |          |          |
 I-O | Shr |          |          |          |          |          |          |
     |     |          |          |          |          |          |          |
     |------------------------------------------------------------------------
     |     |          |          |          |          |          |          |
     |NOLK |          |          |          |          |          |          |
     |     |          |          |          |          |          |          |
     |     |          |          |          |          |          |          |
     | Exc |          |          |          |          |          |          |
     |     |          |          |          |          |          |          |
     |------------------------------------------------------------------------
     |     |          |          |          |          |          |          |
 OUT | Shr |          |          |          |          |          |          |
     |     |          |          |          |          |          |          |
     |------------------------------------------------------------------------
     |     |          |          |          |          |          |          |
     |NOLK |          |          |          |          |          |          |
     |     |          |          |          |          |          |          |

Goto:   Begin this document End this document UVSI Home-Page

I2. uvlocks.doc - Vancouver Utility File Locking Options & Test Results

test# I2 - TIP/ix ISAM vs UV ISAM OUTPUT (seq)

Screen1: TIP/ix - pick a suitable file & change uvcp output to match SMSEC configures files to open for: Input, I-O, or Output. SMFILE configures files to open as: Exclusive, Shared,or NOlocking (SMSEC overrides SMFILE)


 Screen2: uvcp fili1=dat1/fileI1,typ=ISFl0h0,rcs=40,filo1=dat2/fileI1
          ================================================***********

UV lock options: l0=RD/WRlock, l1=RDlock, l8=NOlock, h0=NOwait, h1=wait

  TIP/ix   |<-------------------- UV ISAM OUTPUT (seq) --------------------->|
 file/lock |                          lock options                           |
  options  |   l0h0   |   l0h1   |   l1h0   |   l1h1   |   l8h0   |   l8h1   |
 =============================================================================
     |     |          |          |          |          |          |          |
     | Exc |          |          |          |          |          |          |
     |     |          |          |          |          |          |          |
     -------------------------------------------------------------------------
     |     |          |          |          |          |          |          |
 IN  | Shr |          |          |          |          |          |          |
     |     |          |          |          |          |          |          |
     |------------------------------------------------------------------------
     |     |          |          |          |          |          |          |
     |NoLK |          |          |          |          |          |          |
     |     |          |          |          |          |          |          |
 ----|------------------------------------------------------------------------
     |     |          |          |          |          |          |          |
     | Exc |          |          |          |          |          |          |
     |     |          |          |          |          |          |          |
     |------------------------------------------------------------------------
     |     |          |          |          |          |          |          |
 I-O | Shr |          |          |          |          |          |          |
     |     |          |          |          |          |          |          |
     |------------------------------------------------------------------------
     |     |          |          |          |          |          |          |
     |NOLK |          |          |          |          |          |          |
     |     |          |          |          |          |          |          |
     |     |          |          |          |          |          |          |
     | Exc |          |          |          |          |          |          |
     |     |          |          |          |          |          |          |
     |------------------------------------------------------------------------
     |     |          |          |          |          |          |          |
 OUT | Shr |          |          |          |          |          |          |
     |     |          |          |          |          |          |          |
     |------------------------------------------------------------------------
     |     |          |          |          |          |          |          |
     |NOLK |          |          |          |          |          |          |
     |     |          |          |          |          |          |          |

Goto:   Begin this document End this document UVSI Home-Page

J1. uvlocks.doc - Vancouver Utility File Locking Options & Test Results

test# J1 - TIP/ix ISAM vs COBOL ISAM INPUT (seq)

Screen1: TIP/ix - pick a suitable file SMSEC configures files to open for: Input, I-O, or Output. SMFILE configures files to open as: Exclusive, Shared,or NOlocking (SMSEC overrides SMFILE)

Screen2: COBOL batch - could use coblokIE (supplied with Van Utils) COBOL 'lock is' can be: Exclusive, Default(RDonly), Automatic, Manual COBOL files can be opened: Input, I-O, or Output

  TIP/ix   |<---------------- COBOL ISAM INPUT --------------->|
 file/lock |                     lock options                  |
  options  |   Exclus   |   Default  |   Auto     |   Manual   |
 ===============================================================
     |     |            |            |            |            |
     | Exc |            |            |            |            |
     |     |            |            |            |            |
     -----------------------------------------------------------
     |     |            |            |            |            |
 IN  | Shr |            |            |            |            |
     |     |            |            |            |            |
     |----------------------------------------------------------
     |     |            |            |            |            |
     |NoLK |            |            |            |            |
     |     |            |            |            |            |
     |     |            |            |            |            |
     | Exc |            |            |            |            |
     |     |            |            |            |            |
     |----------------------------------------------------------
     |     |            |            |            |            |
 I-O | Shr |            |            |            |            |
     |     |            |            |            |            |
     |----------------------------------------------------------
     |     |            |            |            |            |
     |NOLK |            |            |            |            |
     |     |            |            |            |            |
     |     |            |            |            |            |
     | Exc |            |            |            |            |
     |     |            |            |            |            |
     |----------------------------------------------------------
     |     |            |            |            |            |
 OUT | Shr |            |            |            |            |
     |     |            |            |            |            |
     |----------------------------------------------------------
     |     |            |            |            |            |
     |NOLK |            |            |            |            |
     |     |            |            |            |            |

Goto:   Begin this document End this document UVSI Home-Page

J2. uvlocks.doc - Vancouver Utility File Locking Options & Test Results

test# J2 - TIP/ix ISAM vs COBOL ISAM OUTPUT (seq)

Screen1: TIP/ix - pick a suitable file SMSEC configures files to open for: Input, I-O, or Output. SMFILE configures files to open as: Exclusive, Shared,or NOlocking (SMSEC overrides SMFILE)

Screen2: COBOL batch - could use coblokIE (supplied with Van Utils) COBOL 'lock is' can be: Exclusive, Default(RDonly), Automatic, Manual COBOL files can be opened: Input, I-O, or Output

  TIP/ix   |<---------------- COBOL ISAM OUTPUT -------------->|
 file/lock |                    lock options                   |
  options  |   Exclus   |   Default  |   Auto     |   Manual   |
 ===============================================================
     |     |            |            |            |            |
     | Exc |            |            |            |            |
     |     |            |            |            |            |
     -----------------------------------------------------------
     |     |            |            |            |            |
 IN  | Shr |            |            |            |            |
     |     |            |            |            |            |
     |----------------------------------------------------------
     |     |            |            |            |            |
     |NoLK |            |            |            |            |
     |     |            |            |            |            |
     |     |            |            |            |            |
     | Exc |            |            |            |            |
     |     |            |            |            |            |
     |----------------------------------------------------------
     |     |            |            |            |            |
 I-O | Shr |            |            |            |            |
     |     |            |            |            |            |
     |----------------------------------------------------------
     |     |            |            |            |            |
     |NOLK |            |            |            |            |
     |     |            |            |            |            |
     |     |            |            |            |            |
     | Exc |            |            |            |            |
     |     |            |            |            |            |
     |----------------------------------------------------------
     |     |            |            |            |            |
 OUT | Shr |            |            |            |            |
     |     |            |            |            |            |
     |----------------------------------------------------------
     |     |            |            |            |            |
     |NOLK |            |            |            |            |
     |     |            |            |            |            |

Goto:   Begin this document End this document UVSI Home-Page

J3. uvlocks.doc - Vancouver Utility File Locking Options & Test Results

test# J3 - TIP/ix ISAM vs COBOL ISAM I-O (update)

Screen1: TIP/ix - pick a suitable file SMSEC configures files to open for: Input, I-O, or Output. SMFILE configures files to open as: Exclusive, Shared,or NOlocking (SMSEC overrides SMFILE)

Screen2: COBOL batch - could modify coblokIE (supplied with Van Utils) COBOL 'lock is' can be: Exclusive, Default(RDonly), Automatic, Manual COBOL files can be opened: Input, I-O, or Output

  TIP/ix   |<---------------- COBOL ISAM I-O ----------------->|
 file/lock |                    lock options                   |
  options  |   Exclus   |   Default  |   Auto     |   Manual   |
 ===============================================================
     |     |            |            |            |            |
     | Exc |            |            |            |            |
     |     |            |            |            |            |
     -----------------------------------------------------------
     |     |            |            |            |            |
 IN  | Shr |            |            |            |            |
     |     |            |            |            |            |
     |----------------------------------------------------------
     |     |            |            |            |            |
     |NoLK |            |            |            |            |
     |     |            |            |            |            |
     |     |            |            |            |            |
     | Exc |            |            |            |            |
     |     |            |            |            |            |
     |----------------------------------------------------------
     |     |            |            |            |            |
 I-O | Shr |            |            |            |            |
     |     |            |            |            |            |
     |----------------------------------------------------------
     |     |            |            |            |            |
     |NOLK |            |            |            |            |
     |     |            |            |            |            |
     |     |            |            |            |            |
     | Exc |            |            |            |            |
     |     |            |            |            |            |
     |----------------------------------------------------------
     |     |            |            |            |            |
 OUT | Shr |            |            |            |            |
     |     |            |            |            |            |
     |----------------------------------------------------------
     |     |            |            |            |            |
     |NOLK |            |            |            |            |
     |     |            |            |            |            |

Goto:   Begin this document End this document UVSI Home-Page

K1. uvlocks.doc - Vancouver Utility File Locking Options & Test Results

test# K1 - TIP/ix RELATIVE vs COBOL RELATIVE INPUT

Screen1: TIP/ix - pick a suitable file SMSEC configures files to open for: Input, I-O, or Output. SMFILE configures files to open as: Exclusive, Shared,or NOlocking (SMSEC overrides SMFILE)

Screen2: COBOL batch COBOL 'lock is' can be: Exclusive, Default(RDonly), Automatic, Manual COBOL files can be opened: Input, I-O, or Output

  TIP/ix   |<--------------- COBOL RELATIVE INPUT ------------>|
 file/lock |                     lock options                  |
  options  |   Exclus   |   Default  |   Auto     |   Manual   |
 ===============================================================
     |     |            |            |            |            |
     | Exc |            |            |            |            |
     |     |            |            |            |            |
     -----------------------------------------------------------
     |     |            |            |            |            |
 IN  | Shr |            |            |            |            |
     |     |            |            |            |            |
     |----------------------------------------------------------
     |     |            |            |            |            |
     |NoLK |            |            |            |            |
     |     |            |            |            |            |
     |     |            |            |            |            |
     | Exc |            |            |            |            |
     |     |            |            |            |            |
     |----------------------------------------------------------
     |     |            |            |            |            |
 I-O | Shr |            |            |            |            |
     |     |            |            |            |            |
     |----------------------------------------------------------
     |     |            |            |            |            |
     |NOLK |            |            |            |            |
     |     |            |            |            |            |
     |     |            |            |            |            |
     | Exc |            |            |            |            |
     |     |            |            |            |            |
     |----------------------------------------------------------
     |     |            |            |            |            |
 OUT | Shr |            |            |            |            |
     |     |            |            |            |            |
     |----------------------------------------------------------
     |     |            |            |            |            |
     |NOLK |            |            |            |            |
     |     |            |            |            |            |

Goto:   Begin this document End this document UVSI Home-Page

K2. uvlocks.doc - Vancouver Utility File Locking Options & Test Results

test# K2 - TIP/ix RELATIVE vs COBOL RELATIVE I-O (update)

Screen1: TIP/ix - pick a suitable file SMSEC configures files to open for: Input, I-O, or Output. SMFILE configures files to open as: Exclusive, Shared,or NOlocking (SMSEC overrides SMFILE)

Screen2: COBOL batch COBOL 'lock is' can be: Exclusive, Default(RDonly), Automatic, Manual COBOL files can be opened: Input, I-O, or Output

  TIP/ix   |<--------------- COBOL RELATIVE I-O -------------->|
 file/lock |                    lock options                   |
  options  |   Exclus   |   Default  |   Auto     |   Manual   |
 ===============================================================
     |     |            |            |            |            |
     | Exc |            |            |            |            |
     |     |            |            |            |            |
     -----------------------------------------------------------
     |     |            |            |            |            |
 IN  | Shr |            |            |            |            |
     |     |            |            |            |            |
     |----------------------------------------------------------
     |     |            |            |            |            |
     |NoLK |            |            |            |            |
     |     |            |            |            |            |
     |     |            |            |            |            |
     | Exc |            |            |            |            |
     |     |            |            |            |            |
     |----------------------------------------------------------
     |     |            |            |            |            |
 I-O | Shr |            |            |            |            |
     |     |            |            |            |            |
     |----------------------------------------------------------
     |     |            |            |            |            |
     |NOLK |            |            |            |            |
     |     |            |            |            |            |
     |     |            |            |            |            |
     | Exc |            |            |            |            |
     |     |            |            |            |            |
     |----------------------------------------------------------
     |     |            |            |            |            |
 OUT | Shr |            |            |            |            |
     |     |            |            |            |            |
     |----------------------------------------------------------
     |     |            |            |            |            |
     |NOLK |            |            |            |            |
     |     |            |            |            |            |

Goto:   Begin this document End this document UVSI Home-Page

L1. uvlocks.doc - Vancouver Utility File Locking Options & Test Results

test# L1 - TIP/ix SEQUENTIAL vs COBOL SEQUENTIAL INPUT

Screen1: TIP/ix - pick a suitable file SMSEC configures files to open for: Input, I-O, or Output. SMFILE configures files to open as: Exclusive, Shared,or NOlocking (SMSEC overrides SMFILE)

Screen2: COBOL batch COBOL 'lock is' can be: Exclusive, Default(RDonly), Automatic, Manual COBOL files can be opened: Input, I-O, or Output

  TIP/ix   |<------------ COBOL SEQUENTIAL INPUT ------------->|
 file/lock |                    lock options                   |
  options  |   Exclus   |   Default  |   Auto     |   Manual   |
 ===============================================================
     |     |            |            |            |            |
     | Exc |            |            |            |            |
     |     |            |            |            |            |
     -----------------------------------------------------------
     |     |            |            |            |            |
 IN  | Shr |            |            |            |            |
     |     |            |            |            |            |
     |----------------------------------------------------------
     |     |            |            |            |            |
     |NoLK |            |            |            |            |
     |     |            |            |            |            |
     |     |            |            |            |            |
     | Exc |            |            |            |            |
     |     |            |            |            |            |
     |----------------------------------------------------------
     |     |            |            |            |            |
 I-O | Shr |            |            |            |            |
     |     |            |            |            |            |
     |----------------------------------------------------------
     |     |            |            |            |            |
     |NOLK |            |            |            |            |
     |     |            |            |            |            |
     |     |            |            |            |            |
     | Exc |            |            |            |            |
     |     |            |            |            |            |
     |----------------------------------------------------------
     |     |            |            |            |            |
 OUT | Shr |            |            |            |            |
     |     |            |            |            |            |
     |----------------------------------------------------------
     |     |            |            |            |            |
     |NOLK |            |            |            |            |
     |     |            |            |            |            |

Goto:   Begin this document End this document UVSI Home-Page

L2. uvlocks.doc - Vancouver Utility File Locking Options & Test Results

test# L2 - TIP/ix SEQUENTIAL vs COBOL SEQUENTIAL OUTPUT

Screen1: TIP/ix - pick a suitable file SMSEC configures files to open for: Input, I-O, or Output. SMFILE configures files to open as: Exclusive, Shared,or NOlocking (SMSEC overrides SMFILE)

Screen2: COBOL batch COBOL 'lock is' can be: Exclusive, Default(RDonly), Automatic, Manual COBOL files can be opened: Input, I-O, or Output

  TIP/ix   |<------------ COBOL SEQUENTIAL OUTPUT ------------>|
 file/lock |                    lock options                   |
  options  |   Exclus   |   Default  |   Auto     |   Manual   |
 ===============================================================
     |     |            |            |            |            |
     | Exc |            |            |            |            |
     |     |            |            |            |            |
     -----------------------------------------------------------
     |     |            |            |            |            |
 IN  | Shr |            |            |            |            |
     |     |            |            |            |            |
     |----------------------------------------------------------
     |     |            |            |            |            |
     |NoLK |            |            |            |            |
     |     |            |            |            |            |
     |     |            |            |            |            |
     | Exc |            |            |            |            |
     |     |            |            |            |            |
     |----------------------------------------------------------
     |     |            |            |            |            |
 I-O | Shr |            |            |            |            |
     |     |            |            |            |            |
     |----------------------------------------------------------
     |     |            |            |            |            |
     |NOLK |            |            |            |            |
     |     |            |            |            |            |
     |     |            |            |            |            |
     | Exc |            |            |            |            |
     |     |            |            |            |            |
     |----------------------------------------------------------
     |     |            |            |            |            |
 OUT | Shr |            |            |            |            |
     |     |            |            |            |            |
     |----------------------------------------------------------
     |     |            |            |            |            |
     |NOLK |            |            |            |            |
     |     |            |            |            |            |

Goto:   Begin this document End this document UVSI Home-Page

M1. File Lock Testing - Preparation Procedures

The test results have been presented in the precedding sections (C,D,E,F,G).

You might need to run these tests on your own system, since file locking may be implemented differently on different systems, or you may want to test on new versions of: Micro Focus COBOL, TIP/ix, or Vancouver Utilities.

I suggest you run these tests in your own home directory as follows. We will copy the required programs & test files from ~uvadm subdirectories.

 1a. mkdir tstlock          - setup directory in your home dir for tests
 1b. cd tstlock             - change into test dir
 2a. mkdir dat1 dat2        - setup subdirs for test data file I/O
 2b. mkdir bat1 batx        - setup subdirs for COBOL test program compiles
  1. - - copy non-indexed test data files from ~uvadm to your test subdir - -

3a. cp /home/uvadm/tf/test100 dat1/fileS1 3b. cp /home/uvadm/tf/test100 dat1/fileS2

  1. - - load INDEXED test data files from ~uvadm to your test subdir - -

 4a. uvcp "fili1=/home/uvadm/tf/test100,typ=RSF,rcs=40,
           filo1=dat1/fileI1,typ=ISF,rcs=40,isk1=0(4)"
 4b. uvcp "fili1=/home/uvadm/tf/test100,typ=RSF,rcs=40,
           filo1=dat1/fileI2,typ=ISF,rcs=40,isk1=0(4)"
  1. - - - compile COBOL programs for lock tests - - -

5a. cp /home/uvadm/bat1/coblokSE.bat bat1 - copy supplied programs to subdir 5b. cp /home/uvadm/bat1/coblokIE.bat bat1

5c. mfbat1 coblokSE.bat bat1 batx batx - compile programs 5d. mfbat1 coblokIE.bat bat1 batx batx

note
  • you can copy/rename/modify COBOL programs to test other locking modes
    lock is: Exclusive, Default(omit), Automatic, Manual
  • suggested names for Seqntl: coblokSE,coblokSD,coblokSA,coblokSM
  • suggested names for Indexed: coblokIE,coblokID,coblokIA,coblokIM
 End of preparation, see test execution examples on the next page ------->

Goto:   Begin this document End this document UVSI Home-Page

N1. File Lock Testing - Execution Procedures - using TWO SCREENS

The test results have been presented in the preceding sections (C,D,E,F,G). The operating instructions were briefly presented at the top of each page, but no details (console outputs, errmsgs, etc) were shown. We will show you the details here for the 1st test (shown on page C1).

run waitIS1 on screen 1


 1. uvcopy waitIS1,fili1=dat1/fileI1,typ=ISFl0h0,filo1=dat2/fileI1
    ==============================================================
       uvcopy 9901 19990126 DISAM SCO today=19990126 pf=/u/uv/uvadm/pf/waitIS1
       copyright UV Software Inc. license# 19990126V UV Software Inc.
       waitIS1: dat1/fileI1 copy to: dat2/fileI1, enter to close (after waitIS2)
       -- 1st job WAITS until 2nd job started, then reply here to close 1st
 4. _ <-- null entry to close files & end 1st job (note: command #4)
       EOF fili1 100 rds, 0 wrts, 0 upds, 0 dels, 4100 size, fname=dat1/fileI1
       dat1/fileI1 DISAM  STATS: recs=100,rcsz=40,keys=1
       EOF filo1 0 rds, 100 wrts, 0 upds, 0 dels, 0 size, fname=dat2/fileI1
       dat2/fileI1 DISAM  STATS: recs=100,rcsz=40,keys=1
                     ** run uvcp on screen 2 **
                      (with option 'h0' no-wait)

 2. uvcp fili1=dat1/fileI1,typ=ISFl0h0,rcs=40,filo1=dat2/fileI2
    ===========================================================
       DISAM ERR 113 io 0 stat1 0, opening isam input file dat1/fileI1
       113 - FILE LOCKED  ()
                     ** re-run uvcp on screen 2 **
                      (with option 'h1' for WAIT)

 3. uvcp fili1=dat1/fileI1,typ=ISFl0h1,rcs=40,filo1=dat2/fileI2
    ===========================================================
       waiting 0 seconds for open ISAM input dat1/fileI1
       waiting 10 seconds for open ISAM input dat1/fileI1
       waiting 20 seconds for open ISAM input dat1/fileI1
       -- 2nd job waits until 1st job closed via null entry on screen1
 5.  <--- then 2nd job completes as follows:
       EOF on input, 100 records read  from: dat1/fileI1
       dat1/fileI1 DISAM  STATS: recs=100,rcsz=40,keys=1
       close output, 100 records written to: dat2/fileI2
       dat2/fileI2 DISAM  STATS: recs=100,rcsz=40,keys=1

Goto:   Begin this document End this document UVSI Home-Page

N2. File Lock Testing - Execution Procedures - using BACKGROUND


 1. uvcopy waitSS1,fili1=dat1/fileS1,typ=RSFl0h0,filo1=dat2/fileS1
    ==============================================================
       waitSS1 - test lock on seqntl files
       at prompt: RSFl0=RD/WRlock(dflt), RSFl1=RDonly, RSFl8=nolocks
       uvcopy 9901 19990130 DISAM SCO today=19990130 pf=/u/uv/uvadm/pf/waitSS1
       copyright UV Software Inc. license# 19990130V UV Software Inc.
       waitSS1 at EOF, dat1/fileS1 copied to dat2/fileS1
       waitSS1 enter to close files, after running waitSS2 on screen2

 2. ctl Z         <-- put job1 (uvcopy) into the background
    =====
       [1] + Stopped  uvcopy waitSS1,fili1=dat1/fileS1,typ=RSFl0h0,filo1=...

 3. uvcp fili1=dat1/fileS1,typ=RSFl0h0,rcs=40,filo1=dat2/fileS2
    ===========================================================
       SYSTEM ERR - setlock seqntl input  dat1/fileS1

 4. uvcp fili1=dat1/fileS1,typ=RSFl0h1,rcs=40,filo1=dat2/fileS2
    ===========================================================
                                     ^- rerun with waitlock option
       waiting 0 seconds for open seqntl input dat1/fileS1
       waiting 10 seconds for open seqntl input dat1/fileS1
             ..... etc ....

 5. ctl Z         <-- put job2 (uvcp) into the background
    =====
       [2] + Stopped  uvcp fili1=dat1/fileS1,typ=RSFl0h1,rcs=40,filo1=...

 6. fg %1         <-- bring job1 (uvcopy) back to forground
    =====             uvcopy waitSS1,fili1=dat1/fileS1,typ=RSFl0h0,filo1=...

 7. enter         <-- to terminate job1 & allow job2 to proceed
    =====
       EOF fili1 100 rds, 0 wrts, 4000 size, fname=dat1/fileS1
       EOF filo1 0 rds, 100 wrts, 4000 size, fname=dat2/fileS1
       waitSS1 uvcopy start 1999/01/30_09:57:14 end 09:59:31 elapsed 02:17
  1. fg <-- bring job2 (uvcp) to forground, to see termination msgs == uvcp fili1=dat1/fileS1,typ=RSFl0h0,rcs=40,filo1=...

       EOF on input, 100 records 4000 bytes read  from: dat1/fileS1
       close output, 100 records 4000 bytes written to: dat2/fileS2
        uvcp start 1999/01/30_09:58:06 end 09:59:37 elapsed 01:31

Goto:   Begin this document End this document UVSI Home-Page

O1. Suggested scripts for batch jobs to wait on file locks

You can insert calls to these scripts into your batch jobs at points where you want the job to pause until a lock is cleared on a specified file.

waitlkSS
  • script to wait for lock release on Sequential files
waitlkIS
  • script to wait for lock release on Indexed files
waitSS0
  • uvcopy job called by waitlkSS (opens/closes Seqntl file)
waitIS0
  • uvcopy job called by waitlkIS (opens/closes ISAM file)

waitlkIS

 # waitlkIS - wait for lock release on Indexed file
 #
 # - script to call uvcopy job waitIS0, which will open/close file
 #   causing wait if file locked by another process
 # - script tests file presence & inhibits any action if file not present
 #
 #usage: waitlkIS filename
 #       =================
 #
 if [[ -f "$1" ]]; then
    uvcopy waitIS0,fili1="$1"
 fi
 exit 0

waitIS0

 # waitIS0 - uvcopy job to wait for lock release on Indexed file
 #         - open/close file causes wait if already open by another process
 #
 #usage:  uvcopy waitIS0,fili1=filename
 #        =============================
 #
 #note - intended for script 'waitlkIS', which calls this uvcopy job,
 #       tests for file presence - if not, this job is bypassed.
 #       (see waitlkIS script in /home/uvadm/sf/waitlkIS)
 #
 #note - option 'h1' (on typ=ISFl0h1 below) causes wait on file lock
 #     - option 'l0' is Exclusive RD/WR lock to make wait option effective
 #       (see file typ options in uvcopy1.doc & uvlocks.doc in vol 2)
 #
 fili1=?waitlockfile,rcs=a4000,typ=ISFl0h1    #<-- option l0=Excl,h1=wait
 @run
        mvf    m0(80),'$jobname waiting for close on ISAM file: fff'
        repf   m0(80),'fff',$fili1
        msg    m0(79)
        opn    fili1
        cls    fili1
        eoj

Goto:   Begin this document End this document UVSI Home-Page

P0. uvcopy jobs & COBOL programs used to create Lock Test Results

The uvcopy jobs & COBOL programs are summarized here, and some samples are listed on the following paages.

P1. waitSS1 - uvcopy job to copy Seqntl file & pause before close
P2. waitSS2 - uvcopy job to copy Seqntl file, that may be locked by waitSS1
  or may use equivalent 'uvcp' or 'uvsort'
P3. waitIS1 - uvcopy job to copy ISAM file & pause before close
P4. waitIS2 - uvcopy job to copy ISAM file, that may be locked by waitIS1
  or may use equivalent 'uvcp' or 'uvsort'
P5. coblokSE - COBOL program to copy a Sequential file & pause before close
  allowing waitSS1 (or uvcp) to be run to test file locks
P6. coblokIE - COBOL program to copy an Indexed file & pause before close
  allowing waitIS1 (or uvcp) to be run to test file locks

The following jobs are not listed here, but you can inspect as follows:


 vi $UV/pf/adm/waitIR1
 =====================
waitIR1
  • uvcopy job for ISAM I-O update & pause before close
waitIR2
  • uvcopy job for ISAM I-O update, to file locked by waitIR1
    no equivalent 'uvcp' for ISAM I-O updates

Goto:   Begin this document End this document UVSI Home-Page

P1. uvcopy jobs used to create Lock Test Results

 # waitSS1 - uvcopy job to open/copy sequential file & pause before closing
 #         - used to test 'waitSS2', which waits until filelock released
 #
 # uvcopy waitSS1,fili1=dat1/fileS1,typ=RSFl0,filo1=dat2/fileS2,typ=RSFl0
 # ======================================================================
 #
 #defaults: uvcopy waitSS1    <-- same as above
 #          ==============
 #
 #notes - see pf/waitSS2 using option 'h1' (on typ=RSFh1) to wait on filelock
 #        (see file typ options in uvcopy1.doc in Van Utils vol 2)
 #      - run this job 1st, from another screen or in the background
 #      - could use typ=LST for vi, typ=RSF usual for MF COBOL files
 #      - typ 'b1' buffer=1024 (dflt 8192) so you can see output before close
 #
 opr='$jobname - test lock on seqntl files (waitSS1 on screen1, waitSS2 on screen2)'
 opr='at prompt: RSFl0=RD/WRlock(dflt), RSFl1=RDonly, RSFl8=nolocks'
 fili1=?dat1/fileS1,rcs=40,typ=RSFl0    # 'l0'=RDWRlock, 'b1' buffer 1024
 filo1=?dat2/fileS1,rcs=40,typ=RSFl0
 @run
        opn    fili1                open input file
        opn    filo1                open output file
 #
 # begin loop to copy records until EOF
 loop   get    fili1,a0
        skp>   eof
        put    filo1,a0
        skp    loop
 #
 # EOF - prompt for entry to close files & end job
 eof    mvf    m0(80),'$jobname at EOF, iii copied to ooo'
        repf   m0(80),'iii',$fili1
        repf   m0(80),'ooo',$filo1
        msg    m0(80)
        msgw   '$jobname enter to close files, after running waitSS2 on screen2'
        cls    all                  close files
        eoj                         end job

Goto:   Begin this document End this document UVSI Home-Page

P2. uvcopy jobs used to create Lock Test Results

 # waitSS2 - uvcopy job to wait for lock release on Sequential file
 #        - open file causes wait if already open by another process
 #
 # uvcopy waitSS2,fili1=dat1/fileS1,typ=RSFl0h1,filo1=dat3/fileS1,typ=RSFl0h1
 # ==========================================================================
 #
 #defaults: uvcopy waitSS2       <-- same as above
 #          ==============
 #
 #notes - option 'h1' (on typ=RSFl0h1 below) causes wait on file lock
 #        (see uvlocks.doc  of Van Utils doc)
 #      - see 'pf/waitSS1' uvcopy job to test this job
 #        (copies file & waits for reply to close files)
 #      - see 'sf/waitlock' script, which calls this uvcopy job (waitSS2)
 #        (tests file presence - if not, this job is bypassed)
 #
 opr='$jobname - test lock on seqntl files (waitSS1 on screen1, waitSS2 on screen2)'
 opr='at prompt: RSFl0h1=wait+RDWRlock(dflt), RSFl1h1=RDonly, RSFl8=nolocks'
 fili1=?dat1/fileS1,rcs=40,typ=RSFl0h1  # option l0=RDWRlock, h1=waitlock
 filo1=?dat2/fileS1,rcs=40,typ=RSFl0h1
 @run
        mvf    m0(80),'$jobname test Seqntl filelocks input: iii &/or output: ooo'
        repf   m0(80),'iii',$fili1
        repf   m0(80),'ooo',$filo1
        msg    m0(79)
        opn    fili1               open input file
        opn    filo1               open output file
 #
 # begin loop to copy records until EOF
 loop   get    fili1,a0            get record
        skp>   eof
        put    filo1,a0            write record
        skp    loop                return for next
 #
 eof    cls    all
        eoj

Goto:   Begin this document End this document UVSI Home-Page

P3. uvcopy jobs used to create Lock Test Results

 # waitIS1 - uvcopy job to copy indexed files & wait for enter to close
 #        - then run other jobs to copy same file to test file locks
 #
 # uvcopy waitIS1,fili1=dat1/fileI1,typ=ISFl0,filo1=dat2/fileI1,typ=ISFl0h0
 # ========================================================================
 #
 # uvcopy waitIS1       <-- same (defaults shown above)
 # ==============
 #
 #notes - see waitIS2 using option 'h1' (on typ=ISFh1) to wait on filelock
 #      - run waitIS1 (this job) 1st, from another screen or in background
 #        (see uvlocks.doc )
 #
 fili1=?dat1/fileI1,rcs=40,typ=ISFl0h0            #<-- l0=RDWRlock, h0=nowait
 filo1=?dat2/fileI1,rcs=40,typ=ISFl0h0,isk1=0(4)
 @run
        opn    fili1                open input file
        opn    filo1                open output file
 #
 # begin loop to copy records until EOF detected
 loop   get    fili1,a0             get record
        skp>   eof                  (cc > at EOF)
        put    filo1,a0             write to output file
        skp    loop                 repeat loop
 #
 eof    mvf    m0(80),'$jobname: iii copied to: ooo, enter to close (after waitIS2)'
        repf   m0(80),'iii',$fili1
        repf   m0(80),'ooo',$filo1
        msgwa1 m0(79)
        cls    all                   close file
        eoj                          end job

Goto:   Begin this document End this document UVSI Home-Page

P4. uvcopy jobs used to create Lock Test Results

 # waitIS2 - uvcopy job to copy indexed files to test filelocks
 #        - while running other jobs opening same files
 #
 # uvcopy waitIS2,fili1=dat1/fileI1,typ=ISFl0,filo1=dat2/fileI1,typ=ISFl0h0
 # ========================================================================
 #
 # uvcopy waitIS2       <-- same (defaults shown above)
 # ==============
 #
 #note - 1st run waitIS1, from another screen or in background
 #     - then waitIS2 (this job) using various options to test filelocks
 #       (l0=RDWRlock,l1=RDlock,l8=NOlock, h0=nowait,h1=wait til lock clears)
 #       (see uvlocks.doc )
 #
 fili1=?dat1/fileI1,rcs=40,typ=ISFl0h0     #<-- l0=RDWRlock, h0=nowait
 filo1=?dat2/fileI1,rcs=40,typ=ISFl0h0,isk1=0(4)
 @run
        mvf    m0(80),'$jobname test ISAM filelocks input: iii &/or output: ooo'
        repf   m0(80),'iii',$fili1
        repf   m0(80),'ooo',$filo1
        msg    m0(79)
        opn    fili1                open input file
        opn    filo1                open output file
 #
 # begin loop copy records until EOF
 loop   get    fili1,a0             get record
        skp>   eof                  (cc > at EOF)
        put    filo1,a0             write to output file
        skp    loop                 repeat loop
 #
 eof    cls    all                   close file
        eoj                          end job

Goto:   Begin this document End this document UVSI Home-Page

P5. COBOL programs used to create Lock Test Results

        identification division.
       * coblokSE - program to test file locking on sequential files
       * - this program simply copies an sequential file
       * - pause before close so lock tests can be done on 2nd screen
       * could run the .int program without JCL as follows:
       * 1. export DD_FILE1=inputfile DD_FILE2=outputfile
       * 2. cobrun batx/cobolr
       * This program is coblokSE.bat for Sequential Exclusive tests
       * 'lock is exclusive' <-- modify file lock type below (4 ways)
       * 1=exclusive(RDWRlock), 2=omitted(RDlock), 3=automatic, 4=manual
        program-id. coblokSE.
        environment division.
        configuration section.
        special-names. switch-1 is upsi1 on is upsi1on.
        input-output section.
        file-control.
            select filein assign external file1
                   lock is exclusive
                   organization is record sequential
                   access is sequential.
            select fileout assign external file2
                   lock is exclusive
                   organization is record sequential
                   access is sequential.
        data  division.
        file section.
        fd  filein record contains 40 characters.
            01 filein-rec         pic  x(40).
        fd  fileout record contains 40 characters.
            01 fileout-rec        pic  x(40).
        working-storage section.
        01  filein-eof           pic  x value ' '.
        01  dummy-reply            pic  x(20).
       *
        procedure division.
        mainline.
            if upsi1on open input filein
                  else open i-o filein.
            open output fileout.
            read filein at end move '1' to filein-eof.
            perform dtlrtn until filein-eof = '1'.
            display 'file copied - enter to close files' upon console.
            accept dummy-reply from console.
            close filein fileout.
            display 'files closed, coblok program ending' upon console.
            stop run.
        dtlrtn.
            move filein-rec to fileout-rec.
            write fileout-rec.
            read filein at end move '1' to filein-eof.

Goto:   Begin this document End this document UVSI Home-Page

P6. COBOL programs used to create Lock Test Results

        identification division.
       * coblokIE - program to test file locking on Indexed files
       * - this program simply copies an indexed file
       * - pause before close so lock tests can be done on 2nd screen
       * could run the .int program without JCL as follows:
       * 1. export DD_FILE1=inputfile DD_FILE2=outputfile
       * 2. cobrun batx/cobolr
       * This program is coblokIE.bat for Indexed Exclusive tests
       * 'lock is exclusive' <-- modify file lock type below (4 ways)
       * 1=exclusive(RDWRlock), 2=omitted(RDlock), 3=automatic, 4=manual
        program-id. coblokIE.
        environment division.
        configuration section.
        special-names. switch-1 is upsi1 on is upsi1on.
        input-output section.
        file-control.
            select filein assign external file1
                   lock is exclusive
                   organization is indexed
                   access is sequential
                   record key is inreckey.
            select fileout assign external file2
                   lock is exclusive
                   organization is indexed
                   access is sequential
                   record key is outreckey.
        data  division.
        file section.
        fd  filein record contains 40 characters.
            01 filein-rec.
               05 inreckey        pic  x(4).
               05 inrecdata       pic  x(36).
        fd  fileout record contains 40 characters.
            01 fileout-rec.
               05 outreckey        pic  x(4).
               05 outrecdata       pic  x(36).
        working-storage section.
        01  filein-eof           pic  x value ' '.
        01  dummy-reply            pic  x(20).
       *
        procedure division.
        mainline.
            if upsi1on open input filein
                  else open i-o filein.
            open output fileout.
            read filein at end move '1' to filein-eof.
            perform dtlrtn until filein-eof = '1'.
            display 'file copied - enter to close files' upon console.
            accept dummy-reply from console.
            close filein fileout.
            display 'files closed, coblok program ending' upon console.
            stop run.
        dtlrtn.
            move filein-rec to fileout-rec.
            write fileout-rec.
            read filein at end move '1' to filein-eof.

Goto:   Begin this document End this document UVSI Home-Page

Visitor Counters for ThisYear and LastYear