File record number in mload

Tools & Utilities
Junior Supporter

File record number in mload

Hi all.

I'm trying to find a way to get the record number (recno) of a record in the INFILE and use it as an insert value, but I've not been able to sort it out.

I've tried &SYSRCDCNT in several ways, but still no avail.

TIA.

Cheers.

Carlos.
5 REPLIES
Teradata Employee

Re: File record number in mload

Use an IDENTITY column:

http://www.teradataforum.com/teradata/20040526_023940.htm
Junior Supporter

Re: File record number in mload

Jeff:

If I wanted to use an IDENTITY column, I would have used it.

My requirement -and I think I expressed it specifically- is to use the file record number.

If there is a way in multiload to access the record number, and you know it, and you are so kind to provide it, OK.

Otherwise, don't throw 'wise guy' answers.

Cheers.

Carlos.
Teradata Employee

Re: File record number in mload

This was not a wise guy answer. Thanks for the wonderful feed back.
Enthusiast

Re: File record number in mload

To my knowledge neither FastLoad or MultiLoad have a mechanism to allow you to perform this task.
Your two options are (as previously, correctly suggested) firstly to use an Identity column (although record numbering will not be sequential), or secondly to develop an INMOD/Batch script (Unix shell script is an alternative) to modify the data file before the load takes place.
Junior Supporter

Re: File record number in mload

>>"To my knowledge neither FastLoad or MultiLoad have a mechanism to allow you to perform this task."

OK. Many Thanks. This was the answer that I was looking for.

>>"Your two options are (as previously, correctly suggested) firstly to use an Identity column (although record numbering will not be sequential),"

Wrong. Identity column was not 'correctly suggested' since my requirement demands a relationship between the file record number and one attribute (column) in the table.

>>" or secondly to develop an INMOD/Batch script (Unix shell script is an alternative) to modify the data file before the load takes place."

Yup. The shell scripting was the way I took...

Thanks.

Cheers.

Carlos.