7.3 MD Files - Copying and Deleting MD files
In this exercise, you will copy MD file data from one file to another on
the workstation and delete an MD file.
- Use the DMAP command to see if there
are any local MD files in the range 4000 to 4005.
If you already have MD files in this range, select another range of 6
files you can use. (try 4010-4015, then 4020-4025, etc).
- Type: DMAP MDXX400
- Create a local dataset name for the test MD files in the MYDATA group.
- Type: DSSERVE ADD MYDATA/TEST-PTSRCS MD 4000 4005
- Copy the contents of BLIZZARD/PTSRCS.4 to MYDATA/TEST-PTSRCS.1 (MD file 4000),
and change the file description to CASE STUDY.
- Type: PTCOPY BLIZZARD/PTSRCS.4 MYDATA/TEST-PTSRCS.1 DEL=YES TITLE='CASE STUDY'
- Once the PTCOPY is done, list the MD file headers to verify that the MD file was copied.
- Type: PTLIST BLIZZARD/PTSRCS.4 FORM=FILE
- Type: PTLIST MYDATA/TEST-PTSRCS.1 FORM=FILE
- In step 3, you copied all of the data available in BLIZZARD/PTSRCS.4 to
your local dataset.
You may also choose which data to copy by using the SELECT clause.
Copy just the 12Z mandatory upper air data from selected states
to position 2 of your local dataset (MD file 4001).
Type: PTCOPY BLIZZARD/UPPERMAND.1 MYDATA/TEST-PTSRCS.2
SEL='DAY 93072;TIME 12;ST MD,VA,NC,SC,GA'
- List the data that you just copied.
Type:PTLIST MYDATA/TEST-PTSRCS.2 PARAM=DAY TIME ST IDN NUM=ALL
Only data from the seven stations in the five states listed in step 6
should be included in the output.
- Since you won't be using MD file 4000 any longer, delete it.
- Type: MDU DEL 4000