SAS Programming

DATA Step, Macro, Functions and more
BookmarkSubscribeRSS Feed
Anv_SAS
Calcite | Level 5

Hi all,

 

I am trying to create USER-DEFINED INFORMATS from SAS datasets. 

WhatsApp Image 2020-08-30 at 4.21.32 PM.jpeg

 

WhatsApp Image 2020-08-30 at 4.21.39 PM.jpeg

But I am getting below error.WhatsApp Image 2020-08-30 at 4.21.45 PM.jpeg

Please can you fix this issue.

 

Regards,

Anvesh

 

2 REPLIES 2
Kurt_Bremser
Super User

Please post data in usable form. Pictures are NOT usable.

Post your dataset in a data step with datalines, so we can recreate your dataset with a simple copy/paste and submit.

Post the code into a window opened with the "little running man" button right next to the one indicated here:

Bildschirmfoto 2020-04-07 um 08.32.59.jpg

 

You do not try to create an informat, you create a numeric format (type = "N").

Try this instead:

data cntlin;
set ord1;
fmtname = "ord";
type = "I";
start = strip(param);
label = ord;
run;

proc format cntlin=cntlin;
run;

Untested; for tested code, supply data as mentioned above.

Anv_SAS
Calcite | Level 5
Sorry for the inconvenience.

The code worked.

Thank you.

sas-innovate-white.png

Join us for our biggest event of the year!

Four days of inspiring keynotes, product reveals, hands-on learning opportunities, deep-dive demos, and peer-led breakouts. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

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