Fri Dec 03, 2021 12:57 pm
Login Register Lost Password? Contact Us


IMPORT $ and repository

Topics specific to the use of the ECL IDE

Wed Sep 08, 2021 2:34 pm Change Time Zone

I am taking the LN Intro to ECL and I’m having some issues with the repository. It seems that when I add folders/files to the repository, those items are not visible on anyone else’s instance of the repository. Additionally, using IMPORT $; does not make the other EXPORTed files in the folder available. This is the code:

//EXPORT BWR_BasicQueries := 'todo';
import $;
$.Persons;
count($.Persons);

Err msgs rcvd:
Error: syntax error near ";" : expected '.' (3, 10), 3002,
Error: syntax error near ")" : expected '.' (5, 17), 3002,

Any help greatly appreciated.
215joec
 
Posts: 1
Joined: Wed Sep 08, 2021 2:25 pm

Thu Sep 09, 2021 1:27 pm Change Time Zone

Hi,
In ECL, the repository you are using is local on your machine only. To allow others to see your repository folders there is usually a version control repository set up by your team, like GitHub.

Regarding the use of $ and IMPORT. $ is a shortcut to the name of your current folder where your ECL file is created. For example, if your folder name is Training, your new ECL file created in the Training folder can reference other EXPORTed definitions in that same folder by using:

Code: Select all
IMPORT Training;


or

Code: Select all
IMPORT $;


The error you are reporting is telling you that the Persons definition is either in a different folder, OR, you haven't EXPORTed the Persons definition. For example:

Code: Select all
EXPORT Persons := DATASET('~ONLINE::Intro::Persons',Layout,FLAT);


Please feel free to reach out to me directly via email if you have any additional questions.
robert.foreman@lexisnexisrisk.com

Regards,

Bob
bforeman
Community Advisory Board Member
Community Advisory Board Member
 
Posts: 1005
Joined: Wed Jun 29, 2011 7:13 pm


Return to ECL IDE

Who is online

Users browsing this forum: No registered users and 1 guest