BookmarkSubscribeRSS Feed
kbhagat
Fluorite | Level 6

Hello everyone,

 

I have a list of VINs with vehicle make year and model in an Excel as well as a SAS file. I am trying to get more information on these VINs like their body class, group, engine, etc. There is a NHTSA website to decode VINs. Here is the link Vehicle API (dot.gov). I can decode 50 VIN at a time and export them in CSV by using this website. I have at least 6000 VINs and it will be very time-consuming to do that. Is there a way to do it in SAS? I mean automate this. May be connecting the List of VINs to the API website decoding the VIN and exporting the file in Excel. 

6 REPLIES 6
Reeza
Super User
Use the API to get a JSON response per VIN and decode.

If upload a sample of data someone can probably help with getting this automated.
kbhagat
Fluorite | Level 6

We created this code in Python and I am trying to convert it into SAS programming:

import pandas as pd
from IPython.display import display
import requests
from io import StringIO

def decoder(row):

url = 'https://vpic.nhtsa.dot.gov/api/vehicles/DecodeVINValuesBatch/'
post_fields = {'format': 'csv', 'data':f'{row["VIN"]},{row["VEH_YEAR"]}'}
r = requests.post(url, data=post_fields)
r1=StringIO(r.text)
return pd.read_csv(r1)

def main():
#data = pd.read_csv(StringIO('vin,year\n3GNDA13D76S000000,2006\n5XYKT3A12CG000000,2012'))
vehFrame = pd.read_csv('N:\IanWork\VIN AND YEAR_2018_2022C.csv') #Takes the original vin list and puts it into the vehFrame dataframe
decodedTest = vehFrame[['VIN', 'VEH_YEAR']].apply(decoder, axis=1) #Applies the decoder function/method to each row of the vehFrame and stores the result in decodedTest
#USED FOR TESTING/////////////////////////////////////////////
testFrame = vehFrame.iloc[0:500]
decode100 = testFrame[['VIN', 'VEH_YEAR']].apply(decoder, axis = 1)
test100 = pd.concat(decode100.tolist(), ignore_index=True)
test100.query("vin = 4834")
#/////////////////////////////////////////////////////////////
#decoded = data[['vin', 'year']].apply(decoder, axis=1)
#decData = pd.concat(decoded.tolist(), ignore_index=True)
decCars = pd.concat(decodedTest.tolist(), ignore_index=True) #Takes the decodedTest list and reformats it into a dataframe called decCars
decCars.to_csv('Decoded vins.csv', encoding = 'utf-8-sig') #Exports the decCars dataframe to a csv file
#display(decData)
#display(decData[['vin', 'modelyear']])
display(decCars[['vin', 'modelyear']])#


if __name__ == '__main__':
main()

Reeza
Super User
Still need the same thing some input data to test the code.

Reeza
Super User

Using the data from the VIN site here's the basic idea. I've highlighted the area you'll need to fix. You must fix this as the errors show it doesn't work for 2013 and it will happen with 6000 records as PROC IMPORT guesses. So you need to replace the proc import with a data step. 

 

Probably need to fix the masking on the &modelyear in the api call as well but that won't cause any issues and I want to log off. 

 

Hope this helps.

 

*delete master output dataset;
proc datasets lib=work nodetails nolist;
delete vin_data;
run;quit;


*make fake data to test;
data vin_list;
infile cards dsd truncover;
input VIN $ year;
cards;
5UXWX7C5*BA, 2011
5UXWX7C5*BA, 2012
5UXWX7C5*BA, 2013
;
run;



%macro lookup_vin(VIN=, Year=);

*set up space for api response;
filename out temp;
 
*send API call;
proc http
 url="https://vpic.nhtsa.dot.gov/api/vehicles/DecodeVinValues/&VIN?format=csv%nrstr(&)modelyear=&year"
 method="get" out=out;
run;

*import data - you will need to replace this with a data step to read the data. PROC IMPORT guesses at the data types;
proc import datafile=out out=want dbms=csv replace;run;

*close out file reference;
filename out;

*add record to the lookup data;
proc append base=vin_data data=want;run;

proc datasets lib=work nodetails nolist;
delete want;
run;quit;


%mend;

data demo;
set vin_list;
str = catt('%lookup_vin(VIN=', VIN, ", Year=", year, ');');
call execute(str);

run;

proc print data=vin_data;
run;

Log from test:

Spoiler
 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 68         
 69         *delete master output dataset;
 70         proc datasets lib=work nodetails nolist;
 71         delete vin_data;
 72         run;
 
 NOTE: Deleting WORK.VIN_DATA (memtype=DATA).
 72       !     quit;
 
 NOTE: PROCEDURE DATASETS used (Total process time):
       real time           0.00 seconds
       user cpu time       0.00 seconds
       system cpu time     0.00 seconds
       memory              347.87k
       OS Memory           27052.00k
       Timestamp           12/12/2023 11:31:50 PM
       Step Count                        246  Switch Count  2
       Page Faults                       0
       Page Reclaims                     48
       Page Swaps                        0
       Voluntary Context Switches        9
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           8
       
 
 73         
 74         
 75         *make fake data to test;
 76         data vin_list;
 77         infile cards dsd truncover;
 78         input VIN $ year;
 79         cards;
 
 NOTE: The data set WORK.VIN_LIST has 3 observations and 2 variables.
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       user cpu time       0.00 seconds
       system cpu time     0.00 seconds
       memory              521.75k
       OS Memory           27052.00k
       Timestamp           12/12/2023 11:31:50 PM
       Step Count                        247  Switch Count  2
       Page Faults                       0
       Page Reclaims                     83
       Page Swaps                        0
       Voluntary Context Switches        11
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           264
       
 83         ;
 
 84         run;
 85         
 86         
 87         
 88         %macro lookup_vin(VIN=, Year=);
 89         
 90         *set up space for api response;
 91         filename out temp;
 92         
 93         *send API call;
 94         proc http
 95          url="https://vpic.nhtsa.dot.gov/api/vehicles/DecodeVinValues/&VIN?format=csv%nrstr(&)modelyear=&year"
 96          method="get" out=out;
 97         run;
 98         
 99         *import data - you will need to replace this with a data step to read the data. PROC IMPORT guesses at the data types;
 100        proc import datafile=out out=want dbms=csv replace;run;
 101        
 102        *close out file reference;
 103        filename out;
 104        
 105        *add record to the lookup data;
 106        proc append base=vin_data data=want;run;
 107        
 108        proc datasets lib=work nodetails nolist;
 109        delete want;
 110        run;quit;
 111        
 112        
 113        %mend;
 114        
 115        data demo;
 116        set vin_list;
 117        str = catt('%lookup_vin(VIN=', VIN, ", Year=", year, ');');
 118        call execute(str);
 119        
 120        run;
 
 NOTE: There were 3 observations read from the data set WORK.VIN_LIST.
 NOTE: The data set WORK.DEMO has 3 observations and 3 variables.
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       user cpu time       0.00 seconds
       system cpu time     0.00 seconds
       memory              799.31k
       OS Memory           27312.00k
       Timestamp           12/12/2023 11:31:50 PM
       Step Count                        248  Switch Count  2
       Page Faults                       0
       Page Reclaims                     117
       Page Swaps                        0
       Voluntary Context Switches        11
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           264
       
 
 NOTE: CALL EXECUTE generated line.
 1         + *set up space for api response; filename out temp;   *send API call; proc http  
 url="https://vpic.nhtsa.dot.gov/api/vehicles/DecodeVinValues/5UXWX7C5?format=csv&modelyear=2011"  method="get" out=out; run;  
 *import data - you will need to replace this
 WARNING: Apparent symbolic reference MODELYEAR not resolved.
 NOTE: 200 OK
 NOTE: PROCEDURE HTTP used (Total process time):
       real time           0.17 seconds
       user cpu time       0.00 seconds
       system cpu time     0.00 seconds
       memory              198.93k
       OS Memory           26792.00k
       Timestamp           12/12/2023 11:31:50 PM
       Step Count                        249  Switch Count  0
       Page Faults                       0
       Page Reclaims                     18
       Page Swaps                        0
       Voluntary Context Switches        7
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           8
       
 
 2         + with a data step to read the data. PROC IMPORT guesses at the data types;
 2         +                                                                           proc import datafile=out out=want dbms=csv 
 replace;
 2         +
 run;
 
 NOTE: Unable to open parameter catalog: SASUSER.PARMS.PARMS.SLIST in update mode. Temporary parameter values will be saved to 
 WORK.PARMS.PARMS.SLIST.
 Name pedestrianautomaticemergencybraking truncated to pedestrianautomaticemergencybrak.
 Name semiautomaticheadlampbeamswitching truncated to semiautomaticheadlampbeamswitchi.
 Problems were detected with provided names.  See LOG. 
 2         +
   *close out file reference; filename out;  *add record to the lookup data; proc append base=vin_data data=want;run;  proc
 121         /**********************************************************************
 122         *   PRODUCT:   SAS
 123         *   VERSION:   9.4
 124         *   CREATOR:   External File Interface
 125         *   DATE:      12DEC23
 126         *   DESC:      Generated SAS Datastep Code
 127         *   TEMPLATE SOURCE:  (None Specified.)
 128         ***********************************************************************/
 129            data WORK.WANT    ;
 130            %let _EFIERR_ = 0; /* set the ERROR detection macro variable */
 131            infile OUT delimiter = ',' MISSOVER DSD  firstobs=2 ;
 132               informat makeid best32. ;
 133               informat modelid best32. ;
 134               informat manufacturerid best32. ;
 135               informat vin $8. ;
 136               informat batteryinfo $1. ;
 137               informat batterytype $1. ;
 138               informat bedtype $1. ;
 139               informat bodycabtype $1. ;
 140               informat bodyclass $55. ;
 141               informat enginecylinders best32. ;
 142               informat destinationmarket $1. ;
 143               informat displacementcc best32. ;
 144               informat displacementci best32. ;
 145               informat displacementl best32. ;
 146               informat doors best32. ;
 147               informat drivetype $1. ;
 148               informat driverassist $1. ;
 149               informat enginecycles $1. ;
 150               informat enginemodel $1. ;
 151               informat enginekw best32. ;
 152               informat entertainmentsystem $1. ;
 153               informat fueltypeprimary $8. ;
 154               informat gvwr $47. ;
 155               informat make $3. ;
 156               informat manufacturer $48. ;
 157               informat model $2. ;
 158               informat modelyear best32. ;
 159               informat plantcity $1. ;
 160               informat seats $1. ;
 161               informat series $1. ;
 162               informat steeringlocation $1. ;
 163               informat transmissionstyle $1. ;
 164               informat trim $9. ;
 165               informat vehicletype $36. ;
 166               informat windows $1. ;
 167               informat axles $1. ;
 168               informat brakesystemtype $1. ;
 169               informat batterycells $1. ;
 170               informat bedlengthin $1. ;
 171               informat brakesystemdesc $1. ;
 172               informat curbweightlb $1. ;
 173               informat airbagloccurtain $1. ;
 174               informat airbaglocseatcushion $1. ;
 175               informat batterya $1. ;
 176               informat batteryv $1. ;
 177               informat batterykwh $1. ;
 178               informat wheelbasetype $1. ;
 179               informat seatrows $1. ;
 180               informat valvetraindesign $1. ;
 181               informat transmissionspeeds $1. ;
 182               informat engineconfiguration $1. ;
 183               informat airbaglocfront $30. ;
 184               informat fueltypesecondary $1. ;
 185               informat fuelinjectiontype $1. ;
 186               informat airbaglocknee $1. ;
 187               informat enginehp best32. ;
 188               informat evdriveunit $1. ;
 189               informat plantcountry $1. ;
 190               informat plantcompanyname $1. ;
 191               informat plantstate $1. ;
 192               informat pretensioner $3. ;
 193               informat seatbeltsall $6. ;
 194               informat adaptivecruisecontrol $1. ;
 195               informat adaptiveheadlights $1. ;
 196               informat abs $1. ;
 197               informat cib $1. ;
 198               informat blindspotmon $1. ;
 199               informat ncsabodytype $1. ;
 200               informat ncsamake $1. ;
 201               informat ncsamodel $1. ;
 202               informat esc $1. ;
 203               informat tractioncontrol $1. ;
 204               informat forwardcollisionwarning $1. ;
 205               informat lanedeparturewarning $1. ;
 206               informat lanekeepsystem $1. ;
 207               informat rearvisibilitysystem $1. ;
 208               informat parkassist $1. ;
 209               informat airbaglocside $30. ;
 210               informat trim2 $3. ;
 211               informat series2 $1. ;
 212               informat wheelbaseshort $1. ;
 213               informat wheelbaselong $1. ;
 214               informat note $1. ;
 215               informat wheels $1. ;
 216               informat trailertype $14. ;
 217               informat trailerbodytype $14. ;
 218               informat trailerlength $1. ;
 219               informat wheelsizefront $1. ;
 220               informat wheelsizerear $1. ;
 221               informat otherrestraintsysteminfo $202. ;
 222               informat coolingtype $1. ;
 223               informat enginehp_to $1. ;
 224               informat electrificationlevel $1. ;
 225               informat chargerlevel $1. ;
 226               informat chargerpowerkw $1. ;
 227               informat otherengineinfo $1. ;
 228               informat batterya_to $1. ;
 229               informat batteryv_to $1. ;
 230               informat batterykwh_to $1. ;
 231               informat turbo $1. ;
 232               informat baseprice $1. ;
 233               informat batterymodules $1. ;
 234               informat batterypacks $1. ;
 235               informat topspeedmph $1. ;
 236               informat suggestedvin $1. ;
 237               informat errorcode $6. ;
 238               informat possiblevalues $1. ;
 239               informat axleconfiguration $1. ;
 240               informat enginemanufacturer $1. ;
 241               informat buslength $1. ;
 242               informat busfloorconfigtype $14. ;
 243               informat bustype $14. ;
 244               informat otherbusinfo $1. ;
 245               informat custommotorcycletype $14. ;
 246               informat motorcyclesuspensiontype $14. ;
 247               informat motorcyclechassistype $14. ;
 248               informat othermotorcycleinfo $1. ;
 249               informat othertrailerinfo $1. ;
 250               informat additionalerrortext $1. ;
 251               informat cashforclunkers $1. ;
 252               informat trackwidth $1. ;
 253               informat tpms $6. ;
 254               informat activesafetysysnote $1. ;
 255               informat dynamicbrakesupport $1. ;
 256               informat pedestrianautomaticemergencybrak $1. ;
 257               informat autoreversesystem $1. ;
 258               informat automaticpedestrianalertingsound $1. ;
 259               informat can_aacn $1. ;
 260               informat edr $1. ;
 261               informat keylessignition $1. ;
 262               informat daytimerunninglight $1. ;
 263               informat lowerbeamheadlamplightsource $1. ;
 264               informat semiautomaticheadlampbeamswitchi $1. ;
 265               informat adaptivedrivingbeam $1. ;
 266               informat saeautomationlevel $1. ;
 267               informat saeautomationlevel_to $1. ;
 268               informat rearcrosstrafficalert $1. ;
 269               informat gcwr $1. ;
 270               informat gcwr_to $1. ;
 271               informat ncsanote $1. ;
 272               informat ncsamappingexception $1. ;
 273               informat ncsamapexcapprovedon $1. ;
 274               informat ncsamapexcapprovedby $1. ;
 275               informat gvwr_to $1. ;
 276               informat errortext $151. ;
 277               informat rearautomaticemergencybraking $1. ;
 278               informat blindspotintervention $1. ;
 279               informat lanecenteringassistance $1. ;
 280               informat nonlanduse $1. ;
 281               informat vehicledescriptor $11. ;
 282               format makeid best12. ;
 283               format modelid best12. ;
 284               format manufacturerid best12. ;
 285               format vin $8. ;
 286               format batteryinfo $1. ;
 287               format batterytype $1. ;
 288               format bedtype $1. ;
 289               format bodycabtype $1. ;
 290               format bodyclass $55. ;
 291               format enginecylinders best12. ;
 292               format destinationmarket $1. ;
 293               format displacementcc best12. ;
 294               format displacementci best12. ;
 295               format displacementl best12. ;
 296               format doors best12. ;
 297               format drivetype $1. ;
 298               format driverassist $1. ;
 299               format enginecycles $1. ;
 300               format enginemodel $1. ;
 301               format enginekw best12. ;
 302               format entertainmentsystem $1. ;
 303               format fueltypeprimary $8. ;
 304               format gvwr $47. ;
 305               format make $3. ;
 306               format manufacturer $48. ;
 307               format model $2. ;
 308               format modelyear best12. ;
 309               format plantcity $1. ;
 310               format seats $1. ;
 311               format series $1. ;
 312               format steeringlocation $1. ;
 313               format transmissionstyle $1. ;
 314               format trim $9. ;
 315               format vehicletype $36. ;
 316               format windows $1. ;
 317               format axles $1. ;
 318               format brakesystemtype $1. ;
 319               format batterycells $1. ;
 320               format bedlengthin $1. ;
 321               format brakesystemdesc $1. ;
 322               format curbweightlb $1. ;
 323               format airbagloccurtain $1. ;
 324               format airbaglocseatcushion $1. ;
 325               format batterya $1. ;
 326               format batteryv $1. ;
 327               format batterykwh $1. ;
 328               format wheelbasetype $1. ;
 329               format seatrows $1. ;
 330               format valvetraindesign $1. ;
 331               format transmissionspeeds $1. ;
 332               format engineconfiguration $1. ;
 333               format airbaglocfront $30. ;
 334               format fueltypesecondary $1. ;
 335               format fuelinjectiontype $1. ;
 336               format airbaglocknee $1. ;
 337               format enginehp best12. ;
 338               format evdriveunit $1. ;
 339               format plantcountry $1. ;
 340               format plantcompanyname $1. ;
 341               format plantstate $1. ;
 342               format pretensioner $3. ;
 343               format seatbeltsall $6. ;
 344               format adaptivecruisecontrol $1. ;
 345               format adaptiveheadlights $1. ;
 346               format abs $1. ;
 347               format cib $1. ;
 348               format blindspotmon $1. ;
 349               format ncsabodytype $1. ;
 350               format ncsamake $1. ;
 351               format ncsamodel $1. ;
 352               format esc $1. ;
 353               format tractioncontrol $1. ;
 354               format forwardcollisionwarning $1. ;
 355               format lanedeparturewarning $1. ;
 356               format lanekeepsystem $1. ;
 357               format rearvisibilitysystem $1. ;
 358               format parkassist $1. ;
 359               format airbaglocside $30. ;
 360               format trim2 $3. ;
 361               format series2 $1. ;
 362               format wheelbaseshort $1. ;
 363               format wheelbaselong $1. ;
 364               format note $1. ;
 365               format wheels $1. ;
 366               format trailertype $14. ;
 367               format trailerbodytype $14. ;
 368               format trailerlength $1. ;
 369               format wheelsizefront $1. ;
 370               format wheelsizerear $1. ;
 371               format otherrestraintsysteminfo $202. ;
 372               format coolingtype $1. ;
 373               format enginehp_to $1. ;
 374               format electrificationlevel $1. ;
 375               format chargerlevel $1. ;
 376               format chargerpowerkw $1. ;
 377               format otherengineinfo $1. ;
 378               format batterya_to $1. ;
 379               format batteryv_to $1. ;
 380               format batterykwh_to $1. ;
 381               format turbo $1. ;
 382               format baseprice $1. ;
 383               format batterymodules $1. ;
 384               format batterypacks $1. ;
 385               format topspeedmph $1. ;
 386               format suggestedvin $1. ;
 387               format errorcode $6. ;
 388               format possiblevalues $1. ;
 389               format axleconfiguration $1. ;
 390               format enginemanufacturer $1. ;
 391               format buslength $1. ;
 392               format busfloorconfigtype $14. ;
 393               format bustype $14. ;
 394               format otherbusinfo $1. ;
 395               format custommotorcycletype $14. ;
 396               format motorcyclesuspensiontype $14. ;
 397               format motorcyclechassistype $14. ;
 398               format othermotorcycleinfo $1. ;
 399               format othertrailerinfo $1. ;
 400               format additionalerrortext $1. ;
 401               format cashforclunkers $1. ;
 402               format trackwidth $1. ;
 403               format tpms $6. ;
 404               format activesafetysysnote $1. ;
 405               format dynamicbrakesupport $1. ;
 406               format pedestrianautomaticemergencybrak $1. ;
 407               format autoreversesystem $1. ;
 408               format automaticpedestrianalertingsound $1. ;
 409               format can_aacn $1. ;
 410               format edr $1. ;
 411               format keylessignition $1. ;
 412               format daytimerunninglight $1. ;
 413               format lowerbeamheadlamplightsource $1. ;
 414               format semiautomaticheadlampbeamswitchi $1. ;
 415               format adaptivedrivingbeam $1. ;
 416               format saeautomationlevel $1. ;
 417               format saeautomationlevel_to $1. ;
 418               format rearcrosstrafficalert $1. ;
 419               format gcwr $1. ;
 420               format gcwr_to $1. ;
 421               format ncsanote $1. ;
 422               format ncsamappingexception $1. ;
 423               format ncsamapexcapprovedon $1. ;
 424               format ncsamapexcapprovedby $1. ;
 425               format gvwr_to $1. ;
 426               format errortext $151. ;
 427               format rearautomaticemergencybraking $1. ;
 428               format blindspotintervention $1. ;
 429               format lanecenteringassistance $1. ;
 430               format nonlanduse $1. ;
 431               format vehicledescriptor $11. ;
 432            input
 433                        makeid
 434                        modelid
 435                        manufacturerid
 436                        vin  $
 437                        batteryinfo  $
 438                        batterytype  $
 439                        bedtype  $
 440                        bodycabtype  $
 441                        bodyclass  $
 442                        enginecylinders
 443                        destinationmarket  $
 444                        displacementcc
 445                        displacementci
 446                        displacementl
 447                        doors
 448                        drivetype  $
 449                        driverassist  $
 450                        enginecycles  $
 451                        enginemodel  $
 452                        enginekw
 453                        entertainmentsystem  $
 454                        fueltypeprimary  $
 455                        gvwr  $
 456                        make  $
 457                        manufacturer  $
 458                        model  $
 459                        modelyear
 460                        plantcity  $
 461                        seats  $
 462                        series  $
 463                        steeringlocation  $
 464                        transmissionstyle  $
 465                        trim  $
 466                        vehicletype  $
 467                        windows  $
 468                        axles  $
 469                        brakesystemtype  $
 470                        batterycells  $
 471                        bedlengthin  $
 472                        brakesystemdesc  $
 473                        curbweightlb  $
 474                        airbagloccurtain  $
 475                        airbaglocseatcushion  $
 476                        batterya  $
 477                        batteryv  $
 478                        batterykwh  $
 479                        wheelbasetype  $
 480                        seatrows  $
 481                        valvetraindesign  $
 482                        transmissionspeeds  $
 483                        engineconfiguration  $
 484                        airbaglocfront  $
 485                        fueltypesecondary  $
 486                        fuelinjectiontype  $
 487                        airbaglocknee  $
 488                        enginehp
 489                        evdriveunit  $
 490                        plantcountry  $
 491                        plantcompanyname  $
 492                        plantstate  $
 493                        pretensioner  $
 494                        seatbeltsall  $
 495                        adaptivecruisecontrol  $
 496                        adaptiveheadlights  $
 497                        abs  $
 498                        cib  $
 499                        blindspotmon  $
 500                        ncsabodytype  $
 501                        ncsamake  $
 502                        ncsamodel  $
 503                        esc  $
 504                        tractioncontrol  $
 505                        forwardcollisionwarning  $
 506                        lanedeparturewarning  $
 507                        lanekeepsystem  $
 508                        rearvisibilitysystem  $
 509                        parkassist  $
 510                        airbaglocside  $
 511                        trim2  $
 512                        series2  $
 513                        wheelbaseshort  $
 514                        wheelbaselong  $
 515                        note  $
 516                        wheels  $
 517                        trailertype  $
 518                        trailerbodytype  $
 519                        trailerlength  $
 520                        wheelsizefront  $
 521                        wheelsizerear  $
 522                        otherrestraintsysteminfo  $
 523                        coolingtype  $
 524                        enginehp_to  $
 525                        electrificationlevel  $
 526                        chargerlevel  $
 527                        chargerpowerkw  $
 528                        otherengineinfo  $
 529                        batterya_to  $
 530                        batteryv_to  $
 531                        batterykwh_to  $
 532                        turbo  $
 533                        baseprice  $
 534                        batterymodules  $
 535                        batterypacks  $
 536                        topspeedmph  $
 537                        suggestedvin  $
 538                        errorcode  $
 539                        possiblevalues  $
 540                        axleconfiguration  $
 541                        enginemanufacturer  $
 542                        buslength  $
 543                        busfloorconfigtype  $
 544                        bustype  $
 545                        otherbusinfo  $
 546                        custommotorcycletype  $
 547                        motorcyclesuspensiontype  $
 548                        motorcyclechassistype  $
 549                        othermotorcycleinfo  $
 550                        othertrailerinfo  $
 551                        additionalerrortext  $
 552                        cashforclunkers  $
 553                        trackwidth  $
 554                        tpms  $
 555                        activesafetysysnote  $
 556                        dynamicbrakesupport  $
 557                        pedestrianautomaticemergencybrak  $
 558                        autoreversesystem  $
 559                        automaticpedestrianalertingsound  $
 560                        can_aacn  $
 561                        edr  $
 562                        keylessignition  $
 563                        daytimerunninglight  $
 564                        lowerbeamheadlamplightsource  $
 565                        semiautomaticheadlampbeamswitchi  $
 566                        adaptivedrivingbeam  $
 567                        saeautomationlevel  $
 568                        saeautomationlevel_to  $
 569                        rearcrosstrafficalert  $
 570                        gcwr  $
 571                        gcwr_to  $
 572                        ncsanote  $
 573                        ncsamappingexception  $
 574                        ncsamapexcapprovedon  $
 575                        ncsamapexcapprovedby  $
 576                        gvwr_to  $
 577                        errortext  $
 578                        rearautomaticemergencybraking  $
 579                        blindspotintervention  $
 580                        lanecenteringassistance  $
 581                        nonlanduse  $
 582                        vehicledescriptor  $
 583            ;
 584            if _ERROR_ then call symputx('_EFIERR_',1);  /* set ERROR detection macro variable */
 585            run;
 
 NOTE: The infile OUT is:
       Filename=/saswork/SAS_workA65600006381_odaws02-usw2.oda.sas.com/#LN00169,
       Owner Name=fkhurshed,Group Name=oda,
       Access Permission=-rw-r--r--,
       Last Modified=12Dec2023:16:31:50,
       File Size (bytes)=3090
 
 NOTE: 1 record was read from the infile OUT.
       The minimum record length was 958.
       The maximum record length was 958.
 NOTE: The data set WORK.WANT has 1 observations and 150 variables.
 NOTE: DATA statement used (Total process time):
       real time           0.01 seconds
       user cpu time       0.00 seconds
       system cpu time     0.01 seconds
       memory              10176.56k
       OS Memory           32808.00k
       Timestamp           12/12/2023 11:31:50 PM
       Step Count                        250  Switch Count  2
       Page Faults                       0
       Page Reclaims                     199
       Page Swaps                        0
       Voluntary Context Switches        8
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           304
       
 
 1 rows created in WORK.WANT from OUT.
   
   
   
 NOTE: WORK.WANT data set was successfully created.
 NOTE: The data set WORK.WANT has 1 observations and 150 variables.
 NOTE: PROCEDURE IMPORT used (Total process time):
       real time           0.26 seconds
       user cpu time       0.22 seconds
       system cpu time     0.01 seconds
       memory              10176.56k
       OS Memory           32808.00k
       Timestamp           12/12/2023 11:31:50 PM
       Step Count                        250  Switch Count  10
       Page Faults                       0
       Page Reclaims                     2518
       Page Swaps                        0
       Voluntary Context Switches        52
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           384
       
 
 NOTE: Fileref OUT has been deassigned.
 
 NOTE: Appending WORK.WANT to WORK.VIN_DATA.
 NOTE: BASE data set does not exist. DATA file is being copied to BASE file.
 NOTE: There were 1 observations read from the data set WORK.WANT.
 NOTE: The data set WORK.VIN_DATA has 1 observations and 150 variables.
 NOTE: PROCEDURE APPEND used (Total process time):
       real time           0.00 seconds
       user cpu time       0.00 seconds
       system cpu time     0.00 seconds
       memory              1159.40k
       OS Memory           27572.00k
       Timestamp           12/12/2023 11:31:50 PM
       Step Count                        251  Switch Count  2
       Page Faults                       0
       Page Reclaims                     142
       Page Swaps                        0
       Voluntary Context Switches        9
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           272
       
 
 3         + datasets lib=work nodetails nolist; delete want; run;
 
 NOTE: Deleting WORK.WANT (memtype=DATA).
 3         +                                                      quit;
 
 NOTE: PROCEDURE DATASETS used (Total process time):
       real time           0.00 seconds
       user cpu time       0.00 seconds
       system cpu time     0.00 seconds
       memory              347.87k
       OS Memory           27052.00k
       Timestamp           12/12/2023 11:31:50 PM
       Step Count                        252  Switch Count  2
       Page Faults                       0
       Page Reclaims                     48
       Page Swaps                        0
       Voluntary Context Switches        9
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           8
       
 3         +                                                           ;
 
 4         + *set up space for api response; filename out temp;   *send API call; proc http  
 url="https://vpic.nhtsa.dot.gov/api/vehicles/DecodeVinValues/5UXWX7C5?format=csv&modelyear=2012"  method="get" out=out; run;  
 *import data - you will need to replace this
 WARNING: Apparent symbolic reference MODELYEAR not resolved.
 NOTE: 200 OK
 NOTE: PROCEDURE HTTP used (Total process time):
       real time           0.16 seconds
       user cpu time       0.00 seconds
       system cpu time     0.00 seconds
       memory              198.09k
       OS Memory           26792.00k
       Timestamp           12/12/2023 11:31:51 PM
       Step Count                        253  Switch Count  0
       Page Faults                       0
       Page Reclaims                     14
       Page Swaps                        0
       Voluntary Context Switches        7
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           16
       
 
 5         + with a data step to read the data. PROC IMPORT guesses at the data types;
 5         +                                                                           proc import datafile=out out=want dbms=csv 
 replace;
 5         +
 run;
 
 NOTE: Unable to open parameter catalog: SASUSER.PARMS.PARMS.SLIST in update mode. Temporary parameter values will be saved to 
 WORK.PARMS.PARMS.SLIST.
 Name pedestrianautomaticemergencybraking truncated to pedestrianautomaticemergencybrak.
 Name semiautomaticheadlampbeamswitching truncated to semiautomaticheadlampbeamswitchi.
 Problems were detected with provided names.  See LOG. 
 5         +
   *close out file reference; filename out;  *add record to the lookup data; proc append base=vin_data data=want;run;  proc
 586         /**********************************************************************
 587         *   PRODUCT:   SAS
 588         *   VERSION:   9.4
 589         *   CREATOR:   External File Interface
 590         *   DATE:      12DEC23
 591         *   DESC:      Generated SAS Datastep Code
 592         *   TEMPLATE SOURCE:  (None Specified.)
 593         ***********************************************************************/
 594            data WORK.WANT    ;
 595            %let _EFIERR_ = 0; /* set the ERROR detection macro variable */
 596            infile OUT delimiter = ',' MISSOVER DSD  firstobs=2 ;
 597               informat makeid best32. ;
 598               informat modelid best32. ;
 599               informat manufacturerid best32. ;
 600               informat vin $8. ;
 601               informat batteryinfo $1. ;
 602               informat batterytype $1. ;
 603               informat bedtype $1. ;
 604               informat bodycabtype $1. ;
 605               informat bodyclass $55. ;
 606               informat enginecylinders best32. ;
 607               informat destinationmarket $1. ;
 608               informat displacementcc best32. ;
 609               informat displacementci best32. ;
 610               informat displacementl best32. ;
 611               informat doors best32. ;
 612               informat drivetype $1. ;
 613               informat driverassist $1. ;
 614               informat enginecycles $1. ;
 615               informat enginemodel $1. ;
 616               informat enginekw best32. ;
 617               informat entertainmentsystem $1. ;
 618               informat fueltypeprimary $8. ;
 619               informat gvwr $47. ;
 620               informat make $3. ;
 621               informat manufacturer $48. ;
 622               informat model $2. ;
 623               informat modelyear best32. ;
 624               informat plantcity $1. ;
 625               informat seats $1. ;
 626               informat series $1. ;
 627               informat steeringlocation $1. ;
 628               informat transmissionstyle $1. ;
 629               informat trim $9. ;
 630               informat vehicletype $36. ;
 631               informat windows $1. ;
 632               informat axles $1. ;
 633               informat brakesystemtype $1. ;
 634               informat batterycells $1. ;
 635               informat bedlengthin $1. ;
 636               informat brakesystemdesc $1. ;
 637               informat curbweightlb $1. ;
 638               informat airbagloccurtain $1. ;
 639               informat airbaglocseatcushion $1. ;
 640               informat batterya $1. ;
 641               informat batteryv $1. ;
 642               informat batterykwh $1. ;
 643               informat wheelbasetype $1. ;
 644               informat seatrows $1. ;
 645               informat valvetraindesign $1. ;
 646               informat transmissionspeeds $1. ;
 647               informat engineconfiguration $1. ;
 648               informat airbaglocfront $30. ;
 649               informat fueltypesecondary $1. ;
 650               informat fuelinjectiontype $1. ;
 651               informat airbaglocknee $1. ;
 652               informat enginehp best32. ;
 653               informat evdriveunit $1. ;
 654               informat plantcountry $1. ;
 655               informat plantcompanyname $1. ;
 656               informat plantstate $1. ;
 657               informat pretensioner $3. ;
 658               informat seatbeltsall $6. ;
 659               informat adaptivecruisecontrol $1. ;
 660               informat adaptiveheadlights $1. ;
 661               informat abs $1. ;
 662               informat cib $1. ;
 663               informat blindspotmon $1. ;
 664               informat ncsabodytype $1. ;
 665               informat ncsamake $1. ;
 666               informat ncsamodel $1. ;
 667               informat esc $1. ;
 668               informat tractioncontrol $1. ;
 669               informat forwardcollisionwarning $1. ;
 670               informat lanedeparturewarning $1. ;
 671               informat lanekeepsystem $1. ;
 672               informat rearvisibilitysystem $1. ;
 673               informat parkassist $1. ;
 674               informat airbaglocside $30. ;
 675               informat trim2 $3. ;
 676               informat series2 $1. ;
 677               informat wheelbaseshort $1. ;
 678               informat wheelbaselong $1. ;
 679               informat note $1. ;
 680               informat wheels $1. ;
 681               informat trailertype $14. ;
 682               informat trailerbodytype $14. ;
 683               informat trailerlength $1. ;
 684               informat wheelsizefront $1. ;
 685               informat wheelsizerear $1. ;
 686               informat otherrestraintsysteminfo $202. ;
 687               informat coolingtype $1. ;
 688               informat enginehp_to $1. ;
 689               informat electrificationlevel $1. ;
 690               informat chargerlevel $1. ;
 691               informat chargerpowerkw $1. ;
 692               informat otherengineinfo $1. ;
 693               informat batterya_to $1. ;
 694               informat batteryv_to $1. ;
 695               informat batterykwh_to $1. ;
 696               informat turbo $1. ;
 697               informat baseprice $1. ;
 698               informat batterymodules $1. ;
 699               informat batterypacks $1. ;
 700               informat topspeedmph $1. ;
 701               informat suggestedvin $1. ;
 702               informat errorcode $6. ;
 703               informat possiblevalues $1. ;
 704               informat axleconfiguration $1. ;
 705               informat enginemanufacturer $1. ;
 706               informat buslength $1. ;
 707               informat busfloorconfigtype $14. ;
 708               informat bustype $14. ;
 709               informat otherbusinfo $1. ;
 710               informat custommotorcycletype $14. ;
 711               informat motorcyclesuspensiontype $14. ;
 712               informat motorcyclechassistype $14. ;
 713               informat othermotorcycleinfo $1. ;
 714               informat othertrailerinfo $1. ;
 715               informat additionalerrortext $1. ;
 716               informat cashforclunkers $1. ;
 717               informat trackwidth $1. ;
 718               informat tpms $6. ;
 719               informat activesafetysysnote $1. ;
 720               informat dynamicbrakesupport $1. ;
 721               informat pedestrianautomaticemergencybrak $1. ;
 722               informat autoreversesystem $1. ;
 723               informat automaticpedestrianalertingsound $1. ;
 724               informat can_aacn $1. ;
 725               informat edr $1. ;
 726               informat keylessignition $1. ;
 727               informat daytimerunninglight $1. ;
 728               informat lowerbeamheadlamplightsource $1. ;
 729               informat semiautomaticheadlampbeamswitchi $1. ;
 730               informat adaptivedrivingbeam $1. ;
 731               informat saeautomationlevel $1. ;
 732               informat saeautomationlevel_to $1. ;
 733               informat rearcrosstrafficalert $1. ;
 734               informat gcwr $1. ;
 735               informat gcwr_to $1. ;
 736               informat ncsanote $1. ;
 737               informat ncsamappingexception $1. ;
 738               informat ncsamapexcapprovedon $1. ;
 739               informat ncsamapexcapprovedby $1. ;
 740               informat gvwr_to $1. ;
 741               informat errortext $151. ;
 742               informat rearautomaticemergencybraking $1. ;
 743               informat blindspotintervention $1. ;
 744               informat lanecenteringassistance $1. ;
 745               informat nonlanduse $1. ;
 746               informat vehicledescriptor $11. ;
 747               format makeid best12. ;
 748               format modelid best12. ;
 749               format manufacturerid best12. ;
 750               format vin $8. ;
 751               format batteryinfo $1. ;
 752               format batterytype $1. ;
 753               format bedtype $1. ;
 754               format bodycabtype $1. ;
 755               format bodyclass $55. ;
 756               format enginecylinders best12. ;
 757               format destinationmarket $1. ;
 758               format displacementcc best12. ;
 759               format displacementci best12. ;
 760               format displacementl best12. ;
 761               format doors best12. ;
 762               format drivetype $1. ;
 763               format driverassist $1. ;
 764               format enginecycles $1. ;
 765               format enginemodel $1. ;
 766               format enginekw best12. ;
 767               format entertainmentsystem $1. ;
 768               format fueltypeprimary $8. ;
 769               format gvwr $47. ;
 770               format make $3. ;
 771               format manufacturer $48. ;
 772               format model $2. ;
 773               format modelyear best12. ;
 774               format plantcity $1. ;
 775               format seats $1. ;
 776               format series $1. ;
 777               format steeringlocation $1. ;
 778               format transmissionstyle $1. ;
 779               format trim $9. ;
 780               format vehicletype $36. ;
 781               format windows $1. ;
 782               format axles $1. ;
 783               format brakesystemtype $1. ;
 784               format batterycells $1. ;
 785               format bedlengthin $1. ;
 786               format brakesystemdesc $1. ;
 787               format curbweightlb $1. ;
 788               format airbagloccurtain $1. ;
 789               format airbaglocseatcushion $1. ;
 790               format batterya $1. ;
 791               format batteryv $1. ;
 792               format batterykwh $1. ;
 793               format wheelbasetype $1. ;
 794               format seatrows $1. ;
 795               format valvetraindesign $1. ;
 796               format transmissionspeeds $1. ;
 797               format engineconfiguration $1. ;
 798               format airbaglocfront $30. ;
 799               format fueltypesecondary $1. ;
 800               format fuelinjectiontype $1. ;
 801               format airbaglocknee $1. ;
 802               format enginehp best12. ;
 803               format evdriveunit $1. ;
 804               format plantcountry $1. ;
 805               format plantcompanyname $1. ;
 806               format plantstate $1. ;
 807               format pretensioner $3. ;
 808               format seatbeltsall $6. ;
 809               format adaptivecruisecontrol $1. ;
 810               format adaptiveheadlights $1. ;
 811               format abs $1. ;
 812               format cib $1. ;
 813               format blindspotmon $1. ;
 814               format ncsabodytype $1. ;
 815               format ncsamake $1. ;
 816               format ncsamodel $1. ;
 817               format esc $1. ;
 818               format tractioncontrol $1. ;
 819               format forwardcollisionwarning $1. ;
 820               format lanedeparturewarning $1. ;
 821               format lanekeepsystem $1. ;
 822               format rearvisibilitysystem $1. ;
 823               format parkassist $1. ;
 824               format airbaglocside $30. ;
 825               format trim2 $3. ;
 826               format series2 $1. ;
 827               format wheelbaseshort $1. ;
 828               format wheelbaselong $1. ;
 829               format note $1. ;
 830               format wheels $1. ;
 831               format trailertype $14. ;
 832               format trailerbodytype $14. ;
 833               format trailerlength $1. ;
 834               format wheelsizefront $1. ;
 835               format wheelsizerear $1. ;
 836               format otherrestraintsysteminfo $202. ;
 837               format coolingtype $1. ;
 838               format enginehp_to $1. ;
 839               format electrificationlevel $1. ;
 840               format chargerlevel $1. ;
 841               format chargerpowerkw $1. ;
 842               format otherengineinfo $1. ;
 843               format batterya_to $1. ;
 844               format batteryv_to $1. ;
 845               format batterykwh_to $1. ;
 846               format turbo $1. ;
 847               format baseprice $1. ;
 848               format batterymodules $1. ;
 849               format batterypacks $1. ;
 850               format topspeedmph $1. ;
 851               format suggestedvin $1. ;
 852               format errorcode $6. ;
 853               format possiblevalues $1. ;
 854               format axleconfiguration $1. ;
 855               format enginemanufacturer $1. ;
 856               format buslength $1. ;
 857               format busfloorconfigtype $14. ;
 858               format bustype $14. ;
 859               format otherbusinfo $1. ;
 860               format custommotorcycletype $14. ;
 861               format motorcyclesuspensiontype $14. ;
 862               format motorcyclechassistype $14. ;
 863               format othermotorcycleinfo $1. ;
 864               format othertrailerinfo $1. ;
 865               format additionalerrortext $1. ;
 866               format cashforclunkers $1. ;
 867               format trackwidth $1. ;
 868               format tpms $6. ;
 869               format activesafetysysnote $1. ;
 870               format dynamicbrakesupport $1. ;
 871               format pedestrianautomaticemergencybrak $1. ;
 872               format autoreversesystem $1. ;
 873               format automaticpedestrianalertingsound $1. ;
 874               format can_aacn $1. ;
 875               format edr $1. ;
 876               format keylessignition $1. ;
 877               format daytimerunninglight $1. ;
 878               format lowerbeamheadlamplightsource $1. ;
 879               format semiautomaticheadlampbeamswitchi $1. ;
 880               format adaptivedrivingbeam $1. ;
 881               format saeautomationlevel $1. ;
 882               format saeautomationlevel_to $1. ;
 883               format rearcrosstrafficalert $1. ;
 884               format gcwr $1. ;
 885               format gcwr_to $1. ;
 886               format ncsanote $1. ;
 887               format ncsamappingexception $1. ;
 888               format ncsamapexcapprovedon $1. ;
 889               format ncsamapexcapprovedby $1. ;
 890               format gvwr_to $1. ;
 891               format errortext $151. ;
 892               format rearautomaticemergencybraking $1. ;
 893               format blindspotintervention $1. ;
 894               format lanecenteringassistance $1. ;
 895               format nonlanduse $1. ;
 896               format vehicledescriptor $11. ;
 897            input
 898                        makeid
 899                        modelid
 900                        manufacturerid
 901                        vin  $
 902                        batteryinfo  $
 903                        batterytype  $
 904                        bedtype  $
 905                        bodycabtype  $
 906                        bodyclass  $
 907                        enginecylinders
 908                        destinationmarket  $
 909                        displacementcc
 910                        displacementci
 911                        displacementl
 912                        doors
 913                        drivetype  $
 914                        driverassist  $
 915                        enginecycles  $
 916                        enginemodel  $
 917                        enginekw
 918                        entertainmentsystem  $
 919                        fueltypeprimary  $
 920                        gvwr  $
 921                        make  $
 922                        manufacturer  $
 923                        model  $
 924                        modelyear
 925                        plantcity  $
 926                        seats  $
 927                        series  $
 928                        steeringlocation  $
 929                        transmissionstyle  $
 930                        trim  $
 931                        vehicletype  $
 932                        windows  $
 933                        axles  $
 934                        brakesystemtype  $
 935                        batterycells  $
 936                        bedlengthin  $
 937                        brakesystemdesc  $
 938                        curbweightlb  $
 939                        airbagloccurtain  $
 940                        airbaglocseatcushion  $
 941                        batterya  $
 942                        batteryv  $
 943                        batterykwh  $
 944                        wheelbasetype  $
 945                        seatrows  $
 946                        valvetraindesign  $
 947                        transmissionspeeds  $
 948                        engineconfiguration  $
 949                        airbaglocfront  $
 950                        fueltypesecondary  $
 951                        fuelinjectiontype  $
 952                        airbaglocknee  $
 953                        enginehp
 954                        evdriveunit  $
 955                        plantcountry  $
 956                        plantcompanyname  $
 957                        plantstate  $
 958                        pretensioner  $
 959                        seatbeltsall  $
 960                        adaptivecruisecontrol  $
 961                        adaptiveheadlights  $
 962                        abs  $
 963                        cib  $
 964                        blindspotmon  $
 965                        ncsabodytype  $
 966                        ncsamake  $
 967                        ncsamodel  $
 968                        esc  $
 969                        tractioncontrol  $
 970                        forwardcollisionwarning  $
 971                        lanedeparturewarning  $
 972                        lanekeepsystem  $
 973                        rearvisibilitysystem  $
 974                        parkassist  $
 975                        airbaglocside  $
 976                        trim2  $
 977                        series2  $
 978                        wheelbaseshort  $
 979                        wheelbaselong  $
 980                        note  $
 981                        wheels  $
 982                        trailertype  $
 983                        trailerbodytype  $
 984                        trailerlength  $
 985                        wheelsizefront  $
 986                        wheelsizerear  $
 987                        otherrestraintsysteminfo  $
 988                        coolingtype  $
 989                        enginehp_to  $
 990                        electrificationlevel  $
 991                        chargerlevel  $
 992                        chargerpowerkw  $
 993                        otherengineinfo  $
 994                        batterya_to  $
 995                        batteryv_to  $
 996                        batterykwh_to  $
 997                        turbo  $
 998                        baseprice  $
 999                        batterymodules  $
 1000                       batterypacks  $
 1001                       topspeedmph  $
 1002                       suggestedvin  $
 1003                       errorcode  $
 1004                       possiblevalues  $
 1005                       axleconfiguration  $
 1006                       enginemanufacturer  $
 1007                       buslength  $
 1008                       busfloorconfigtype  $
 1009                       bustype  $
 1010                       otherbusinfo  $
 1011                       custommotorcycletype  $
 1012                       motorcyclesuspensiontype  $
 1013                       motorcyclechassistype  $
 1014                       othermotorcycleinfo  $
 1015                       othertrailerinfo  $
 1016                       additionalerrortext  $
 1017                       cashforclunkers  $
 1018                       trackwidth  $
 1019                       tpms  $
 1020                       activesafetysysnote  $
 1021                       dynamicbrakesupport  $
 1022                       pedestrianautomaticemergencybrak  $
 1023                       autoreversesystem  $
 1024                       automaticpedestrianalertingsound  $
 1025                       can_aacn  $
 1026                       edr  $
 1027                       keylessignition  $
 1028                       daytimerunninglight  $
 1029                       lowerbeamheadlamplightsource  $
 1030                       semiautomaticheadlampbeamswitchi  $
 1031                       adaptivedrivingbeam  $
 1032                       saeautomationlevel  $
 1033                       saeautomationlevel_to  $
 1034                       rearcrosstrafficalert  $
 1035                       gcwr  $
 1036                       gcwr_to  $
 1037                       ncsanote  $
 1038                       ncsamappingexception  $
 1039                       ncsamapexcapprovedon  $
 1040                       ncsamapexcapprovedby  $
 1041                       gvwr_to  $
 1042                       errortext  $
 1043                       rearautomaticemergencybraking  $
 1044                       blindspotintervention  $
 1045                       lanecenteringassistance  $
 1046                       nonlanduse  $
 1047                       vehicledescriptor  $
 1048           ;
 1049           if _ERROR_ then call symputx('_EFIERR_',1);  /* set ERROR detection macro variable */
 1050           run;
 
 NOTE: The infile OUT is:
       Filename=/saswork/SAS_workA65600006381_odaws02-usw2.oda.sas.com/#LN00170,
       Owner Name=fkhurshed,Group Name=oda,
       Access Permission=-rw-r--r--,
       Last Modified=12Dec2023:16:31:51,
       File Size (bytes)=3090
 
 NOTE: 1 record was read from the infile OUT.
       The minimum record length was 958.
       The maximum record length was 958.
 NOTE: The data set WORK.WANT has 1 observations and 150 variables.
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       user cpu time       0.01 seconds
       system cpu time     0.00 seconds
       memory              10181.90k
       OS Memory           32808.00k
       Timestamp           12/12/2023 11:31:51 PM
       Step Count                        254  Switch Count  2
       Page Faults                       0
       Page Reclaims                     180
       Page Swaps                        0
       Voluntary Context Switches        11
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           304
       
 
 1 rows created in WORK.WANT from OUT.
   
   
   
 NOTE: WORK.WANT data set was successfully created.
 NOTE: The data set WORK.WANT has 1 observations and 150 variables.
 NOTE: PROCEDURE IMPORT used (Total process time):
       real time           0.16 seconds
       user cpu time       0.16 seconds
       system cpu time     0.00 seconds
       memory              10181.90k
       OS Memory           32808.00k
       Timestamp           12/12/2023 11:31:51 PM
       Step Count                        254  Switch Count  10
       Page Faults                       0
       Page Reclaims                     2509
       Page Swaps                        0
       Voluntary Context Switches        53
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           344
       
 
 NOTE: Fileref OUT has been deassigned.
 
 NOTE: Appending WORK.WANT to WORK.VIN_DATA.
 NOTE: There were 1 observations read from the data set WORK.WANT.
 NOTE: 1 observations added.
 NOTE: The data set WORK.VIN_DATA has 2 observations and 150 variables.
 NOTE: PROCEDURE APPEND used (Total process time):
       real time           0.00 seconds
       user cpu time       0.00 seconds
       system cpu time     0.00 seconds
       memory              979.90k
       OS Memory           27572.00k
       Timestamp           12/12/2023 11:31:51 PM
       Step Count                        255  Switch Count  0
       Page Faults                       0
       Page Reclaims                     116
       Page Swaps                        0
       Voluntary Context Switches        0
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           8
       
 
 6         + datasets lib=work nodetails nolist; delete want; run;
 
 NOTE: Deleting WORK.WANT (memtype=DATA).
 6         +                                                      quit;
 
 NOTE: PROCEDURE DATASETS used (Total process time):
       real time           0.00 seconds
       user cpu time       0.00 seconds
       system cpu time     0.00 seconds
       memory              347.87k
       OS Memory           27052.00k
       Timestamp           12/12/2023 11:31:51 PM
       Step Count                        256  Switch Count  2
       Page Faults                       0
       Page Reclaims                     48
       Page Swaps                        0
       Voluntary Context Switches        9
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           8
       
 6         +                                                           ;
 
 7         + *set up space for api response; filename out temp;   *send API call; proc http  
 url="https://vpic.nhtsa.dot.gov/api/vehicles/DecodeVinValues/5UXWX7C5?format=csv&modelyear=2013"  method="get" out=out; run;  
 *import data - you will need to replace this
 WARNING: Apparent symbolic reference MODELYEAR not resolved.
 NOTE: 200 OK
 NOTE: PROCEDURE HTTP used (Total process time):
       real time           0.18 seconds
       user cpu time       0.00 seconds
       system cpu time     0.00 seconds
       memory              198.09k
       OS Memory           26792.00k
       Timestamp           12/12/2023 11:31:51 PM
       Step Count                        257  Switch Count  0
       Page Faults                       0
       Page Reclaims                     14
       Page Swaps                        0
       Voluntary Context Switches        7
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           8
       
 
 8         + with a data step to read the data. PROC IMPORT guesses at the data types;
 8         +                                                                           proc import datafile=out out=want dbms=csv 
 replace;
 8         +
 run;
 
 NOTE: Unable to open parameter catalog: SASUSER.PARMS.PARMS.SLIST in update mode. Temporary parameter values will be saved to 
 WORK.PARMS.PARMS.SLIST.
 Name pedestrianautomaticemergencybraking truncated to pedestrianautomaticemergencybrak.
 Name semiautomaticheadlampbeamswitching truncated to semiautomaticheadlampbeamswitchi.
 Problems were detected with provided names.  See LOG. 
 8         +
   *close out file reference; filename out;  *add record to the lookup data; proc append base=vin_data data=want;run;  proc
 1051        /**********************************************************************
 1052        *   PRODUCT:   SAS
 1053        *   VERSION:   9.4
 1054        *   CREATOR:   External File Interface
 1055        *   DATE:      12DEC23
 1056        *   DESC:      Generated SAS Datastep Code
 1057        *   TEMPLATE SOURCE:  (None Specified.)
 1058        ***********************************************************************/
 1059           data WORK.WANT    ;
 1060           %let _EFIERR_ = 0; /* set the ERROR detection macro variable */
 1061           infile OUT delimiter = ',' MISSOVER DSD  firstobs=2 ;
 1062              informat makeid best32. ;
 1063              informat modelid best32. ;
 1064              informat manufacturerid best32. ;
 1065              informat vin $8. ;
 1066              informat batteryinfo $1. ;
 1067              informat batterytype $1. ;
 1068              informat bedtype $1. ;
 1069              informat bodycabtype $1. ;
 1070              informat bodyclass $55. ;
 1071              informat enginecylinders best32. ;
 1072              informat destinationmarket $1. ;
 1073              informat displacementcc best32. ;
 1074              informat displacementci best32. ;
 1075              informat displacementl best32. ;
 1076              informat doors best32. ;
 1077              informat drivetype $1. ;
 1078              informat driverassist $1. ;
 1079              informat enginecycles $1. ;
 1080              informat enginemodel $1. ;
 1081              informat enginekw best32. ;
 1082              informat entertainmentsystem $1. ;
 1083              informat fueltypeprimary $8. ;
 1084              informat gvwr $47. ;
 1085              informat make $3. ;
 1086              informat manufacturer $48. ;
 1087              informat model $2. ;
 1088              informat modelyear best32. ;
 1089              informat plantcity $1. ;
 1090              informat seats $1. ;
 1091              informat series $1. ;
 1092              informat steeringlocation $1. ;
 1093              informat transmissionstyle $1. ;
 1094              informat trim $9. ;
 1095              informat vehicletype $36. ;
 1096              informat windows $1. ;
 1097              informat axles $1. ;
 1098              informat brakesystemtype $1. ;
 1099              informat batterycells $1. ;
 1100              informat bedlengthin $1. ;
 1101              informat brakesystemdesc $1. ;
 1102              informat curbweightlb $1. ;
 1103              informat airbagloccurtain $16. ;
 1104              informat airbaglocseatcushion $1. ;
 1105              informat batterya $1. ;
 1106              informat batteryv $1. ;
 1107              informat batterykwh $1. ;
 1108              informat wheelbasetype $1. ;
 1109              informat seatrows $1. ;
 1110              informat valvetraindesign $1. ;
 1111              informat transmissionspeeds $1. ;
 1112              informat engineconfiguration $1. ;
 1113              informat airbaglocfront $30. ;
 1114              informat fueltypesecondary $1. ;
 1115              informat fuelinjectiontype $1. ;
 1116              informat airbaglocknee $16. ;
 1117              informat enginehp best32. ;
 1118              informat evdriveunit $1. ;
 1119              informat plantcountry $1. ;
 1120              informat plantcompanyname $1. ;
 1121              informat plantstate $1. ;
 1122              informat pretensioner $3. ;
 1123              informat seatbeltsall $6. ;
 1124              informat adaptivecruisecontrol $1. ;
 1125              informat adaptiveheadlights $1. ;
 1126              informat abs $1. ;
 1127              informat cib $1. ;
 1128              informat blindspotmon $1. ;
 1129              informat ncsabodytype $1. ;
 1130              informat ncsamake $1. ;
 1131              informat ncsamodel $1. ;
 1132              informat esc $1. ;
 1133              informat tractioncontrol $1. ;
 1134              informat forwardcollisionwarning $1. ;
 1135              informat lanedeparturewarning $1. ;
 1136              informat lanekeepsystem $1. ;
 1137              informat rearvisibilitysystem $1. ;
 1138              informat parkassist $1. ;
 1139              informat airbaglocside $30. ;
 1140              informat trim2 $3. ;
 1141              informat series2 $1. ;
 1142              informat wheelbaseshort $1. ;
 1143              informat wheelbaselong $1. ;
 1144              informat note $1. ;
 1145              informat wheels $1. ;
 1146              informat trailertype $14. ;
 1147              informat trailerbodytype $14. ;
 1148              informat trailerlength $1. ;
 1149              informat wheelsizefront $1. ;
 1150              informat wheelsizerear $1. ;
 1151              informat otherrestraintsysteminfo $1. ;
 1152              informat coolingtype $1. ;
 1153              informat enginehp_to $1. ;
 1154              informat electrificationlevel $1. ;
 1155              informat chargerlevel $1. ;
 1156              informat chargerpowerkw $1. ;
 1157              informat otherengineinfo $1. ;
 1158              informat batterya_to $1. ;
 1159              informat batteryv_to $1. ;
 1160              informat batterykwh_to $1. ;
 1161              informat turbo $1. ;
 1162              informat baseprice $1. ;
 1163              informat batterymodules $1. ;
 1164              informat batterypacks $1. ;
 1165              informat topspeedmph $1. ;
 1166              informat suggestedvin $1. ;
 1167              informat errorcode $6. ;
 1168              informat possiblevalues $1. ;
 1169              informat axleconfiguration $1. ;
 1170              informat enginemanufacturer $1. ;
 1171              informat buslength $1. ;
 1172              informat busfloorconfigtype $14. ;
 1173              informat bustype $14. ;
 1174              informat otherbusinfo $1. ;
 1175              informat custommotorcycletype $14. ;
 1176              informat motorcyclesuspensiontype $14. ;
 1177              informat motorcyclechassistype $14. ;
 1178              informat othermotorcycleinfo $1. ;
 1179              informat othertrailerinfo $1. ;
 1180              informat additionalerrortext $1. ;
 1181              informat cashforclunkers $1. ;
 1182              informat trackwidth $1. ;
 1183              informat tpms $6. ;
 1184              informat activesafetysysnote $1. ;
 1185              informat dynamicbrakesupport $1. ;
 1186              informat pedestrianautomaticemergencybrak $1. ;
 1187              informat autoreversesystem $1. ;
 1188              informat automaticpedestrianalertingsound $1. ;
 1189              informat can_aacn $1. ;
 1190              informat edr $1. ;
 1191              informat keylessignition $1. ;
 1192              informat daytimerunninglight $1. ;
 1193              informat lowerbeamheadlamplightsource $1. ;
 1194              informat semiautomaticheadlampbeamswitchi $1. ;
 1195              informat adaptivedrivingbeam $1. ;
 1196              informat saeautomationlevel $1. ;
 1197              informat saeautomationlevel_to $1. ;
 1198              informat rearcrosstrafficalert $1. ;
 1199              informat gcwr $1. ;
 1200              informat gcwr_to $1. ;
 1201              informat ncsanote $1. ;
 1202              informat ncsamappingexception $1. ;
 1203              informat ncsamapexcapprovedon $1. ;
 1204              informat ncsamapexcapprovedby $1. ;
 1205              informat gvwr_to $1. ;
 1206              informat errortext $151. ;
 1207              informat rearautomaticemergencybraking $1. ;
 1208              informat blindspotintervention $1. ;
 1209              informat lanecenteringassistance $1. ;
 1210              informat nonlanduse $1. ;
 1211              informat vehicledescriptor $11. ;
 1212              format makeid best12. ;
 1213              format modelid best12. ;
 1214              format manufacturerid best12. ;
 1215              format vin $8. ;
 1216              format batteryinfo $1. ;
 1217              format batterytype $1. ;
 1218              format bedtype $1. ;
 1219              format bodycabtype $1. ;
 1220              format bodyclass $55. ;
 1221              format enginecylinders best12. ;
 1222              format destinationmarket $1. ;
 1223              format displacementcc best12. ;
 1224              format displacementci best12. ;
 1225              format displacementl best12. ;
 1226              format doors best12. ;
 1227              format drivetype $1. ;
 1228              format driverassist $1. ;
 1229              format enginecycles $1. ;
 1230              format enginemodel $1. ;
 1231              format enginekw best12. ;
 1232              format entertainmentsystem $1. ;
 1233              format fueltypeprimary $8. ;
 1234              format gvwr $47. ;
 1235              format make $3. ;
 1236              format manufacturer $48. ;
 1237              format model $2. ;
 1238              format modelyear best12. ;
 1239              format plantcity $1. ;
 1240              format seats $1. ;
 1241              format series $1. ;
 1242              format steeringlocation $1. ;
 1243              format transmissionstyle $1. ;
 1244              format trim $9. ;
 1245              format vehicletype $36. ;
 1246              format windows $1. ;
 1247              format axles $1. ;
 1248              format brakesystemtype $1. ;
 1249              format batterycells $1. ;
 1250              format bedlengthin $1. ;
 1251              format brakesystemdesc $1. ;
 1252              format curbweightlb $1. ;
 1253              format airbagloccurtain $16. ;
 1254              format airbaglocseatcushion $1. ;
 1255              format batterya $1. ;
 1256              format batteryv $1. ;
 1257              format batterykwh $1. ;
 1258              format wheelbasetype $1. ;
 1259              format seatrows $1. ;
 1260              format valvetraindesign $1. ;
 1261              format transmissionspeeds $1. ;
 1262              format engineconfiguration $1. ;
 1263              format airbaglocfront $30. ;
 1264              format fueltypesecondary $1. ;
 1265              format fuelinjectiontype $1. ;
 1266              format airbaglocknee $16. ;
 1267              format enginehp best12. ;
 1268              format evdriveunit $1. ;
 1269              format plantcountry $1. ;
 1270              format plantcompanyname $1. ;
 1271              format plantstate $1. ;
 1272              format pretensioner $3. ;
 1273              format seatbeltsall $6. ;
 1274              format adaptivecruisecontrol $1. ;
 1275              format adaptiveheadlights $1. ;
 1276              format abs $1. ;
 1277              format cib $1. ;
 1278              format blindspotmon $1. ;
 1279              format ncsabodytype $1. ;
 1280              format ncsamake $1. ;
 1281              format ncsamodel $1. ;
 1282              format esc $1. ;
 1283              format tractioncontrol $1. ;
 1284              format forwardcollisionwarning $1. ;
 1285              format lanedeparturewarning $1. ;
 1286              format lanekeepsystem $1. ;
 1287              format rearvisibilitysystem $1. ;
 1288              format parkassist $1. ;
 1289              format airbaglocside $30. ;
 1290              format trim2 $3. ;
 1291              format series2 $1. ;
 1292              format wheelbaseshort $1. ;
 1293              format wheelbaselong $1. ;
 1294              format note $1. ;
 1295              format wheels $1. ;
 1296              format trailertype $14. ;
 1297              format trailerbodytype $14. ;
 1298              format trailerlength $1. ;
 1299              format wheelsizefront $1. ;
 1300              format wheelsizerear $1. ;
 1301              format otherrestraintsysteminfo $1. ;
 1302              format coolingtype $1. ;
 1303              format enginehp_to $1. ;
 1304              format electrificationlevel $1. ;
 1305              format chargerlevel $1. ;
 1306              format chargerpowerkw $1. ;
 1307              format otherengineinfo $1. ;
 1308              format batterya_to $1. ;
 1309              format batteryv_to $1. ;
 1310              format batterykwh_to $1. ;
 1311              format turbo $1. ;
 1312              format baseprice $1. ;
 1313              format batterymodules $1. ;
 1314              format batterypacks $1. ;
 1315              format topspeedmph $1. ;
 1316              format suggestedvin $1. ;
 1317              format errorcode $6. ;
 1318              format possiblevalues $1. ;
 1319              format axleconfiguration $1. ;
 1320              format enginemanufacturer $1. ;
 1321              format buslength $1. ;
 1322              format busfloorconfigtype $14. ;
 1323              format bustype $14. ;
 1324              format otherbusinfo $1. ;
 1325              format custommotorcycletype $14. ;
 1326              format motorcyclesuspensiontype $14. ;
 1327              format motorcyclechassistype $14. ;
 1328              format othermotorcycleinfo $1. ;
 1329              format othertrailerinfo $1. ;
 1330              format additionalerrortext $1. ;
 1331              format cashforclunkers $1. ;
 1332              format trackwidth $1. ;
 1333              format tpms $6. ;
 1334              format activesafetysysnote $1. ;
 1335              format dynamicbrakesupport $1. ;
 1336              format pedestrianautomaticemergencybrak $1. ;
 1337              format autoreversesystem $1. ;
 1338              format automaticpedestrianalertingsound $1. ;
 1339              format can_aacn $1. ;
 1340              format edr $1. ;
 1341              format keylessignition $1. ;
 1342              format daytimerunninglight $1. ;
 1343              format lowerbeamheadlamplightsource $1. ;
 1344              format semiautomaticheadlampbeamswitchi $1. ;
 1345              format adaptivedrivingbeam $1. ;
 1346              format saeautomationlevel $1. ;
 1347              format saeautomationlevel_to $1. ;
 1348              format rearcrosstrafficalert $1. ;
 1349              format gcwr $1. ;
 1350              format gcwr_to $1. ;
 1351              format ncsanote $1. ;
 1352              format ncsamappingexception $1. ;
 1353              format ncsamapexcapprovedon $1. ;
 1354              format ncsamapexcapprovedby $1. ;
 1355              format gvwr_to $1. ;
 1356              format errortext $151. ;
 1357              format rearautomaticemergencybraking $1. ;
 1358              format blindspotintervention $1. ;
 1359              format lanecenteringassistance $1. ;
 1360              format nonlanduse $1. ;
 1361              format vehicledescriptor $11. ;
 1362           input
 1363                       makeid
 1364                       modelid
 1365                       manufacturerid
 1366                       vin  $
 1367                       batteryinfo  $
 1368                       batterytype  $
 1369                       bedtype  $
 1370                       bodycabtype  $
 1371                       bodyclass  $
 1372                       enginecylinders
 1373                       destinationmarket  $
 1374                       displacementcc
 1375                       displacementci
 1376                       displacementl
 1377                       doors
 1378                       drivetype  $
 1379                       driverassist  $
 1380                       enginecycles  $
 1381                       enginemodel  $
 1382                       enginekw
 1383                       entertainmentsystem  $
 1384                       fueltypeprimary  $
 1385                       gvwr  $
 1386                       make  $
 1387                       manufacturer  $
 1388                       model  $
 1389                       modelyear
 1390                       plantcity  $
 1391                       seats  $
 1392                       series  $
 1393                       steeringlocation  $
 1394                       transmissionstyle  $
 1395                       trim  $
 1396                       vehicletype  $
 1397                       windows  $
 1398                       axles  $
 1399                       brakesystemtype  $
 1400                       batterycells  $
 1401                       bedlengthin  $
 1402                       brakesystemdesc  $
 1403                       curbweightlb  $
 1404                       airbagloccurtain  $
 1405                       airbaglocseatcushion  $
 1406                       batterya  $
 1407                       batteryv  $
 1408                       batterykwh  $
 1409                       wheelbasetype  $
 1410                       seatrows  $
 1411                       valvetraindesign  $
 1412                       transmissionspeeds  $
 1413                       engineconfiguration  $
 1414                       airbaglocfront  $
 1415                       fueltypesecondary  $
 1416                       fuelinjectiontype  $
 1417                       airbaglocknee  $
 1418                       enginehp
 1419                       evdriveunit  $
 1420                       plantcountry  $
 1421                       plantcompanyname  $
 1422                       plantstate  $
 1423                       pretensioner  $
 1424                       seatbeltsall  $
 1425                       adaptivecruisecontrol  $
 1426                       adaptiveheadlights  $
 1427                       abs  $
 1428                       cib  $
 1429                       blindspotmon  $
 1430                       ncsabodytype  $
 1431                       ncsamake  $
 1432                       ncsamodel  $
 1433                       esc  $
 1434                       tractioncontrol  $
 1435                       forwardcollisionwarning  $
 1436                       lanedeparturewarning  $
 1437                       lanekeepsystem  $
 1438                       rearvisibilitysystem  $
 1439                       parkassist  $
 1440                       airbaglocside  $
 1441                       trim2  $
 1442                       series2  $
 1443                       wheelbaseshort  $
 1444                       wheelbaselong  $
 1445                       note  $
 1446                       wheels  $
 1447                       trailertype  $
 1448                       trailerbodytype  $
 1449                       trailerlength  $
 1450                       wheelsizefront  $
 1451                       wheelsizerear  $
 1452                       otherrestraintsysteminfo  $
 1453                       coolingtype  $
 1454                       enginehp_to  $
 1455                       electrificationlevel  $
 1456                       chargerlevel  $
 1457                       chargerpowerkw  $
 1458                       otherengineinfo  $
 1459                       batterya_to  $
 1460                       batteryv_to  $
 1461                       batterykwh_to  $
 1462                       turbo  $
 1463                       baseprice  $
 1464                       batterymodules  $
 1465                       batterypacks  $
 1466                       topspeedmph  $
 1467                       suggestedvin  $
 1468                       errorcode  $
 1469                       possiblevalues  $
 1470                       axleconfiguration  $
 1471                       enginemanufacturer  $
 1472                       buslength  $
 1473                       busfloorconfigtype  $
 1474                       bustype  $
 1475                       otherbusinfo  $
 1476                       custommotorcycletype  $
 1477                       motorcyclesuspensiontype  $
 1478                       motorcyclechassistype  $
 1479                       othermotorcycleinfo  $
 1480                       othertrailerinfo  $
 1481                       additionalerrortext  $
 1482                       cashforclunkers  $
 1483                       trackwidth  $
 1484                       tpms  $
 1485                       activesafetysysnote  $
 1486                       dynamicbrakesupport  $
 1487                       pedestrianautomaticemergencybrak  $
 1488                       autoreversesystem  $
 1489                       automaticpedestrianalertingsound  $
 1490                       can_aacn  $
 1491                       edr  $
 1492                       keylessignition  $
 1493                       daytimerunninglight  $
 1494                       lowerbeamheadlamplightsource  $
 1495                       semiautomaticheadlampbeamswitchi  $
 1496                       adaptivedrivingbeam  $
 1497                       saeautomationlevel  $
 1498                       saeautomationlevel_to  $
 1499                       rearcrosstrafficalert  $
 1500                       gcwr  $
 1501                       gcwr_to  $
 1502                       ncsanote  $
 1503                       ncsamappingexception  $
 1504                       ncsamapexcapprovedon  $
 1505                       ncsamapexcapprovedby  $
 1506                       gvwr_to  $
 1507                       errortext  $
 1508                       rearautomaticemergencybraking  $
 1509                       blindspotintervention  $
 1510                       lanecenteringassistance  $
 1511                       nonlanduse  $
 1512                       vehicledescriptor  $
 1513           ;
 1514           if _ERROR_ then call symputx('_EFIERR_',1);  /* set ERROR detection macro variable */
 1515           run;
 
 NOTE: The infile OUT is:
       Filename=/saswork/SAS_workA65600006381_odaws02-usw2.oda.sas.com/#LN00171,
       Owner Name=fkhurshed,Group Name=oda,
       Access Permission=-rw-r--r--,
       Last Modified=12Dec2023:16:31:51,
       File Size (bytes)=2920
 
 NOTE: 1 record was read from the infile OUT.
       The minimum record length was 788.
       The maximum record length was 788.
 NOTE: The data set WORK.WANT has 1 observations and 150 variables.
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       user cpu time       0.01 seconds
       system cpu time     0.00 seconds
       memory              10181.78k
       OS Memory           32808.00k
       Timestamp           12/12/2023 11:31:51 PM
       Step Count                        258  Switch Count  2
       Page Faults                       0
       Page Reclaims                     179
       Page Swaps                        0
       Voluntary Context Switches        9
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           304
       
 
 1 rows created in WORK.WANT from OUT.
   
   
   
 NOTE: WORK.WANT data set was successfully created.
 NOTE: The data set WORK.WANT has 1 observations and 150 variables.
 NOTE: PROCEDURE IMPORT used (Total process time):
       real time           0.18 seconds
       user cpu time       0.17 seconds
       system cpu time     0.01 seconds
       memory              10181.78k
       OS Memory           32808.00k
       Timestamp           12/12/2023 11:31:51 PM
       Step Count                        258  Switch Count  10
       Page Faults                       0
       Page Reclaims                     2507
       Page Swaps                        0
       Voluntary Context Switches        51
       Involuntary Context Switches      11
       Block Input Operations            0
       Block Output Operations           344
       
 
 NOTE: Fileref OUT has been deassigned.
 
 NOTE: Appending WORK.WANT to WORK.VIN_DATA.
 WARNING: Variable airbagloccurtain has different lengths on BASE and DATA files (BASE 1 DATA 16).
 WARNING: Variable airbaglocknee has different lengths on BASE and DATA files (BASE 1 DATA 16).
 WARNING: Variable otherrestraintsysteminfo has different lengths on BASE and DATA files (BASE 202 DATA 1).
 ERROR: No appending done because of anomalies listed above. Use FORCE option to append these files.
 NOTE: 0 observations added.
 NOTE: The data set WORK.VIN_DATA has 2 observations and 150 variables.
 NOTE: Statements not processed because of errors noted above.
 NOTE: PROCEDURE APPEND used (Total process time):
       real time           0.00 seconds
       user cpu time       0.00 seconds
       system cpu time     0.01 seconds
       memory              1090.71k
       OS Memory           27828.00k
       Timestamp           12/12/2023 11:31:51 PM
       Step Count                        259  Switch Count  0
       Page Faults                       0
       Page Reclaims                     117
       Page Swaps                        0
       Voluntary Context Switches        0
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           16
       
 NOTE: The SAS System stopped processing this step because of errors.
 9         + datasets lib=work nodetails nolist; delete want; run;quit;;
 
 
 NOTE: Deleting WORK.WANT (memtype=DATA).
 NOTE: PROCEDURE DATASETS used (Total process time):
       real time           0.00 seconds
       user cpu time       0.00 seconds
       system cpu time     0.00 seconds
       memory              349.75k
       OS Memory           27308.00k
       Timestamp           12/12/2023 11:31:51 PM
       Step Count                        260  Switch Count  2
       Page Faults                       0
       Page Reclaims                     48
       Page Swaps                        0
       Voluntary Context Switches        9
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           8
       
 
 1516       
 1517       proc print data=vin_data;
 1518       run;
 
 NOTE: There were 2 observations read from the data set WORK.VIN_DATA.
 NOTE: PROCEDURE PRINT used (Total process time):
       real time           0.06 seconds
       user cpu time       0.06 seconds
       system cpu time     0.00 seconds
       memory              2295.90k
       OS Memory           27564.00k
       Timestamp           12/12/2023 11:31:51 PM
       Step Count                        261  Switch Count  0
       Page Faults                       0
       Page Reclaims                     195
       Page Swaps                        0
       Voluntary Context Switches        0
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           40
       
 
 1519       
 1520       OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 1530       

@kbhagat wrote:

Hello everyone,

 

I have a list of VINs with vehicle make year and model in an Excel as well as a SAS file. I am trying to get more information on these VINs like their body class, group, engine, etc. There is a NHTSA website to decode VINs. Here is the link Vehicle API (dot.gov). I can decode 50 VIN at a time and export them in CSV by using this website. I have at least 6000 VINs and it will be very time-consuming to do that. Is there a way to do it in SAS? I mean automate this. May be connecting the List of VINs to the API website decoding the VIN and exporting the file in Excel. 


 

kbhagat
Fluorite | Level 6

Thank you your reply. But, can you explain this statement?

 

*import data - you will need to replace this with a data step to read the data. PROC IMPORT guesses at the data types;
proc import datafile=out out=want dbms=csv replace;run;

Also, I am getting errors:  

82493 informat otherengineinfo $61. ;
82494 informat batterya_to $1. ;
82495 informat batteryv_to $1. ;
82491 informat chargerlevel $1. ;82492 informat chargerpowerkw $1. ;
82496 informat batterykwh_to $1. ;
82497 informat turbo $1. ;
82498 informat baseprice $1. ;
82499 informat batterymodules $1. ;
82500 informat batterypacks $1. ;
82501 informat topspeedmph $1. ;
82502 informat suggestedvin $1. ;
82503 informat errorcode best32. ;
82504 informat possiblevalues $1. ;
82505 informat axleconfiguration $1. ;
82506 informat enginemanufacturer $1. ;
82507 informat buslength $1. ;
82508 informat busfloorconfigtype $14. ;
82509 informat bustype $14. ;
82510 informat otherbusinfo $1. ;
82511 informat custommotorcycletype $1. ;
82512 informat motorcyclesuspensiontype $1. ;
82513 informat motorcyclechassistype $1. ;
82514 informat othermotorcycleinfo $40. ;
82515 informat othertrailerinfo $1. ;
82516 informat additionalerrortext $1. ;
82517 informat cashforclunkers $1. ;
82518 informat trackwidth $1. ;
82519 informat tpms $1. ;
82520 informat activesafetysysnote $1. ;
82521 informat dynamicbrakesupport $14. ;
82522 informat pedestrianautomaticemergencybrak $14. ;
82523 informat autoreversesystem $14. ;
82524 informat automaticpedestrianalertingsound $14. ;
82525 informat can_aacn $14. ;
82526 informat edr $14. ;
82527 informat keylessignition $1. ;
82528 informat daytimerunninglight $14. ;
82529 informat lowerbeamheadlamplightsource $14. ;
82530 informat semiautomaticheadlampbeamswitchi $14. ;
82531 informat adaptivedrivingbeam $14. ;
82532 informat saeautomationlevel $1. ;
82533 informat saeautomationlevel_to $1. ;
82534 informat rearcrosstrafficalert $14. ;
82535 informat gcwr $1. ;
82536 informat gcwr_to $1. ;
82537 informat ncsanote $1. ;
82538 informat ncsamappingexception $1. ;
82539 informat ncsamapexcapprovedon $1. ;
82540 informat ncsamapexcapprovedby $1. ;
82541 informat gvwr_to $1. ;
82542 informat errortext $60. ;
82543 informat rearautomaticemergencybraking $1. ;
82544 informat blindspotintervention $1. ;
82545 informat lanecenteringassistance $1. ;
82546 informat nonlanduse $1. ;
82547 informat vehicledescriptor $11. ;
82548 format makeid best12. ;
82549 format modelid best12. ;
82550 format manufacturerid best12. ;
82551 format vin $17. ;
82552 format batteryinfo $1. ;
82553 format batterytype $1. ;
82554 format bedtype $14. ;
82555 format bodycabtype $14. ;
82556 format bodyclass $36. ;
82557 format enginecylinders best12. ;
82558 format destinationmarket $1. ;
82559 format displacementcc best12. ;
82560 format displacementci best12. ;
82561 format displacementl best12. ;
82562 format doors $1. ;
82563 format drivetype $1. ;
82564 format driverassist $1. ;
82565 format enginecycles best12. ;
82566 format enginemodel $1. ;
82567 format enginekw best12. ;
82568 format entertainmentsystem $1. ;
82569 format fueltypeprimary $8. ;
82570 format gvwr $47. ;
82571 format make $15. ;
82572 format manufacturer $29. ;
82573 format model $30. ;
82574 format modelyear best12. ;
82575 format plantcity $4. ;
82576 format seats $1. ;
82577 format series $1. ;
82578 format steeringlocation $1. ;
82579 format transmissionstyle $1. ;
82580 format trim $1. ;
82581 format vehicletype $10. ;
82582 format windows $1. ;
82583 format axles $1. ;
82584 format brakesystemtype $1. ;
82585 format batterycells $1. ;
82586 format bedlengthin $1. ;
82587 format brakesystemdesc $1. ;
82588 format curbweightlb $1. ;
82589 format airbagloccurtain $1. ;
82590 format airbaglocseatcushion $1. ;
82591 format batterya $1. ;
82592 format batteryv $1. ;
82593 format batterykwh $1. ;
82594 format wheelbasetype $1. ;
82595 format seatrows $1. ;
82596 format valvetraindesign $1. ;
82597 format transmissionspeeds $1. ;
82598 format engineconfiguration $8. ;
82599 format airbaglocfront $1. ;
82600 format fueltypesecondary $1. ;
82601 format fuelinjectiontype $1. ;
82602 format airbaglocknee $1. ;
82603 format enginehp best12. ;
82604 format evdriveunit $1. ;
82605 format plantcountry $19. ;
82606 format plantcompanyname $1. ;
82607 format plantstate $12. ;
82608 format pretensioner $1. ;
82609 format seatbeltsall $1. ;
82610 format adaptivecruisecontrol $14. ;
82611 format adaptiveheadlights $1. ;
82612 format abs $1. ;
82613 format cib $14. ;
82614 format blindspotmon $14. ;
82615 format ncsabodytype $1. ;
82616 format ncsamake $1. ;
82617 format ncsamodel $1. ;
82618 format esc $1. ;
82619 format tractioncontrol $1. ;
82620 format forwardcollisionwarning $14. ;
82621 format lanedeparturewarning $14. ;
82622 format lanekeepsystem $14. ;
82623 format rearvisibilitysystem $14. ;
82624 format parkassist $14. ;
82625 format airbaglocside $1. ;
82626 format trim2 $1. ;
82627 format series2 $1. ;
82628 format wheelbaseshort $1. ;
82629 format wheelbaselong $1. ;
82630 format note $25. ;
82631 format wheels $1. ;
82632 format trailertype $14. ;
82633 format trailerbodytype $14. ;
82634 format trailerlength $1. ;
82635 format wheelsizefront $1. ;
82636 format wheelsizerear $1. ;
82637 format otherrestraintsysteminfo $1. ;
82638 format coolingtype $1. ;
82639 format enginehp_to $1. ;
82640 format electrificationlevel $1. ;
82641 format chargerlevel $1. ;
82642 format chargerpowerkw $1. ;
82643 format otherengineinfo $61. ;
82644 format batterya_to $1. ;
82645 format batteryv_to $1. ;
82646 format batterykwh_to $1. ;
82647 format turbo $1. ;
82648 format baseprice $1. ;
82649 format batterymodules $1. ;
82650 format batterypacks $1. ;
82651 format topspeedmph $1. ;
82652 format suggestedvin $1. ;
82653 format errorcode best12. ;
82654 format possiblevalues $1. ;
82655 format axleconfiguration $1. ;
82656 format enginemanufacturer $1. ;
82657 format buslength $1. ;
82658 format busfloorconfigtype $14. ;
82659 format bustype $14. ;
82660 format otherbusinfo $1. ;
82661 format custommotorcycletype $1. ;
82662 format motorcyclesuspensiontype $1. ;
82663 format motorcyclechassistype $1. ;
82664 format othermotorcycleinfo $40. ;
82665 format othertrailerinfo $1. ;
82666 format additionalerrortext $1. ;
82667 format cashforclunkers $1. ;
82668 format trackwidth $1. ;
82669 format tpms $1. ;
82670 format activesafetysysnote $1. ;
82671 format dynamicbrakesupport $14. ;
82672 format pedestrianautomaticemergencybrak $14. ;
82673 format autoreversesystem $14. ;
82674 format automaticpedestrianalertingsound $14. ;
82675 format can_aacn $14. ;
82676 format edr $14. ;
82677 format keylessignition $1. ;
82678 format daytimerunninglight $14. ;
82679 format lowerbeamheadlamplightsource $14. ;
82680 format semiautomaticheadlampbeamswitchi $14. ;
82681 format adaptivedrivingbeam $14. ;
82682 format saeautomationlevel $1. ;
82683 format saeautomationlevel_to $1. ;
82684 format rearcrosstrafficalert $14. ;
82685 format gcwr $1. ;
82686 format gcwr_to $1. ;
82687 format ncsanote $1. ;
82688 format ncsamappingexception $1. ;
82689 format ncsamapexcapprovedon $1. ;
82690 format ncsamapexcapprovedby $1. ;
82691 format gvwr_to $1. ;
82692 format errortext $60. ;
82693 format rearautomaticemergencybraking $1. ;
82694 format blindspotintervention $1. ;
82695 format lanecenteringassistance $1. ;
82696 format nonlanduse $1. ;
82697 format vehicledescriptor $11. ;
82698 input
82699 makeid
82700 modelid
82701 manufacturerid
82702 vin $
82703 batteryinfo $
82704 batterytype $
82705 bedtype $
82706 bodycabtype $
82707 bodyclass $
82708 enginecylinders
82709 destinationmarket $
82710 displacementcc
82711 displacementci
82712 displacementl
82713 doors $
82714 drivetype $
82715 driverassist $
82716 enginecycles
82717 enginemodel $
82718 enginekw
82719 entertainmentsystem $
82720 fueltypeprimary $
82721 gvwr $
82722 make $
82723 manufacturer $
82724 model $
82725 modelyear
82726 plantcity $
82727 seats $
82728 series $
82729 steeringlocation $
82730 transmissionstyle $
82731 trim $
82732 vehicletype $
82733 windows $
82734 axles $
82735 brakesystemtype $
82736 batterycells $
82737 bedlengthin $
82738 brakesystemdesc $
82739 curbweightlb $
82740 airbagloccurtain $
82741 airbaglocseatcushion $
82742 batterya $
82743 batteryv $
82744 batterykwh $
82745 wheelbasetype $
82746 seatrows $
82747 valvetraindesign $
82748 transmissionspeeds $
82749 engineconfiguration $
82750 airbaglocfront $
82751 fueltypesecondary $
82752 fuelinjectiontype $
82753 airbaglocknee $
82754 enginehp
82755 evdriveunit $
82756 plantcountry $
82757 plantcompanyname $
82758 plantstate $
82759 pretensioner $
82760 seatbeltsall $
82761 adaptivecruisecontrol $
82762 adaptiveheadlights $
82763 abs $
82764 cib $
82765 blindspotmon $
82766 ncsabodytype $
82767 ncsamake $
82768 ncsamodel $
82769 esc $
82770 tractioncontrol $
82771 forwardcollisionwarning $
82772 lanedeparturewarning $
82773 lanekeepsystem $
82774 rearvisibilitysystem $
82775 parkassist $
82776 airbaglocside $
82777 trim2 $
82778 series2 $
82779 wheelbaseshort $
82780 wheelbaselong $
82781 note $
82782 wheels $
82783 trailertype $
82784 trailerbodytype $
82785 trailerlength $
82786 wheelsizefront $
82787 wheelsizerear $
82788 otherrestraintsysteminfo $
82789 coolingtype $
82790 enginehp_to $
82791 electrificationlevel $
82792 chargerlevel $
82793 chargerpowerkw $
82794 otherengineinfo $
82795 batterya_to $
82796 batteryv_to $
82797 batterykwh_to $
82798 turbo $
82799 baseprice $
82800 batterymodules $
82801 batterypacks $
82802 topspeedmph $
82803 suggestedvin $
82804 errorcode
82805 possiblevalues $
82806 axleconfiguration $
82807 enginemanufacturer $
82808 buslength $
82809 busfloorconfigtype $
82810 bustype $
82811 otherbusinfo $
82812 custommotorcycletype $
82813 motorcyclesuspensiontype $
82814 motorcyclechassistype $
82815 othermotorcycleinfo $
82816 othertrailerinfo $
82817 additionalerrortext $
82818 cashforclunkers $
82819 trackwidth $
82820 tpms $
82821 activesafetysysnote $
82822 dynamicbrakesupport $
82823 pedestrianautomaticemergencybrak $
82824 autoreversesystem $
82825 automaticpedestrianalertingsound $
82826 can_aacn $
82827 edr $
82828 keylessignition $
82829 daytimerunninglight $
82830 lowerbeamheadlamplightsource $
82831 semiautomaticheadlampbeamswitchi $
82832 adaptivedrivingbeam $
82833 saeautomationlevel $
82834 saeautomationlevel_to $
82835 rearcrosstrafficalert $
82836 gcwr $
82837 gcwr_to $
82838 ncsanote $
82839 ncsamappingexception $
82840 ncsamapexcapprovedon $
82841 ncsamapexcapprovedby $
82842 gvwr_to $
82843 errortext $
82844 rearautomaticemergencybraking $
82845 blindspotintervention $
82846 lanecenteringassistance $
82847 nonlanduse $
82848 vehicledescriptor $
82849 ;
82850 if _ERROR_ then call symputx('_EFIERR_',1); /* set ERROR detection macro variable */
82851 run;

NOTE: The infile OUT is:

Filename=C:\Users\kbhagat\AppData\Local\Temp\SAS Temporary
Files\_TD2644_STAPA-700675_\#LN00245,
RECFM=V,LRECL=32767,File Size (bytes)=3116,
Last Modified=13Dec2023:12:15:23,
Create Time=13Dec2023:12:15:23

NOTE: 1 record was read from the infile OUT.
The minimum record length was 984.
The maximum record length was 984.
NOTE: The data set WORK.WANT has 1 observations and 150 variables.
NOTE: DATA statement used (Total process time):
real time 40.40 seconds
cpu time 0.89 seconds


1 rows created in WORK.WANT from OUT.

 

NOTE: WORK.WANT data set was successfully created.
NOTE: The data set WORK.WANT has 1 observations and 150 variables.
NOTE: PROCEDURE IMPORT used (Total process time):
real time 40.62 seconds
cpu time 1.09 seconds


NOTE: Fileref OUT has been deassigned.

NOTE: Appending WORK.WANT to WORK.VIN_DATA.
WARNING: Variable bodyclass has different lengths on BASE and DATA files (BASE 20 DATA 36).
WARNING: Variable model has different lengths on BASE and DATA files (BASE 4 DATA 30).
WARNING: Variable otherengineinfo has different lengths on BASE and DATA files (BASE 1 DATA 61).
ERROR: No appending done because of anomalies listed above.
Use FORCE option to append these files.
NOTE: 0 observations added.
NOTE: The data set WORK.VIN_DATA has 1 observations and 150 variables.
NOTE: Statements not processed because of errors noted above.
NOTE: PROCEDURE APPEND used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

NOTE: The SAS System stopped processing this step because of errors.


541 + proc datasets lib=work nodetails nolist; delete want; run;

NOTE: Deleting WORK.WANT (memtype=DATA).
541 + quit;

NOTE: PROCEDURE DATASETS used (Total process time):
real time 0.00 seconds
cpu time 0.01 seconds


541 + ;
542 + *set up space for api response; filename out temp; *send API call;
542 + proc http
url="https://vpic.nhtsa.dot.gov/api/vehicles/DecodeVinValues/1HD1FFW121Y603975?format=csv&modely
ear=." method="get" out=out; run;
WARNING: Apparent symbolic reference MODELYEAR not resolved.

NOTE: 200 OK
NOTE: PROCEDURE HTTP used (Total process time):
real time 0.11 seconds
cpu time 0.00 seconds

 

Tom
Super User Tom
Super User

Don't put data into Excel.  Unless you mean you want to produce some type of REPORT from the data you have created?

 

It should not be hard to generate a file with 50 vins in it.

It looks like it just wants you to generate a list in style:

vin1,year1;vin2,year2;vin3,year3.....

Which is very easy to do in SAS.

data _null_;
  length string $32000 ;
  do i=1 to 50 while (not eof);
   set have firstobs=1 end=eof;
   string=catx(';',string,catx(',',vin,year)); 
  end;
  call symputx('vinlist',string);
run;

Note if you change the value FIRSTOBS= setting you can get a different 50 values.

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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
  • 6 replies
  • 993 views
  • 1 like
  • 3 in conversation