Assembler - FastLoad

Teradata® FastLoad Reference

Product
FastLoad
Release Number
16.20
Published
October 2018
Language
English (United States)
Last Update
2019-02-14
dita:mapPath
ybx1527114222321.ditamap
dita:ditavalPath
ft:empty
dita:id
B035-2411
lifecycle
previous
Product Category
Teradata Tools and Utilities

INMOD routines written in Assembler do not need to be link-edited with other load modules.

Creating and using an Assemble INMOD routine on z/OS

  1. Prepare the INMOD routine source file.
  2. Compile the INMOD program.
  3. Invoke the Teradata FastLoad utility to execute the INMOD routine.

Example

The INMOD routine in the following example reads a record from the input data source and adds a four-byte integer field to the front of the record. The new field contains a sequence record that ranges from one to the total number of input records.

//JLHFAST JOB 1,’FASTLOAD/INMOD’,MSGCLASS=A,CLASS=B,NOTIFY=JLH //
******************************************************************
//* Compile and link-edit the INMOD *
//****************************************************************
//ASMCOMPL EXEC ASMFCL
//****************************************************************
//* The INMOD starts here *
//****************************************************************
//ASM.SYSIN DD *
                 <Assembler source goes here>
/*
//LKED.SYSLMOD DD DSN=JLH.INMOD.LOAD,DISP=SHR
//LKED.SYSIN DD *
NAME ASMINMOD(R)
/*
//****************************************************************
//* Execute BTEQ to create a Teradata DBS table *
//* *
//* The BTEQ statement .run ddname=logon allows the user to *
//* place sensitive logon information in a secure data set (in *
//* this case, the ddname is logon). Logging on from a data *
//* set prevents this sensitive information from appearing in *
//* the SYSIN file. *
//****************************************************************
/*
//BTEQ EXEC TDSBTEQ
//LOGON DD DSN=JLH.CNTL(JLHLOGON),DISP=SHR
//SYSIN DD DATA,DLM=##
.run ddname=logon
drop table asm_example;
drop table asm_error1;
drop table asm_error2;
create table asm_example (f1 INTEGER, f2 CHAR(80))
primary index(f1);
.quit
##
//*
//******************************************************************
//* Execute FastLoad *
//******************************************************************
//FAST EXEC TDSFAST
//FASTLOAD.STEPLIB DD
// DD DSN=JLH.INMOD.LOAD,DISP=SHR
//FASTLOAD.SYSIN DD DSN=JLH.CNTL(JLHLOGON),DISP=SHR
// DD DATA,DLM=$$
BEGIN LOADING asm_example ERRORFILES asm_error1,asm_error2;
DEFINE T1 (integer), T2 (CHAR(80)) INMOD=ASMINMOD;
INSERT asm_example (:t1,:t2);
END LOADING;
LOGOFF;
$$
//FASTLOAD.INDATA DDDSN=JLH.ASMXMPL.DATA,DISP=SHR
//****************************************************************
//* Using BTEQ, select the rows loaded by FastLoad *
//****************************************************************
//BTEQ EXEC TDSBTEQ
//LOGON DD DSN=JLH.CNTL(JLHLOGON),DISP=SHR
//SYSIN DD DATA,DLM=##
.runddname logon
select * from asm_example order by 1;
.quit
##