BookmarkSubscribeRSS Feed
milts
Pyrite | Level 9

Hi,

 

Would like to seek your expertise if has anyone tried to execute bcp command using systask? 

 

Reason is that we would want to achieve SAS orchestrating all the jobs. I have some sas datasets which will serve as reference tables to know which file to pick up and to which table to load to and then I'm planning to create a macro parameterized by the table name. In that way I only have one script to maintain instead of multiple bcp scripts one for each table.

 

Thanks in advance!

3 REPLIES 3
LinusH
Tourmaline | Level 20

I have no experience with this exact scenario.

But if BCP commands are accessible like any other OS command from your SAS host, there should be no difference.

 

A few reflections though, SAS offers a build in bulk loader, why don't you use that? No need for building scripts.

Also, it sounds like you almost trying to build some kind of scheduling facility, with job dependencies. There are tons of SW that does this in different ways. My POV is not to rebuild the wheel unless your requirements are very rare/specific.

Data never sleeps
milts
Pyrite | Level 9

Thanks for your inputs. If I SAS bulk loader, will it require the file to be converted to a sas dataset first before loading to SQL Server? 

LinusH
Tourmaline | Level 20

Well, yes. But if your source data isn't passing SAS, why would you use SAS to manage bulk load in SQL Server...?

Data never sleeps

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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
  • 1220 views
  • 0 likes
  • 2 in conversation