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

Yes, I can change the header rname to whatever I want, but the column will appear as an empty column!  

 

Also, I get "Variable is not an object." error when I run the code.

 

Thank you for help

almmotamedi
Obsidian | Level 7

Here is my wildcard code:

 


data details_FEB;
infile "/v_share/Xiaomin/SCOPES/sas_dataset/Oct-08-2015/ScopesCalculations_SecondaryConstruction_*" linesize = 300 firstobs = 2;

 

input
C_ST $3.0
C_DSTRB_AREA $5.0
N_RSK $5.0

IsRevision9 $1.0
ScheduleNumberException $2.0
IsAsgrReportExists $2.0

ConstructionClass 1.0
COT00503.C_CSP_CONST_CLS 1.0

ERROR: DATA STEP Component Object failure. Aborted during the COMPILATION phase.
ERROR 557-185: Variable COT00503 is not an object.
COT00503.F_CSP_CONST_CLS 1.0
CombustibilityClass 1.0
COT00503.C_COMB_CLS 1.0
COT00503.F_COMB_CLS 1.0
COT00503.N_STOR 1.0
PartialSprinklerCreditFactor 1.0
LimitedSupplyCreditFactor 1.0
COT00503.C_SPK $1.0
SprinklerCreditType $1.0
COT00512.C_IPM $1.0
InternalProtectionMethod $1.0
TotalFloorArea 6.0
COT00504.R_TL_FLR_AREA 6.0
TotalRoofArea 6.0
COT00504.R_TL_RF_AREA 6.0
TotalSpecificFloorArea 6.0
COT00504.R_TL_SPEC_FLR 6.0
TotalFloorAndRoofArea 6.0
COT00520.C_SEC_CONST $1.0
COT00511.N_BGN_LVL 1.0
COT00511.N_THRU_LVL 1.0
COT00511.C_VO_PROT $1.0
COT00515.N_SCHD 15.0
FloorLevel 1.0
COT00516.N_LEN*COT00516.N_WDTH 6.0
COT00516.C_LVL_TYP $10.0
IsLowestFloor $10.0
COT00511.F_DIV_WL $10.0
COT00516.F_OTH $10.0
COT00516.C_AS_TYP $10.0
COT00520.N_SQFT $10.0
COT00520.C_RF_SRFC $10.0
COT00520.F_COMB_SB $10.0
COT00520.F_FOAM_PLSTC $10.0
COT00520.F_ACPT_TB $10.0
COT00520.R_PCT_STOR_AFCT $10.0
COT00520.R_PCT_OTH_FLR 3.0
COT00520.C_BLDG_COND $5.0
Percentage $5.0
COT00520.R_PCT_OTH_FLR $5.0
EffectiveArea $5.0
COT00520.R_TL_FLR_AREA $5.0
Charge $5.0
COT00520.R_CHRG $5.0
COT00520.F_CHRG $5.0
SecondaryConstructionCharge $5.0
COT00520.R_TL_SEC_CONST $5.0;
run;

 

Could you please help?

Reeza
Super User

You've marked this question answered, and it's gotten too convoluted, so I think it's time to start a new thread. Forget about reading in multiple files for the moment, get one file read in successfully first and them move forward. If you can attach a sample of your file with your code in the new question, that will help. Please be clear in your new question and don't assume any prior knowledge of the problem. 

almmotamedi
Obsidian | Level 7
Sure, I think my best bet is using wildcard (I created a new thread for that). I appreciate if you take a look at that. The code works for some INPUT variables but not for all of them!

I am so frustrated!!
ballardw
Super User

Additonal import bits of information for use to know:

 

1) Do ALL of the files you want to read have the same structure (number of columns, variables that mean the same thing in the same column in each file).

2) Do any or all of your files have column headers?

3) are you trying to read multiple files into a single data set?

 

 

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
  • 19 replies
  • 1544 views
  • 0 likes
  • 5 in conversation