Good day.
I am operating with version 9.04 and without SAS/STATS.
The following source code:
data work.Metal_Conc (keep=Element Concentration Lab_SampleID);
set all;
first_numterm=(Conc_Flush*&UI_CRV2MFPV_TransVol_Meas.);
second_numterm=((10**6)/fi)*COL1;
third_numterm=6712*heel_conc;
denominator=6712+&UI_CRV2MFPV_TransVol_Meas.;
Concentration=(first_numterm+second_numterm+third_numterm)/denominator;
Lab_SampleID= 'L000'||_n_ ;
run;results in output:
Element Concentration Lab_SampleID
Al 38687.24 L000 1
B 49763.01 L000 2
Ca 23036.29 L000 3
Cl 37280.94 L000 4
Fe 17333.57 L000 5
Li 8598.14 L000 6
Mg 4770.01 L000 7
Na 350033.08 L000 8
S 5849.44 L000 9
Si 145292.48 L000 10
Ti 15622.81 L000 11
Zn 10333.94 L000 12
Zr 8970.83 L000 13 I would like to remove the space in Lab_SampleID
Thank you,
Jane
try
Lab_SampleID=cats( 'L000',_n_) ;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.
Ready to level-up your skills? Choose your own adventure.