SAS Programming

DATA Step, Macro, Functions and more
BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.

I have a code to simply delete record and then insert records. I don't get any error but got a warning of 

"WARNING: Character expression will be truncated when assigned to character column LOB_CD." which should not make job to fail. 

 

makes failed my job. Why?

 

PROC SQL;
DELETE FROM xx.xx;
DELETE FROM xx.xy;

QUIT;

PROC SQL;
INSERT INTO xx.xx  SELECT * FROM ZZ.XX;
INSERT INTO XX.XY SELECT * FROM ZZ.XY;

QUIT;

1 ACCEPTED SOLUTION

Accepted Solutions
r_behata
Barite | Level 11

On the Autosys environment the Success/ Failure criteria are defined by how you handle the sas return codes.

 

Typically on a Unix / Linux environment post execution this code would give you a return code 1 due to the warning.  You may handle this return code from the Shell script( in case you are using any ) to mark this job as success despite the warning.

 

However, I would highly recommend to correct this warning as it appears that there is a type mismatch while inserting the data from your Proc SQL Insert.

 

 

 

View solution in original post

1 REPLY 1
r_behata
Barite | Level 11

On the Autosys environment the Success/ Failure criteria are defined by how you handle the sas return codes.

 

Typically on a Unix / Linux environment post execution this code would give you a return code 1 due to the warning.  You may handle this return code from the Shell script( in case you are using any ) to mark this job as success despite the warning.

 

However, I would highly recommend to correct this warning as it appears that there is a type mismatch while inserting the data from your Proc SQL Insert.

 

 

 

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1518 views
  • 0 likes
  • 2 in conversation