Specifying the ddname
If the FILEDEF command is issued for a program
input or output file, the ddname must be the same as the ddname or
file name specified for the file in the source program. For example,
you can have an assembler language source program that contains the
line:
INFILE DCB DDNAME=INPUTDD,MACRF=(GL),
DSORG=PS,RECFM=F,LRECL=80
If you want to use the CMS file MYINPUT FILE A1 as your input file,
you must issue a FILEDEF for this file before executing the program.
FILEDEF INPUTDD DISK MYINPUT FILE A1
When
you want to read or write to the file, MYINPUT FILE A1, your program
can refer to it using the ddname, INPUTDD. If the input file
you want to use is on an OS/MVS disk accessed as your C-disk and it
has a data set name of PAYROLL.RECORDS.AUGUST, then your FILEDEF command
might be:
FILEDEF INPUTDD C1 DSN PAYROLL.RECORDS.AUGUST
The ddname,
INPUTDD, is now associated with the OS/MVS file, PAYROLL.RECORDS.AUGUST.