BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I'm taking over an application from a programmer that got a new job. I have limited sas experience. I have searched the web and this forum and downloaded the "Base SAS 9.1.3 Procedures Guide", but so far I haven't answered my own question yet. Still working that learning curve.

The application that I'm taking over produces a large fixed format file and generates a set of sas commands to import the data file. Both files are for the users, who use sas. As the developer, I'm not given a copy of sas (where's Dilbert?). Anyway, here is a sample of the sas file:

infile
'a:0000013401.dat'
lrecl=87;
input
@1 p_user_id $9.
@11 p_user_type $1.
@13 p_cycle $6.
@20 p_error_code $4.
@25 p_record_count $3.
@29 rec_format $3.
@33 acct_cd $1.
@35 balance_amt 17.
@53 trans_cmptr 17.
@71 unassgn_amt 17.
;
run;

I have a couple, probably very basic, questions.

The sas file identifies the input file as "a:...", but the users don't use floppy drives anymore. Is it ok to change the a: to a relative reference (".\0000013401.dat'")?

The amount fields are 17 digits long. This is the format on our corporate database, so I can't change that. On particularly large amounts (those that use all 17 digits), sas converts the number to scientific notation (3.6E+17 or something similar). Is there a way to get sas to support all 17 digits without kicking into scientific mode?

Thanks in advance,
Darren
1 REPLY 1
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
The INFILE statement references a drive letter notation so it must be "mapped" somehow on the system where this application runs -- therfore it would not be appropriate to simply change the reference without adjusting the mapping, correct?

Regarding notation, have a look at the SAS FORMAT statement, either defined for the DATA step or with a PROC step.

Scott Barry
SBBWorks, Inc.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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