From: bpayne on
This is a working import statement.

call SQLDBS('import from C:\download\OB546P.new of asc method L using
:col_data messages msg.imp INSERT_UPDATE into userid.OB546P')


col_data.0 = 16
col_data.1 = 1 /* start */
col_data.2 = 12 /* stop */
col_data.3 = 13
col_data.4 = 22
col_data.5 = 23 /* pair 3 start */
col_data.6 = 23 /* pair 3 stop */
col_data.7 = 24
col_data.8 = 35
col_data.9 = 36
col_data.10 = 39
col_data.11 = 40
col_data.12 = 48
col_data.13 = 49
col_data.14 = 57
col_data.15 = 58
col_data.16 = 60
From: cberthu on
On Apr 10, 5:33 pm, "cber...(a)gmail.com" <cber...(a)gmail.com> wrote:
> <snip>
>
> > The cause of your problem is that you are using the SQLEXEC API
> > instead of the SQLDB2 or SQLDBS api.
> > The SQLEXEC API can only be used for SQL, it cannot be used for
> > commands like import or load.
> > Hope this helps.
>
> Yes I was already very happy and was thinking now I got it.... but
> unfortunately I get some other errors:
> SQL7016N Invalid syntax provided to the SQLDB2 interface. Related
> Error: "DB21061E". sqlcode=-7016.....

I got it......

I do that in the rexx:
cmd = 'DB2CMD DB2 -F ' SQLFILEVAR
The sql file looks like that:
CONNECT TO DBNAME
LAOD FROM........
........
CONNECT RESET

And this worked out for me... I just have to close the DB2CMD windows
after the successful run.. and that's it... :-)