× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Ricky,

I presume the file was created with SQL.  You can modify the create statement 
as follows to keep the long field names and get short field names.

column-definition
Defines the attributes of a column. There must be at least one column definition
and no more than 8000 column definitions.
The sum of the row buffer byte counts of the columns must not be greater than
32766 or, if a VARCHAR or VARGRAPHIC column is specified, 32740.
Additionally, if a LOB is specified, the sum of the row data byte counts of the
columns must not be greater than 3 758 096 383 at the time of insert or update. 
For
information on the byte counts of columns according to data type, see "Notes" on
page 550.
column-name
Names a column of the table. Do not qualify column-name and do not use the
same name for more than one column of the table or for a system-column-name
of the table.
FOR COLUMN system-column-name
Provides an OS/400 name for the column. Do not use the same name for more
than one column of the table or for a column-name of the table.
If the system-column-name is not specified, and the column-name is not a
valid system-column-name, a system column name is generated. For more
information about how system column names are generated, see "Rules for
Column Name Generation" on page 553.

For example:

-- Create control file table                   
Create table rcheva1/utpdef (                  
   UT_Company   FOR UTCMP# dec(3,0)  NOT NULL, 
   UT_Key_Kind  FOR UTTKK   char(10)  NOT NULL,
   UT_Key_Value FOR UTKV   char(10)  NOT NULL, 
   UT_Desc      FOR UTKVDS char(30)  NOT NULL, 
   UT_Char30_1  FOR UTCH01 char(30)  NOT NULL, 
   UT_Char30_2  FOR UTCH02 char(30)  NOT NULL, 
   UT_Char30_3  FOR UTCH03 char(30)  NOT NULL, 
   UT_Char20_1  FOR UTCH04 char(20)  NOT NULL, 
   UT_Char2_1   FOR UTCH05 char(2)   NOT NULL, 
   UT_Char5_1   FOR UTCH06 char(5)   NOT NULL, 
   UT_Char4_1   FOR UTCH07 char(4)   NOT NULL, 
   UT_Char10_1  FOR UTCH08 char(10)  NOT NULL, 
   UT_Char10_2  FOR UTCH09 char(10)  NOT NULL, 
   UT_Char10_3  FOR UTCH10 char(10)  NOT NULL, 
   UT_Char10_4  FOR UTCH11 char(10)  NOT NULL, 
   UT_Char10_5  FOR UTCH12 char(10)  NOT NULL, 
   UT_Char3_1   FOR UTCH13 char(3)   NOT NULL,  ...

HTH,

Rick

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Ricky Thompson
Sent: Tuesday, December 06, 2005 10:32 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: Long SQL Field Names in RPG


We had a PC/SQL programmer create a file with Long Field Names (ie
Product_Number).  Or course RPG sees this field as PRODU00001.  Is there a
way to make RPG see the long name or is there a way I can rename the short
name in this file to make it more user friendly in RPG? 


Privileged and Confidential.  This e-mail, and any attachments there to, is 
intended only for use by the addressee(s) named herein and may contain 
privileged or confidential information.  If you have received this e-mail in 
error, please notify me immediately by a return e-mail and delete this e-mail.  
You are hereby notified that any dissemination, distribution or copying of this 
e-mail and/or any attachments thereto, is strictly prohibited.


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.