BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
petersteijns
Calcite | Level 5

Hi All,

 

I'm trying to get the jobname from a SAS DI Studio job as a variable in my DI transformation, so I can write this information to a seperate table. I've created two new columns in an Extract with the JobID and JobName. For the JobID I use the macro &SYSJOBID which resolves nicely. For the JobName I am using &etls_jobName. Unfortunatly this is not working. The error I get is:

"Unable to execute query: SQL passthru expression contained these errors: ERROR: The following columns were not found in the contributing tables: <The actual Jobname>.

 

Does anyone know what I am doing wrong, It seems that the macro is resolving but I am not getting the jobname as a variable in my extract.

1 ACCEPTED SOLUTION

Accepted Solutions
jklaverstijn
Rhodochrosite | Level 12
Smells like missing quotation marks around the macro reference ("&etls_jobname") but no way to know for sure.

View solution in original post

4 REPLIES 4
jklaverstijn
Rhodochrosite | Level 12

Can you provide us with the code of the transformation and the actual log? That would greatly help in what seems a simple issue.

 

Regards,

- Jan.

jklaverstijn
Rhodochrosite | Level 12
Smells like missing quotation marks around the macro reference ("&etls_jobname") but no way to know for sure.
petersteijns
Calcite | Level 5

You my friend, you are a hero. Thanks!

jklaverstijn
Rhodochrosite | Level 12
You're more than welcome. Can you flag the solution?

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 1946 views
  • 2 likes
  • 2 in conversation