Sample FILECOPY Runs

The following text contains several examples of running FILECOPY. Although up to five of the examples shown can be strung together as shown in the <input to filecopy> syntax, this stringing is not done here. Each example illustrates several features of the program.

Example 1

The following example copies all usercoded files on the diskpack PK that are EXPIRED and then, following the operator's OK, removes them. Files chosen for copying are those whose LASTACCESSDATE modifier value, plus the minimum of 60 or the file SAVEFACTOR value, is less than or equal to August 31, 2001. However, no files under the usercode of SITE are copied or removed, even though they can meet the expired criteria. FILECOPY generates a WFL file and uses the ZIP command to start the job. The library maintenance statement generated is COPY&COMPARE&BACKUP. By default, files are copied to a tape named EXPIRED.

EXPIRED AFTER 8/31/2001 FILES (USERCODE/= FROM PK (PACK))
EXCLUDE ((SITE)= FROM PK (KIND=PACK))
COMPARE BACKUP REMOVE

Example 2

This example copies all files created or altered on the pack SAFEPACK prior to 12:30 on September 10. However, BD files and the file whose name is SYMBOL/MCP are not copied. An index file of all copied files is created with the name SAFETY/DUMP. The files are copied to a tape named UPDATED by default.

UPDATED BEFORE 9/10/90 @ 1230 FILES (= FROM SAFEPACK
(KIND=PACK))
EXCLUDE (*BD/=, *SYMBOL/MCP
FROM SAFEPACK (PACK))
LOCKINDEX INDEXLABEL SAFETY/DUMP

Example 3

This example copies all files on DISK that are not listed in the index file SAFETY/DUMP and whose creation date is less than the creation date of SAFETY/DUMP. Library maintenance is to give the tape the name ADDER.

ADDED SINCE SAFETY/DUMP FILES (=) TO ADDER

Example 4

The following example copies all usercoded files on the default family DISK whose LASTACCESSDATE modifier value, plus the minimum of 14 or the file SAVEFACTOR value, is less than or equal to September 15, 2000. Also, all files whose first node is SYSTEM and the file named ADM are copied even if they are not usercoded or do not meet the EXPIRED criteria. Several volumes are created. These volumes are on tape and are labeled AHOLDUSERS, IROLDUSERS, and SZOLDUSERS. Each volume contains only files whose first title character falls within the bounds indicated by the leading two characters of the tape label.

EXPIRED AFTER 9/15/2000 SAVECONSTANT 14
PARTITION (A-H,S-Z) FILES (USERCODE/=)
INCLUDE (SYSTEM/=, ADM) TO OLDUSERS

Example 5

This example copies all usercoded files created after September 21, 1997, that are not MCPCODE files. However, the INCLUDE option overrides the CREATED criteria and the EXCLUDE list; therefore, all files under the usercode of SITE are copied even if they were created before September 21, 1997 or are MCPCODE files. FILECOPY starts the WFL job and saves the WFL job as the file SAVEWFL ON X.

CREATED AFTER 9/21/97 FILES (USERCODE/=)
EXCLUDE FILEKIND (MCPCODE)
INCLUDE ((SITE)=) LOCKDECK DECKLABEL SAVEWFL ON X

Example 6

This example illustrates a syntax error. Due to the multiple volumes that are created (AHX, IPX, QZX), compliance with the SERIALNO request is impossible. Hence, this task (and any others requested in the same run) is not run. Instead, the syntax error message “PARTITIONING, SERIAL S NOT OK” appears.

CREATED AFTER 9/1/1998 FILES (USERCODE/=)
PARTITION (I-P) TO X (SERIALNO=123)

Example 7

This example copies all usercoded files on disk (not MYPACK) that were updated the day FILECOPY is to run. The index file and output WFL job file are locked on a pack named MYPACK under the usercode PRIV with titles (PRIV)SAVEINDEX and (PRIV)SAVEDECK.

Family substitution does not apply to files accessed by FILECOPY. However, input and output files used or created by FILECOPY are affected by family substitution. For FILECOPY runs that do not use family substitution, output files are created on the family on which FILECOPY resides, unless requested from some other family.

BEGIN JOB RUNFILECOPY; USER=PRIV/ILEGED;
FAMILY DISK=MYPACK OTHERWISE DISK;
RUN  SYSTEM/FILECOPY ON DISK; EBCDIC CARD
UPDATED
     FILES(USERCODE/= FROM DISK)
     LOCKINDEX LABELINDEX SAVEINDEX
     LOCKDECK DECKLABEL SAVEDECK
?END JOB

Example 8

This example copies all usercoded files on disk (not MYPACK) that were updated the day FILECOPY is to be run. The index file is locked on a pack named MYPACK with the title *SAVEINDEX. The output WFL job is locked on a pack named CONTROL with the title *SAVEDECK.

BEGIN JOB RUNFILECOPY; USER=PRIV/ILEGED;
FAMILY DISK=MYPACK OTHERWISE DISK;
RUN SYSTEM/FILECOPY ON DISK; EBCDIC CARD
UPDATED
     FILES(USERCODE/= FROM DISK)
     LOCKINDEX LABELINDEX *SAVEINDEX
     LOCKDECK DECKLABEL *SAVEDECK ON CONTROL
?END JOB

Example 9

In this example, the privileged usercode has no family associated with It. All usercoded files on TEMP that were updated the day FILECOPY is run are to be copied. The index file is locked on the pack from which FILECOPY is being run (UTILPACK) and is titled (PRIV)SAVEINDEX.

BEGIN JOB RUNFILECOPY; USER=PRIV/ILEGED;
RUN  SYSTEM/FILECOPY ON UTILPACK; EBCDIC CARD
UPDATED
     FILES(USERCODE/= FROM TEMP(KIND=PACK))
     LOCKINDEX LABELINDEX SAVEINDEX
?END JOB

Example 10

This example includes a destination specification that produces a compressed tape.

BEGIN JOB
FAMILY DISK=MYDISK OTHERWISE DISK;
RUN SYSTEM/FILECOPY; EBCDIC CARD
CREATED BETWEEN 3/2/93-3/27/93
FILES (= FROM MYDISK) TO MYTAPE(KIND=TAPE, SERIALNO=("BACKUP"),
    COMPRESSIONCONTROL=USER, COMPRESSIONREQUESTED=TRUE)
    EXCLUDE FILEKIND (CDATA) VERIF
?END JOB

Example 11

This example includes a destination specification that produces a noncompressed tape.

BEGIN JOB
RUNFILECOPY
FAMILY DISK=MYDISK OTHERWISE DISK;
RUN SYSTEM/FILECOPY; EBCDIC CARD
CREATED BETWEEN 3/2/93-3/27/93
FILES (= FROM MYDISK) TO MYTAPE(KIND=TAPE, SERIALNO=("BACKUP"),
    COMPRESSIONCONTROL=USER, COMPRESSIONREQUESTED=FALSE)
    EXCLUDE FILEKIND (CDATA) VERIF
?END JOB

Example 12

This example copies all files on pack SAFEPACK. However, files with names whose first nodes are four characters long and begin with BD are excluded. The files are copied to a tape named UPDATED by default.

ALLFILES FILES (=FROM SAFEPACK (KIND=PACK))
EXCLUDE (BD??/=FROM SAFEPACK (PACK))

Example 13

This example copies all files from XPACK that were created on XPACK, altered on XPACK, copied to XPACK, or changed on XPACK after 6 PM on April 12, 1998.

ANYUPDATE AFTER 4/12/1998 @ 1800
FILES (=FROM XPACK) TO XTAPE (KIND=TAPE, SERIALNO=("555555"))

Example 14

This example modifies the program from the previous example by adding a Savefactor definition for the output tape file.

ANYUPDATE AFTER 4/12/1998 @ 1800
FILES (=FROM XPACK) TO XTAPE (KIND=TAPE, SERIALNO=("555555"),
SAVEFACTOR = 365)

Example 15

This example illustrates the use of the JOBNAME option:

 ANYUP AFTER 02/14/01 @ 0700
 FILES( (???)= FROM SUPPORT)
 TO FCOPY(KIND=TAPE,AUTOUNLOAD=ON)
 JOBNAME ANYUP021401
 LOCKDECK DECKLABEL FCZIP/JOBNAME1 ON X

Example 16

The following example illustrates the use of the LOCATECAPABLE FILECOPY modifier and the SKIPEXCLUSIVE option:

 ALLFILES FILES ((TEST) = FROM TEST)
 TO LNAME1 SERIALNO=111222 LOCATECAPABLE=ON
 BACKUP SKIPEXCLUSIVE
 COMPRESSIONREQUESTED = FALSE
 NOZIP LOCKDECK DECKLABEL FCZIP/SKPLOC1 ON TEST

Example 17

The following FILECOPY deck illustrates the syntax for copying files from DISK to CD-ROM and the use of the CDCOPIES option:

ALLFILES FILES (DAT= FROM SUPPORT) TO CD071905
(KIND=CD, CDCOPIES=2),
JOBSYMBOL
LOCKDECK DECKLABEL FCZIP/CDCOPY1 ON SUPPORT

Example 18

The following example demonstrates the use of the INCLUDE FILEKIND option. It copies all COBOL74SYMBOL and COBOL85SYMBOL files from the specified directories to tape:

ALLFILES
 FILES ((UC1)SYMBOL/=  FROM USER1,
     (UC2)SYMBOL/=  FROM USER1) 
 TO COBOLSYMBOLS (TAPE) 
INCLUDE FILEKIND (COBOL74SYMBOL) 
INCLUDE FILEKIND (COBOL85SYMBOL) 
NOZIP LOCKDECK DECKLABEL JOB/FILECOPY/COBOLFILES 

Example 19

The following example demonstrates the use of the WRAPLABEL option. It wraps the specified files into a container file named TEST.CON.

BEGIN JOB RUNFILECOPY;
FAMILY DISK=MYDISK OTHERWISE DISK;
RUN SYSTEM/FILECOPY; EBCDIC CARD
ALLFILES FILES(=FROM PACK) TO PACK
JOBSYMBOL
WRAPLABEL TEST
LOCKDECK DECKLABEL JOB/FILECOPY
NOZIP
?END JOB