BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
DONBSR
Fluorite | Level 6

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

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

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.

View solution in original post

1 REPLY 1
ballardw
Super User

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.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 670 views
  • 1 like
  • 2 in conversation