Fri Jul 01, 2022 2:11 pm
Login Register Lost Password? Contact Us

Please Note: The HPCC Systems forums are moving to Stack Overflow. We invite you to post your questions on Stack Overflow utilizing the tag hpcc-ecl (https://stackoverflow.com/search?tab=newest&q=hpcc-ecl). This legacy forum will be active and monitored during our transition to Stack Overflow but will become read only beginning September 1, 2022.



Check if two record structure match

Comments and questions related to the Enterprise Control Language

Wed Nov 20, 2019 2:37 pm Change Time Zone

Code: Select all
get_ThorFile_Info(STRING filename,STRING pcluster = '',STRING pesp = _Control.ThisEnvironment.ESP_IPAddress) := FUNCTION

DFUDefFileRequest  := RECORD, MAXLENGTH(100)
         STRING  Name              {XPATH('Name'               )} := filename;
         STRING  Format            {XPATH('Format'             )} := 'xml';
   END;
   
   DFUDefFileRecord := RECORD, MAXLENGTH(100000)
   STRING defFile     {XPATH('defFile'   )};
   END;
   
   results := SOAPCALL('thor_esp.net:'+ port + '/WsDfu'
                        ,'DFUDefFile'
                        ,DFUDefFileRequest
                        ,DATASET(DFUDefFileRecord)
                        ,XPATH('DFUDefFileResponse')
                        );
RETURN results;
END;

file1 := '~thor::base::cd::superfile::somefile';

string get_data := get_ThorFile_Info(file1)[1].defFile;

Data out := STD.Str.DecodeBase64(get_data);
(string)out;


That did the trick to get the data from the soap call. Unfortunately, there is still to much of a difference between child datasets. Recordof(dataset) counts every column as its own in seq. The logical file treats each child dataset as its own. So I still need the change requested.
newportm
 
Posts: 22
Joined: Tue Nov 15, 2016 2:48 pm

Previous

Return to ECL

Who is online

Users browsing this forum: No registered users and 1 guest