× 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.



Rick,

Now your member name is the same name as the record format name and
several of the native commands assume the member name to be the same as
the file name.
Do you leave this or rename the member to be the same name as the file name?
If you rename it, can you do it in SQL or do you have to use the RNMM
command.

Tks,

Glenn Gundermann
ggundermann@xxxxxx
(647) 272-3295


A helpful hint, for those who are using 'create table' for the first time.

Since SQL doesn't know what a record format is, when using the create
table DDL to build physicals it names it the same as the table.

You have two choices when using them natively in RPG, since the record
format can't be the same as the file name.

You can rename the record format on all the F' specs in the RPG
programs that use them, or you can do this little trick, creating the
table as the record format name and then renaming it - the record
format stays the same.

My SQL create table source look like this:

-- create table (name is the record format name, not table)

create table
mylib/myfiler
(

fld_one for column MFFLD1 character(7) not null default ' ',
fld_two for column MFFLD2 character(20) not null default ' ',

primary key(
MFFLD1
)
) ;

--- rename table so that record name is different than table name

rename table mylib/myfiler
to system name myfile;

--- text on table

label on table
mylib/myfile is 'my table description ' ;

--- set column headings

label on column

(
MFFLD1 is 'Field One ' ,
MFFLD2 is 'Field Two '
) ;

--- set text (optional, it will use colhdg if not included)

label on column
mylib/myfile

(
MFFLD1 text is 'Field One ' ,
MFFLD2 text is 'Field Two '
) ;

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.