We read multiple a SAS files with 2 numeric variables that can have missing values. We output selective fields to a CSV which is downloaded from the mainframe to a server. Server software has a problem with the Period(.) when the data is missing as it's expecting either a number or 2 consecutive delimiters(a comma in this case.) Varibles REALSIZE and VIRTSIZE are both numeric. Code is below and sample output below code.
DATA IPLOUT;
SET IPLDATA;
date2=put(ipldate,mmddyys10.);
time2=put(ipltime,time11.2);
downtm2=put(downtm,time11.2);
keyind=compress(system||ipldate||ipltime);
delim=",";
recout= system||delim||custid||delim||date2||delim||time2
||delim||downtm2||delim||realsize||delim||virtsize
||delim||product||delim||sysplex||delim||keyind
;
recout=compress(recout);
FILE IPLPOUT NOTITLES;
put recout;
AXX1,TE,11/06/2016,16:11:56.86,0:00:00.03,.,.,,,ADTE2076458316.86
AXX1,TE,11/06/2016,17:56:58.08,0:00:00.03,.,.,,,ADTE2076464618.08
AXX2,TP,11/06/2016,22:49:39.93,0:00:00.12,.,.,,,ADTP2076482179.93
AXX2,TP,11/20/2016,0:55:26.42,0:00:00.14,5242880,2097152,SP7.2.1,ZZPLEX1,ADTP207
Try
Options missing=' '; <= there is a space inbetween the single quotes
before the data step.
Then all those conversions of missing values will receive a blank instead of a .
You should reset back to Options missing='.'; afterward.
Try
Options missing=' '; <= there is a space inbetween the single quotes
before the data step.
Then all those conversions of missing values will receive a blank instead of a .
You should reset back to Options missing='.'; afterward.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.