1:LABEL parameter是在使用磁带上的数据作为输入,输出时使用的,也就是说当DD Statements中的UNIT=TAPE时,我们才使用LABEL参数
2:磁带上的数据存储格式
--------------------------------------------------------------------------------------------------------------
| VOL1 | HDR1 | DATA SET 1 | EOF1 | HDR2 | DATA SET 2 | EOF2 |......| EOV1 |
--------------------------------------------------------------------------------------------------------------
卷标1头 文件1 文件1 文件1 .... 卷标1尾
头标 尾标
(header label) (trailer label)
3:LABEL参数一般格式 LABEL=(Relative File,Label Type)
如LABEL=(1,SL)表示:使用磁带上的文件1,将头标,尾标作为标准label处理。
LABEL TYPE总结
SL:Indicates that a data set has IBM standard labels. If this subparameter is omitted, SL is the default.
SUL:Indicates that a data set has both IBM standard and user labels.
NSL:Indicates that a tape data set has nonstandard labels.
NL:Indicates that a tape data set has no labels.
AL:Indicates that a tape data set has ISO/ANSI Version 1 or ISO/ANSI/FIPS Version 3 labels.
AUL:Indicates that a tape data set has user labels and ISO/ANSI Version 1 or ISO/ANSI/FIPS Version 3 labels.
BLP:Requests that the system bypass label processing for a tape data set.
4:一个实际的例子
//TAPETAPE JOB ...
//STEP1 EXEC PGM=IEBCOMPR
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSNAME=DATASET1,UNIT=tape,LABEL=(1,SUL),...
//SYSUT2 DD DSNAME=DATASET2,UNIT=tape,LABEL=(2,SUL),...
//SYSIN DD *
COMPARE TYPORG=PS
LABELS DATA=NO
/*
作用:将SYSUT1指定磁带上的文件1和SYSUT2指定的磁带上的文件2进行比较,
且文件的头标和尾标不作为数据进行比较。