Archives of the TeradataForum
Message Posted: Fri, 09 Feb 2001 @ 14:25:27 GMT
I've used the variables that you mentioned on a few occasions and they always seem to work fine.
In the cases where I used them, I typically exported them using the "DISPLAY xxxx TO FILE xxx" command and then loaded this data using Bteq. I have successfully issued insert/update commands using these variables within the Multiload script itself, but I couldn't find anything in the Multiload documentation about doing this within the script, so I took the safe route.
The (partial) DISPLAY commands that I used were;
DISPLAY '1 ET &SCRIPT &PROCNAME &RUNNBR &RUNDATE &SYSETCNT1' TO FILE JOBSTATS;
.IF &NUMTABS >= 2 THEN;
The non-standard variables (&NUMTABS, &SCRIPT etc) are all set or read in (using .ACCEPT) earlier on in the Multiload script.
The &NUMTABS variable was used so that I could simply have a standard piece of code (executed using a .RUN FILE command) to handle any Multiload script. It catered for 1-5 tables.
One thing to watch for when using the DISPLAY command to generate data to be read in by Bteq. Because it gets difficult to load variable format records using Bteq, ensure that every record written out by these commands is the same format. All columns neatly lined up etc. In the cases that I've used them, that also means ensuring that when setting the variable values (&SCRIPT for example) you need to pad short values with blanks.
If you want any more info drop me a line.
P.S. I don't think these variables are related to a specific release of Teradata. They're Multiload variables, were introduced with Mload 6 - or earlier - and can be used against most versions of the Teradata rdbms.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 27 Dec 2016|