How do I program a loop that will freeze each and every page of a workfile (detailed view with the object names and all the attributes) into a table and then save that table as ".csv"?
So far what I have is
Code: Select all
for %isic 90_93
%wfname = "HFREQ_"+%isic+"_"+%vintage
wfcreate(wf=%wfname, page=a) a 1980 %lyf
wfdetails Name Type "Last Update" Freq Start End Remarks
pagecreate(page=q) q 1980 {%lyf}
wfdetails Name Type "Last Update" Freq Start End Remarks
pagecreate(page=m) m 1980 {%lyf}
wfdetails Name Type "Last Update" Freq Start End Remarks
%bank=%path+"wis_hfreq4.bnk"
dbopen %bank
for %freq a q m
pageselect {%freq}
fetch *{%isic}*.{%freq}*
%pathobject = "C:\WIS\Archived_Forecasts\HFREQ\"+%isic+%freq+%vintage+".csv"
pagesave(type=text) %pathobject
%tablea = "HFREQ"+%isic+%freq+%vintage+"_ATTR"
%objectname = %wfname+"::"+%freq
[b]%path0 = %wfname+"::"+%freq+"\"[/b]
freeze {%path0}.table {%tablea}
%pathtable ="C:\WIS\Archived_Forecasts\HFREQ\"+%table+".csv"
%tablea.save(t=csv) %pathtable
next
next
%path0 is were I am struggling right now as I don't know how to call the object, so that the program creates a table based on the detailed page view.
Thanks a lot in advance for your help!
Best,
Sam