Pageload command does not structure workfile properly
Posted: Thu Nov 10, 2016 1:17 pm
I have data that is labelled by group. For groups with the word "Quarterly" in them, I'd like to import them into a workfile page that is structured in a Quarterly format. For some reason '@freq q' does not structure the workfile in a quarterly format but '@freq a' or '@freq m' structures the workfile properly. I attached a screenshot of the ID series and my code is below. Any help is appreciated! :D
Code: Select all
%frequency=""
if @instr(uniquegroups(result+1),"Annual")>0 then
%frequency = "a"
endif
if @instr(uniquegroups(result+1),"Quarterly")>0 then
%frequency = "q"
endif
if @instr(uniquegroups(result+1),"Monthly")>0 then
%frequency = "m"
endif
pageload "P:\Knowledge\Data Resources\Databases\Scraper\newdata.csv" ftype=ascii rectype=crlf skip=0 fieldtype=delimited delim=comma byrow colhead=2 namepos=first eoltype=pad badfield=NA @freq {%frequency} @smpl @all