Mon Dec 06, 2021 6:01 am
Login Register Lost Password? Contact Us


Comments and questions related to the Enterprise Control Language

Tue Oct 30, 2018 2:20 am Change Time Zone


I'd like to understand a behavior I'm seeing when using APPLY and OUTPUTing to file.
I wanted to see if I could use it to load data into logical files (like APPLY( ds, OUTPUT(std.File.ExternalLogicalFilename(...), ...) type thing). Apparently not, but I'd like to understand nonetheless.

Here's the behavior I'm seeing in a snippet:
Code: Select all
layout := { STRING letter; };
ds := DATASET([{'A'},{'B'},{'C'}], layout);
APPLY(ds, OUTPUT(DATASET([letter],layout),,'~temp::letters::'+letter, OVERWRITE));

Basically I'm trying to create 3 logical files ('~temp::letters::a', '~temp::letters::b', and '~temp::letters::c'), each with, well, its own letter. So '~temp::letters::a' should just contain "a" as "letter" and '~temp::letters::b' just "b", etc.

Somehow, and that's what I'd like to understand, all logical files contain the letter "c". It's interesting that '~temp::letters::'+letter is well interpreted while DATASET([letter],layout) got somehow hijacked.
Could someone please shed some light on this?

Thank you!
Posts: 81
Joined: Wed Sep 10, 2014 3:14 am

Tue Oct 30, 2018 6:59 pm Change Time Zone


I just tested your code on 6.4.12-1 (3-node Thor) and 6.4.28-1 (VM).

In both environments, on Thor, the syntax checks but gets a runtime error:
System error: 0: Graph graph1[1], apply[3]: SLAVE #1 []: Global child graph? : Global acts = Graph(5): [diskwrite(7)]

In both environments, it does run on hThor, but the ECL IDE and ECL Watch both show only a single result for the WU, but the ECL Watch Logical Files page shows all three files written to disk, each containing the "C" data, only.

The APPLY docs clearly state (bold added by me):
"actionlist A comma-delimited list of the operations to perform on the dataset. Typically, this is an external service (see SERVICE Structure). This may not be an OUTPUT or any function that triggers a child query."

So, I have a couple of problems with this code:
  • Based on the above actionlist text, why does it syntax check at all, much less run (even just on hThor)?
  • And only then am I wondering why all three files contain the same data?
I'd suggest submitting a JIRA report referencing this thread (and make me a Watcher, too, please).


Community Advisory Board Member
Community Advisory Board Member
Posts: 1606
Joined: Wed Oct 26, 2011 7:40 pm

Thu Nov 01, 2018 9:41 pm Change Time Zone

JIRA seems to be down right now. But I'll check again later and create a ticket.

Posts: 81
Joined: Wed Sep 10, 2014 3:14 am

Fri Nov 02, 2018 2:25 am Change Time Zone

Ticket created:
(not sure how to add you as watcher...sorry)

Thanks Richard!
Posts: 81
Joined: Wed Sep 10, 2014 3:14 am

Return to ECL

Who is online

Users browsing this forum: No registered users and 1 guest