... 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
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
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.
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.
Goto: Begin this document , End this document , UVSI Home-Page
h1 |
|
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_ |
|
l0 |
|
l1 |
|
l2 |
|
l4 |
|
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 |
|
Goto: Begin this document , End this document , UVSI Home-Page
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 | | | | | | | | |
Goto: Begin this document , End this document , UVSI Home-Page
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 | | | | | | | | |
Goto: Begin this document , End this document , UVSI Home-Page
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 | | | | | | | | |
Goto: Begin this document , End this document , UVSI Home-Page
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 | | | | | | | | |
Goto: Begin this document , End this document , UVSI Home-Page
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 | | | | | | | | |
Goto: Begin this document , End this document , UVSI Home-Page
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 | | | | | | | | | |-------------------------------------------------------------------
Goto: Begin this document , End this document , UVSI Home-Page
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 | | | | | | | | |
Goto: Begin this document , End this document , UVSI Home-Page
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 | | | | | | | | |
Goto: Begin this document , End this document , UVSI Home-Page
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 | | | | | | | | |
Goto: Begin this document , End this document , UVSI Home-Page
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 | | | | | | | | | |
Goto: Begin this document , End this document , UVSI Home-Page
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 | | | | | | | | |
Goto: Begin this document , End this document , UVSI Home-Page
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) | | | | | | |
Goto: Begin this document , End this document , UVSI Home-Page
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) | | | | | | |
Goto: Begin this document , End this document , UVSI Home-Page
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) | | | | | | |
Goto: Begin this document , End this document , UVSI Home-Page
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) | | | | | | |
Goto: Begin this document , End this document , UVSI Home-Page
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) | | | | | | |
Goto: Begin this document , End this document , UVSI Home-Page
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) | | | | | | |
Goto: Begin this document , End this document , UVSI Home-Page
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) | | | | | | |
Goto: Begin this document , End this document , UVSI Home-Page
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) | | | | | | |
Goto: Begin this document , End this document , UVSI Home-Page
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) | | | | | | |
Goto: Begin this document , End this document , UVSI Home-Page
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) | | | | | | |
Goto: Begin this document , End this document , UVSI Home-Page
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
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
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
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
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
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
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
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
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
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
3a. cp /home/uvadm/tf/test100 dat1/fileS1 3b. cp /home/uvadm/tf/test100 dat1/fileS2
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)"
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 |
|
End of preparation, see test execution examples on the next page ------->
Goto: Begin this document , End this document , UVSI Home-Page
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).
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
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
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
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 |
|
waitlkIS |
|
waitSS0 |
|
waitIS0 |
|
# 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 - 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
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 |
|
waitIR2 |
|
Goto: Begin this document , End this document , UVSI Home-Page
# 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
# 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
# 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
# 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
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
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