Page 1 of 1

calling export from db2 stage

Posted: Tue Mar 25, 2014 5:22 pm
by times29
Hi,
i used after sql in db2 stage to call below export its giving errors any idea
if i can do this in datastage.

EXPORT TO C:\Datastageexports\emea\test.ixf
OF IXF MESSAGES "C:\Datastageexports\emea\test.msg" select * from SYSIBM.SYSDUMMY1

Posted: Tue Mar 25, 2014 10:15 pm
by chulett
You've marked your post with an O/S of UNIX - is that actually the case? If so that would make it difficult for it to use the paths you've posted. And it also helps when you say something is "giving errors" to actually post those errors so we have some idea what is going on.

Re: calling export from db2 stage

Posted: Wed Mar 26, 2014 4:47 am
by MT
Hi times29

the problem is that you used "after sql" in db2 stage
but export is a utility and so a DB2 command and not SQL.

Two things you could do
1. use a OS script and call that
2. use admin_cmd stored procedure to wrap the export command and call the stored procedure (the call statement is SQL) - my recommended way