Chapter 4 Solutions to Module 4 File Transfer
Lesson 1 Using FCOPY
Q 4-1 When you copy files between account groups, you
need to include source and destination group
information.
Q 4-2 When copying a file to another account, you need to
include the file's current group and account
location.
FCOPY FROM=MYJOB1.PUB.ACCTx
;TO=MYJOB1.group;NEW
Exercise 4-2 Appending One File to Another
4. JOBX consists of 16 records.
6. JOBX consists of 27 records.
7. FCOPY FROM=JOB3;TO=*F1
8. JOBX consists of 38 records.
9. FCOPY FROM=JOB0;TO=*F1
10. JOBX now consists of 49 records.
11. PURGE JOBX
********** End of Exercise 4-2 *******
Q 4-3 FILE OUT;DEV=LP
FCOPY FROM=MYJOB2.PUB.ACCTx;TO=*OUT
Q 4-4 You need to add an asterisk before the T (tape file
name) in the FCOPY command in order to copy the
file to tape.
FCOPY FROM=MYJOB1.PUB.ACCTx;TO=*T
Exercise 4-3: Lesson 1 Review
1.
--------------------------------------------------------------------------------------------------------
| | | | | | |
| | Tasks | Within | Within | Acct to | Device to |
| | | Group | Account | Acct | Device |
| | | | | | |
--------------------------------------------------------------------------------------------------------
| | | | | | |
| a. | Release file before copying. | | | X | |
| | | | | | |
--------------------------------------------------------------------------------------------------------
| | | | | | |
| b. | Define the device file(s). | | | | X |
| | | | | | |
--------------------------------------------------------------------------------------------------------
| | | | | | |
| c. | Fully qualify the file names | | | X | |
| | (name.group.account). | | | | |
| | | | | | |
--------------------------------------------------------------------------------------------------------
| | | | | | |
| d. | Backreference device file names | | | | X |
| | with asterisks. | | | | |
| | | | | | |
--------------------------------------------------------------------------------------------------------
| | | | | | |
| e. | Require only the FROM file name and | X | | | |
| | the TO file name. | | | | |
| | | | | | |
--------------------------------------------------------------------------------------------------------
| | | | | | |
| f. | Be in the destination account when | | | X | |
| | you issue the FCOPY command. | | | | |
| | | | | | |
--------------------------------------------------------------------------------------------------------
| | | | | | |
| g. | Secure the file after copying. | | | X | |
| | | | | | |
--------------------------------------------------------------------------------------------------------
| | | | | | |
| h. | Note the group names for the source | | X | | |
| | and destination file locations. | | | | |
| | | | | | |
--------------------------------------------------------------------------------------------------------
2. FCOPY FROM=DEPTCEN.CLASS.FINANCE
;TO=DEPTCEN.PROJECT;NEW
3. FILE T;DEV=TAPE;REC=-80,,F,ASCII
FCOPY FROM=MYFILE1.CLASS.ADVUSER;TO=*T
4. The correct sequence follows:
-------------------------------------------------------------------------------------------
| |
| Step Action |
| |
-------------------------------------------------------------------------------------------
| |
| b. Release the file. |
| |
| d. Log on to the destination account. |
| |
| c. Enter the FCOPY command. |
| |
| e. Use LISTFILE to check the copy transfer. |
| |
| a. Log on to the source account and secure the original file. |
| |
-------------------------------------------------------------------------------------------
********** End of Exercise 4-3 ***********