Mon Oct 18, 2021 6:41 am
Login Register Lost Password? Contact Us


eclplus and IMPORT

Comments and questions related to the Enterprise Control Language

Fri Oct 07, 2011 3:55 pm Change Time Zone

Hello,
I'm having trouble accessing code from my repository in eclplus.exe

I've placed my code in a file for testing and created a test scenario to make sure my .INI file is good.

eclcode.ecl contents:
Code: Select all
test := 1+2;
OUTPUT(test);

c:\>eclplus ecl=@eclcode.ecl
C:\Program Files (x86)\HPCC Systems\HPCC\bin\ver_3_0>eclplus ecl=@eclcode.ecl
Workunit W20111007-114850 submitted
[Result 1]
Result_1
3


This scenario does not work:
eclcode.ecl contents:
Code: Select all
IMPORT alldata.test;
ds := test.incoming;
output(ds);

C:\Program Files (x86)\HPCC Systems\HPCC\bin\ver_3_0>eclplus ecl=@eclcode.ecl
Workunit W20111007-115227 submitted
<Error><source>eclcc</source><line>1</line><code>2081</code><message> Import names unknown module "alldata"</message></Error>
<Error><source>eclcc</source><line>2</line><code>2167</code><message> Unknown identifier "test"</message></Error>

But the above code does run in the ECL IDE.

Any ideas?
aintnomyth
 
Posts: 86
Joined: Wed Jul 13, 2011 7:40 pm

Fri Oct 07, 2011 5:00 pm Change Time Zone

As ECLPlus is a command line tool, I would guess that it is possibly a path issue.

On the command line, does it work if you set your path to the ecl code location prior to calling ECLPlus?

Example - CD C:\Documents and Settings\All Users\Documents\HPCC Systems\ECL\My Files
bforeman
Community Advisory Board Member
Community Advisory Board Member
 
Posts: 1005
Joined: Wed Jun 29, 2011 7:13 pm

Fri Oct 07, 2011 5:29 pm Change Time Zone

try using the -I parameter when running eclplus. This will allow you to set and pass the include path to the eclcc compiler {-Ipath -Lpath -g -E as eclcc}.
sort
 
Posts: 59
Joined: Wed May 11, 2011 1:54 pm

Fri Oct 07, 2011 5:38 pm Change Time Zone

Thanks, I'll try that. Do you have any docs on the command line switches? I checked the client tools .pdf but it only deals with named arguments (like arg=val).
aintnomyth
 
Posts: 86
Joined: Wed Jul 13, 2011 7:40 pm

Fri Oct 07, 2011 5:41 pm Change Time Zone

...now that I look I see the "-lpath -Lpath" in the command line help.
aintnomyth
 
Posts: 86
Joined: Wed Jul 13, 2011 7:40 pm

Fri Oct 07, 2011 6:02 pm Change Time Zone

I'm missing something somewhere

This command causes the output: "Error: unknown action"
Code: Select all
eclplus ecl=@eclcode.ecl -I"C:\ecl\alldata\test\incoming.ecl" -L"C:\ecl\alldata\test\incoming.ecl" -g -E as eclcc



And this command (removing the "as eclcc" portion):
Code: Select all
eclplus ecl=@eclcode.ecl -I"C:\ecl\alldata\test\incoming.ecl" -L"C:\ecl\alldata\test\incoming.ecl" -g -E


produces this output:
C:\Program Files (x86)\HPCC Systems\HPCC\bin\ver_3_0>eclplus ecl=@eclcode.ecl -I"C:\ecl\alldata\test\incoming.ecl" -L"C:\ecl\alldata\test\incoming.ecl" -g -E
Workunit W20111007-135906 submitted
<Warning><source>eclcc</source><code>10</code><message> Explicit source file C not found</message></Warning>
<Warning><source>eclcc</source><code>10</code><message> Explicit source file \ecl\alldata\test\incoming.ecl not found</message></Warning>
<Error><source>eclcc</source><line>1</line><code>2081</code><message> Import names unknown module "alldata"</message></Error>
<Error><source>eclcc</source><line>2</line><code>2167</code><message> Unknown identifier "test"</message></Error>


I get the same results if I remove the double-quotes from the paths.
aintnomyth
 
Posts: 86
Joined: Wed Jul 13, 2011 7:40 pm

Fri Oct 07, 2011 6:37 pm Change Time Zone

try something like the following:

eclplus action=query ecl=@eclcode.ecl -I"c:\ecl"


I always set "action", I do not let the system default it based on params based in (and leading -).
sort
 
Posts: 59
Joined: Wed May 11, 2011 1:54 pm

Fri Oct 07, 2011 6:54 pm Change Time Zone

Thanks for the help, when I run that I'm still getting the warnings:

eclplus action=query ecl=@eclcode.ecl -I"c:\ecl"
...Explicit source file C not found
...Explicit source file \ecl not found

It's like it can't parse the parameter or something. I tried dropping the .ecl file directly into the bin directory (C:\Program Files (x86)\HPCC Systems\HPCC\bin\ver_3_0) but that doesn't help, the command was:
eclplus action=query ecl=@eclcode.ecl -Iincoming.ecl

In theory, if my incoming.ecl code imported OTHER files, would those need to be explicitly defined in the -i argument too?
aintnomyth
 
Posts: 86
Joined: Wed Jul 13, 2011 7:40 pm

Fri Oct 07, 2011 7:58 pm Change Time Zone

try removing the quotes when specifying the -I param
sort
 
Posts: 59
Joined: Wed May 11, 2011 1:54 pm

Fri Oct 07, 2011 8:09 pm Change Time Zone

I get the same warnings. :?
aintnomyth
 
Posts: 86
Joined: Wed Jul 13, 2011 7:40 pm

Next

Return to ECL

Who is online

Users browsing this forum: No registered users and 1 guest

cron