I need to build a report about several cognos' cubes (dimensions,
levels measures etc..) from *.mdl files (ascii type) then contain the
First I import xxxx.mdl file and create variable x, than I exstract
cube infos by scan(x, ....), because all infos are key-substring from
first collumn. when I meet one key value I know the info is on the
next double quoted substring.
infile &infile truncover;
input x $5000.;
retain name datasource;
length datasource $30.;
if x NE '';
when('Measure') do; /*** partial code ***/
if test='Name' then DataSource='';
Except for 'Measure', every info is on the row where is the key
value and the uppuer program retrieve all I need.
Sometime for 'Measure' infos are distribuited also on the next rows
and, for some strange reason, cognos could brack it on the successive
The sample below is from an mdl input file:
For first bloc lines the program meet "Measure" and assign his value
For the second I nedd estract also "ShortName" => valore2='Var.% Mrg
RC vs RP' , "Calc" => valore3=( "MRG_RAC_RC@2143" -
"MRG_RAC_RP@2973" ) / "MRG_RAC_RP@2973" and "MeasureInfo"="Margine
costi / ricavi finanziari progressivo al mese corrente dell'anno
As you can see on the second bloc info for "MeasureInfo" is splitted
on 2 consecutive lines.
I suppose for read the varius values for "Measure" I must use some do
loop (do while(...)) that scan for all lines relative to the "Measure"
Have you any tips about?
Thank you in advance.