BookmarkSubscribeRSS Feed
helannivas88
Obsidian | Level 7

Hi,

 

Previously we have designed our SAS jobs in a such a way that data will be read from files( .xl or csv) and then will be appended into Netezza database using proc append statement.

 

If there are any errors , Error file (nzbad) will be generated during proc append statement . We have defined in proc append statement as 

 

BULKLOAD=YES

BL_DATAFILE='/data/sas/abc.dat'
BL_USE_PIPE=NO
BL_DELETE_DATAFILE=Yes
BL_OPTIONS="logdir'/data/sas/o' maxErrors 1"

 

Now we have migrated to DB2 database but I cant able to use the same option mentioned above.  For bulk load option , we have use BL_METHOD = CLILOAD , but when we use this we are not able to use BL_OPTIONS = "logdir ......maxErrors 1".

 

We have a requirement to generate a error file if there are any errors in the txt file as well we have to use CLILOAD option. Is there any way to achieve this ??? Thanks in Advance.

 

 

 

 

3 REPLIES 3
Tom
Super User Tom
Super User

I don't understand.  Why would there be errors loading the data that you already processed with SAS.

Shouldn't you catch the errors in the SAS code and publish any errors from there.

 

Or just load the data with native database tools and use whatever logging those tools provide.

Reeza
Super User

How are you connecting to your DB2 database, via Access to DB2 or Access to ODBC? 

And which SAS version are you using, Viya appears more restrictive. 

 

In general, it seems like using the CLILOAD does disable a bunch of other options, most of it is listed here:

 

https://documentation.sas.com/?docsetId=acreldb&docsetTarget=p1w9ial7770y6tn1rtfiuwtfg088.htm&docset...

 

The following are the available options when using CLILOAD, unfortunately most of the options you've specified are not available but perhaps some of the others allow you to get what you need?


@helannivas88 wrote:

Hi,

 

Previously we have designed our SAS jobs in a such a way that data will be read from files( .xl or csv) and then will be appended into Netezza database using proc append statement.

 

If there are any errors , Error file (nzbad) will be generated during proc append statement . We have defined in proc append statement as 

 

BULKLOAD=YES

BL_DATAFILE='/data/sas/abc.dat'
BL_USE_PIPE=NO
BL_DELETE_DATAFILE=Yes
BL_OPTIONS="logdir'/data/sas/o' maxErrors 1"

 

Now we have migrated to DB2 database but I cant able to use the same option mentioned above.  For bulk load option , we have use BL_METHOD = CLILOAD , but when we use this we are not able to use BL_OPTIONS = "logdir ......maxErrors 1".

 

We have a requirement to generate a error file if there are any errors in the txt file as well we have to use CLILOAD option. Is there any way to achieve this ??? Thanks in Advance.

 

 

 

 


Patrick
Opal | Level 21

@helannivas88 

Different database, different rules! Well, actually, it's quite similar for all databases but you still need to read the docu (link @Reeza posted) and use a valid combination of options specific for the database you're connecting to.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 883 views
  • 0 likes
  • 4 in conversation