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



Tim,

In SQL you can do this (for example):

CREATE TABLE PHILWORK/PHILTEST
 (FIELD1 INTEGER NOT NULL WITH DEFAULT,
  DESCRIPTION FOR COLUMN DSCR VARCHAR (1024 ) ALLOCATE(25))

what this does is create a null-capable column named DESCRIPTION with an
alias called DSCR (to use in an RPG pgm so you don't have to reference it as
DESCR00001) which is variable length but with 25 bytes allocated.  This is
supposed to speed up processing if the length is usually 25 or under (or
whatever length you want to make it).  Or don't use ALLOCATE.

There's a good redbook - "SQL Cookbook" I believe it's called.  It's for UDB
DB2 V7 so not everything applies to the as/400 but enough of it does to make
it valuable.

In DDS you can do it this way:

  A          R TESTR
  A            FIELD1         9B 0
  A            DESCR       1024A         ALIAS(DESCRIPTION)
  A                                      VARLEN(25)
  A                                      ALWNULL

The big difference is the sql table's record format is the same as the table
name and the dds file's record format is TESTR while the file name is TEST.

Say to those Sequel guys "Step back non-believers!"

Phil




> Does our database have a memo type of field?
>
> ie: in Sequel, they can input text with variable lengths...  With DDS, we
> have to setup our database with a fixed number or characters...
>
> Either via SQL, or DDS (or both) is it possible to setup a field (ie:
> comment field) to accept an unlimited number of characters...
> This would be
> a non keyed field...
>
>
> thanks, tim
>
> _______________________________________________
> This is the Midrange Systems Technical Discussion (MIDRANGE-L)
> mailing list
> To post a message email: MIDRANGE-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
> or email: MIDRANGE-L-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/midrange-l.
>


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.