06-12-2014 07:19 PM
I am trying to dynamically create some sort control cards but can't seem to get it to work.
I have coded a couple of different ways but I am stumped - I thought I could concatenate with the pipes?
JOBNAME is equal to - JOB1
PUT @3 'INCLUDE COND=(21,8,CH,EQ,C'||JOBNAME||',OR,';
I am trying to end up with:
Any recommendations is greatly appreciated.
06-13-2014 11:18 AM
Thanks it works fine for what I need but for some reason it puts an extra space after the jobname?
The sort control cards still work ok with it, but I wasn't sure why?
PUT @3 'INCLUDE COND=(21,8,CH,EQ,C'"'"JOBNAME"'"',OR,';
INCLUDE COND=(21,8,CH,EQ,C'ABCJOB01 ',OR,
06-13-2014 12:08 PM
Try this, will remove extra space after the jobname.
put @3 'INCLUDE COND=(21,8,CH,EQ,C'"'" JOBNAME $4."'" ',OR,';
06-13-2014 01:00 PM
I still get the space but now I get a SAS warning:
20 PUT @3 'INCLUDE COND=(21,8,CH,EQ,C'"'"JOBNAME"'"',OR,';
NOTE 49-169: The meaning of an identifier after a quoted string might change in
between a quoted string and the succeeding identifier is recommende
06-13-2014 02:56 PM
Sometimes the jobname has 7 characters and I guess because of the $8. format it leaves a blank?
06-13-2014 04:48 PM
Thanks for your great support, it truly is appreciated. It is because of people like you that make SAS a great tool to tackle all kinds of situations!
06-13-2014 03:52 AM
The host sort interface will generate those control cards automatically when sorting sas datasets.
Some host sort interfaces are supporting direct it (syncsort) to sas decreasing the im resource usage.
As all is standard present why would you try to generate those controlcards