DB2 table Created with Name more than 10 character in as400

We can create a table in AS400 using the DB2 create command which will be saved as PF file in AS400 with the same name if the name is <= 10 character because as400 object name is limited to 10 character

So when we create a table with name more than 10 character, system will allow you to create the table and even let you access the table using STRSQL or any other external application which use DB2 query. But the PF will not be saved in same name as it is more than 10 character. instead it will be saved as something like 'TBL_D00001' if you created a table as 'TBL_DIV_TYPE' which is 12 character long.

But the table can be accessed in program using EXEC sql with the name 'TBL_DIV_TYPE' and file can be declared as ''TBL_D00001' other db2 application can use the original name.

This relation between the DB2 table name and the AS400 file name is maintained or identified in SYSTABLES file DB2 name will be TABLE_NAME and as400 file name will be stored in SYSTEM_TABLE_NAME
Also in qsys/QADBXREF where DBXFIL is the AS400 file name and DBXLFI is the actual table name. Note SYSTABLES is a logical of QADBXREF file.

Comments

Popular posts from this blog

AS400 : Add a new line in text in email SNDSMTPEMM

AS400 Display: Radio Button (SNGCHCFLD)

AS400 Display File: Check Box (MLTCHCFLD)