z/OS DFSORT Application Programming Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Records in OVLY member

z/OS DFSORT Application Programming Guide
SC23-6878-00

  OPTION COPY
  INREC OVERLAY=(59:JP1)

This example illustrates how you can use a JCL PROC symbol in a DFSORT control statement.

The JCL PROC symbol is DAY which will be set to a 1 character numeric value (2 in this example), and used to overlay the number of days in the SELECT statement (in the SEL member).

PARM='JP1"&DAY"' is used to create a DFSORT symbol named JP1 containing a string with the DAY value.

The SYMNOUT listing will show the following:
------ SYMNAMES STATEMENTS FROM EXEC PARM -------
JP1,S'2'

------------------ SYMBOL TABLE -----------------
JP1,C'2'
The DFSORT INREC statement in the OVLY member uses JP1. It will be transformed to:
  INREC OVERLAY=(59:C'2')
and used to change the SELECT statement to the following in SORTOUT:
SELECT * FROM MYTABLE WHERE TM_RECEIPT >= (CURRENT DATE - 2 DAYS)

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014