RE: Load Command Quirks in 4gl.
Posted in 1994
On 12/29 Ted wrote:
>Sample code:
> define file_name char(80)
> define foo char(160)
> let file_name = "a_file_name"
> load from file_name insert into a_table
> let foo = file_name, " TEST"
> display foo
>results from displaying foo:
>a_file_name
I had a similar problem where I had to "force" blanks into a filename.
The way I handled it was to "build" the name in a for loop. Rather kludgy,
but worked without having to write a 'C' function, so it works with straight
RDS.
define cnt smallint
let cnt = length(file_name)
let foo = file_name clipped
for cnt = (cnt + 1) to 156 # Reserving 4 chars for TEST
let foo[cnt] = " "
end for
let foo[cnt] = "T"
let foo[cnt+1] = "E"
let foo[cnt+2] = "S"
let foo[cnt+3] = "T"
----------------------------------------------------------------------------
rick.g.montgomery@irs.sprint.com