[comp.databases] Continued Fields in Informix4gl?

karl@basis.uucp (Karl Wiebe) (09/22/90)

In article <4194@husc6.harvard.edu>,
bochner@lange.harvard.EDU (Harry Bochner) writes:
> How do you handle a character field that's too long for the screen in 4gl?
> What I want is to split the field into 2 screen fields, so that the second
> acts as a continuation of the first.
> Perform handles this pretty nicely: you can say
> f1 = tab.str[1,78];
> f2 = tab.str[79,156];
> and it does what you want, i.e. it maps the 2 screen fields onto one database
> column.
[ lines deleted ]
> Am I missing something? or has any one figured an alternative approach?
> 
> Harry Bochner
> bochner@das.harvard.edu

It is a pain, however it is doable. What you need is to use the special
"formonly" pseudotable in your .per screen, e.g.,
f1 = formonly.bigcharfield[1,78];
f2 = formonly.bigcharfield[79,156];
However, this means that the INPUT statement in the 4gl code has to conform
to this splitted field. What I do is make a temp record which is LIKE all
of the columns except those which span multiple fields, and in their place
are char fields of the requisite size. Unfortunately, this means writing
conversion functions to go from the proper record type to this temp record
and back. However, it will work.
Karl
-- 
Karl Wiebe | Systems Specialist | BASIS, Inc.
5900 Hollis St., Suite L | Emeryville, CA 94608 | (415)-547-5900
INTERNET: basis!karl@unisoft.com UUCP: ..!{ucbvax,sun,uunet}!unisoft!basis!karl
	"server godot not responding -- still trying"

markj@informix.com (Mark Jeske(Chicago Consultan)t) (09/25/90)

In article <1990Sep21.103544.28493@basis.uucp> karl@basis.uucp (Karl Wiebe) writes:
>In article <4194@husc6.harvard.edu>,
>bochner@lange.harvard.EDU (Harry Bochner) writes:
>> How do you handle a character field that's too long for the screen in 4gl?
>> What I want is to split the field into 2 screen fields, so that the second
>> acts as a continuation of the first.
>> Perform handles this pretty nicely: you can say
>> f1 = tab.str[1,78];
>> f2 = tab.str[79,156];
>> and it does what you want, i.e. it maps the 2 screen fields onto one database
>> column.

You might also want to look into our new 4.0 products which contain a new
attribute for fields call WORDRAP which enables a multiline editor and
automatically moves whole words to the next line as they are inserted.

Try it, you'll like it.

Mark Jeske (Informix consulting)
markj@infmx.com