Previous Topic: ParametersNext Topic: Data Specification


Example 1

This example syntax writes the current output buffer to the data set name referenced by ddname CUSTREC.

READ,
  MOVE(CLEAR),
  MOVE(1,0,1),
  WRITE(CUSTREC)

Example 2

This example syntax writes the current move buffer, the CUST-KEY value of the input record, to the data set names referenced by ddnames CUSTREC and NEWCUST, when CUST-TYPE equals 'NEW'. It also copies these matching records in their entirety to the default outfile SYSUT1O.

COPY,
  LAYOUTFILE(LAYOUT),
  SELRECIF(CUST-TYPE,EQ,C'NEW'),
	MOVE(1,CUST-KEY),
	WRITE(CUSTREC,NEWCUST)

Example 3

This example syntax writes the current work buffer, the entire input record, to the data set names referenced by ddnames CUSTREC, MSTRREC ,and the default outfile SYSUT1O, when CUST-TYPE is equal to 'NEW'.

COPY,
  LAYOUTFILE(LAYOUT),
  SELRECIF(CUST-TYPE,EQ,C'NEW'),
	WRITE(CUSTREC,MSTRREC)