RE: dbload and its unix environment
Posted in 1999
I don't believe you can use environment variables in the script file. The
easiest way is hardcode it, but I prefer generating the script file on the
fly and therefore I can tailor the script file depending on the runtime
environment
Paul Watson #
WF Software Ltd # Contractor:
Tel: +44 1463 674729 # Someone who can
Fax: +44 1463 678729 # bullshit at speed
www.wfsoftware.com #
> -----Original Message-----
> From: steve_roach@NOSPAMibm.net [mailto:steve_roach@NOSPAMibm.net]
> Sent: 28 April 1999 19:59
> To: informix-list@iiug.org
> Subject: dbload and its unix environment
>
>
> Hi folks
>
> I'm using dbload to load some files but it doesn't seem to like using
> environmental variables. The setup looks like this:
>
> ---
> In my .profile I have MY_HOME=/usr/steve; export MY_HOME
>
> I can see this in my environment.
> ---
> in /usr/steve/upload I have a script to fire up dbload:
>
> dbload -d <database> -c $MYHOME/upload/textfile.txt
> ---> Also in /usr/steve/upload I have a dbload text file:
>
> FILE "$MY_HOME/data/datafile.unl DELIMITER "|" 8;
>
> INSERT etc...
>
> ---
> When I fire up the script, dbload starts ok but reports:
>
> Cannot open raw data file -> $MY_HOME/data/datafile.unl.
> ---
> If I use
>
> FILE "../data/datafile.unl DELIMITER "|" 8;
>
> INSERT etc...
>
> it works ok.
> ---
>
> Is the problem that dbload starts in its own environment and doesn't
> see my setup. If this is the case, how can I get MY_HOME into dbload's
> environment?
>
> TIA
>
> Steve
>
> ---------------------------------------------------------
> Steve Roach: Remove NOSPAM from address to reply:
> steve_roach@NOSPAMibm.net
> steve_roach@NOSPAMhotmail.com
>