Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am comparing Incrementally generated QVD's in one folder to Full load QVD's in another folder.
The problem I have is that I can run the below evaluation script for each folder individually without issue, however running them successively creates a problem. The first script always interferes with the second one. So I run them individually and store the results which are then loaded for analysis.
//***Incremental QVD's
//Build a list of all the Incremental Extract QVD's and their respective characteristics
FOR Each EXT in 'qvd'
FOR Each FILE in filelist ('$(vIncrementalExtractQVDLocation)'&'*.'&Ext)
FILE:
Load '$(FILE)' as Name,
FileSize( '$(FILE)' ) as Size,
FileTime( '$(FILE)' ) as FileTime,
QvdNoOfFields( '$(FILE)' ) as NoOfFields,
QvdNoOfRecords( '$(FILE)' ) as NoOfRecords,
RowNo() as ID
autogenerate 1;
next FILE
next EXT
QUALIFY *;
UNQUALIFY QVDName;
I:
load ID,
subfield(subfield(Name,'\',-1),'.',1) as QVDName,
Name,
NoOfRecords,
NoOfFields,
Size,
FileTime
Resident FILE;
UNQUALIFY *;
Store I into TableList_Incremental.qvd (qvd);
Drop Tables FILE, I;
//***Full QVD's
//Build a list of all the Full extract QVD's and their respective characteristics
FOR Each EXT in 'qvd'
FOR Each FILE in filelist ('$(vFullExtractQVDLocation)'&'*.'&Ext)
FILE:
Load '$(FILE)' as Name,
FileSize( '$(FILE)' ) as Size,
FileTime( '$(FILE)' ) as FileTime,
QvdNoOfFields( '$(FILE)' ) as NoOfFields,
QvdNoOfRecords( '$(FILE)' ) as NoOfRecords,
RowNo() as ID
autogenerate 1;
next FILE
next EXT
QUALIFY *;
UNQUALIFY QVDName;
F:
load ID,
subfield(subfield(Name,'\',-1),'.',1) as QVDName,
Name,
NoOfRecords,
NoOfFields,
Size,
FileTime
Resident FILE;
UNQUALIFY *;
Store F into TableList_Full.qvd (qvd);
Drop Tables FILE, F;
>>however running them successively creates a problem
Please be more specific. I don't see any reason from the script you posted. What problem are you experiencing?
>>Are EXT and FILE stored as variables?
Yes. Although you don't need the outer loop with EXT.
>>however running them successively creates a problem
Please be more specific. I don't see any reason from the script you posted. What problem are you experiencing?
>>Are EXT and FILE stored as variables?
Yes. Although you don't need the outer loop with EXT.
The first folder evaluation would complete and create a table with all the characteristics of the files in that folder.
When it moved on to the second folder, it started creating a table per file, as opposed to a table for the entire folder contents.
Removing the outer loop with EXT as you suggested has resolved the issue. Thank you for your help.