Macro Example | Define the ddname of the Export File | Basic Teradata Query - Defining the ddname of the Export File - Basic Teradata Query

Basic Teradata® Query Reference - 20.00

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
Lake
VMware
Product
Basic Teradata Query
Release Number
20.00
Published
October 2023
ft:locale
en-US
ft:lastEdition
2025-04-02
dita:mapPath
gxl1691484661681.ditamap
dita:ditavalPath
obe1474387269547.ditaval
dita:id
psp1479308573013
Product Category
Teradata Tools and Utilities

After creating the macro, use the appropriate syntax to define the ddname of the export file as follows:

Operating System Export File Syntax
z/OS
//EXPORT EXEC TDSBTEQ,
// L='logon string'
//REPORT DD DSN=your.report.dataname,DISP=(,KEEP),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=6160),
// SPACE=(TRK,(5,5))
//SYSIN DD DISP=SHR,DSN=your.BTEQ.input
On z/OS, if the TSO command is used to define the ddname of the export file in the input stream file, it is not necessary to define the ddname in the CLIST. The input stream might include a command similar to the following example:
.TSO ALLOCATE DDNAME(repfile) DSNAME(your.report.dataname) SHR

An ALLOCATE statement must be used for TSO.