Itgengpr015 melding bij gebruik net aangemaakte tabel vanuit PSQL blok op App Online

Bij het inlezen van de XML file met de verscheepte goederen uit WICS naar Exact Online, krijg ik met onderstaande code een foutmelding:

An error occured - 6295ac6c-19f7-4e02-ac8f-79d3fac83b33
itgengpr015:
Onbekende tabel ‘COLLOS’.

De tabel collos wordt wel gedefinieerd en daarna gebruikt.

Hoe kan ik die tabel binnen het PSQL-blok gebruiken direct na het maken?

declare
  p_run           boolean;
  --
  l_errors_1      varchar2;
  l_errors_2      varchar2;
  l_errors_3      varchar2;
  l_xml           varchar2;
  l_workbook      excel_workbook;
  l_worksheet     excel_worksheet;
  l_binary        blob;
  l_cnt_output    number;
  l_xlsx_filename varchar2;
  l_xml_filename  varchar2;
begin
  --
  -- Get parameters.
  --
  p_run := cast(cloud_http. get_request_form_value('p_run') as boolean);
  --
  if coalesce(p_run, false) = false
  then
    --
    -- Enter parameters manually.
    -- A POST from curl loading the WICS shipping XML file directly into Exact Online is also possible.
    --
    cloud_http.set_use_template(true);
    cloud_http.set_template_step_name(translate_resources('{res:itgen_parameters}'));
    cloud_http.append_line_to_response_body_text('<form method="post" enctype="multipart/form-data">');
    cloud_http.append_line_to_response_body_text('<input type="hidden" id="p_run" name="p_run" value="true"/>');
    cloud_http.append_line_to_response_body_text('<ul>');
    cloud_http.append_line_to_response_body_text
    ( '<li><label for="p_file">' 
      || translate_resources('{res:itgen_file}') 
      || '</label></li><li><input type="file" id="p_file" name="p_file" accept=".xml" required/></li>'
    );
    cloud_http.append_line_to_response_body_text('<li><input type="submit" value="Inlezen WICS shipments in Exact Online"/></li>');
    cloud_http.append_line_to_response_body_text('</ul>');
    cloud_http.append_line_to_response_body_text('</form>');
  else
    --
    -- Process XML file with shipments from WICS.
    --
    l_xml_filename := cloud_http.get_request_form_file_name('p_file');
    --
    if l_xml_filename is null
    then
      raise_application_error('sample001', 'The file name is empty.');
    end if;
    --
    l_xml := cloud_http.get_request_form_file_contents('p_file');
    --
    if l_xml is null
    then
      raise_application_error('sample002', 'The file XML payload is empty.');
    end if;  
    --
    l_errors_1 := '';
    l_errors_2 := '';
    l_errors_3 := '';
    --
    create or replace table shipments@inmemorystorage
    as
    select *
    from   xmltable
           ( '/Shipment'
             passing l_xml
             columns OrderExternalRef varchar2 path './OrderExternalRef'
             ,       ShippingDate     datetime path './ShippingDate'
           )
    ;
    create or replace table collos@inmemorystorage
    as
    select *
    from   xmltable
           ( '/Shipment/Collos/Collo'
             passing l_xml
             columns OrderExternalRef varchar2 path '../../OrderExternalRef'
             ,       ShippingDate     datetime path '../../ShippingDate'
             ,       TrackingCode     varchar2 path './TrackingCode'
           )
    ;
    create or replace table collolines@inmemorystorage
    as
    select *
    from   xmltable
           ( '/Shipment/Collos/Collo/Lines/Line'
             passing l_xml
             columns OrderExternalRef varchar2 path '../../../../OrderExternalRef'
             ,       ShippingDate     datetime path '../../../../ShippingDate'
             ,       TrackingCode     varchar2 path '../../TrackingCode'
             ,       OrderlineID      integer  path './OrderlineID'
             ,       ItemNum          varchar2  path './ItemNum'
             ,       QtyDelivered     integer  path './QtyDelivered'
             ,       StockUnit        varchar2  path './StockUnit'
             ,       Notes            varchar2  path './Notes'
           )
    ;
    --
    -- Update tracking numbers.
    --
    for r
    in 
    ( select *
      from   collos@inmemorystorage
    )
    loop
      update goodsdeliveries@eol
      set    TrackingNumber = r.TrackingCode
      where  deliverynumber = r.OrderExternalRef
      and    TrackingNumber = 'COMMUNICATED'
      ;
      if sqlrowcount != 1
      then
        l_errors_1 := l_errors_1 || chr(13) || 'Could not find delivery number ' || r.OrderExternalRef || ' to update tracking reference to ' || r.TrackingCode || '.';
      end if;
    end loop;
    --
    select listagg
           ( 'The delivery number ' || clo.OrderExternalRef || ' can not be found in Exact Online.'
           , chr(13) || chr(10)
           )
           errors_txt
    into   l_errors_2
    from   collos@inmemorystorage clo
    left
    outer
    join   goodsdeliveries@eol gdy
    on     gdy.DeliveryNumber = clo.OrderExternalRef
    where  gdy.DeliveryNumber is null
    ;
    create or replace table gdy_totals@inmemorystorage
    as
    select gdy.EntryId
    ,      gdy.DeliveryNumber
    ,      gle.ItemCode
    ,      sum(gle.QuantityOrdered) QuantityOrdered
    from   Collos@inmemorystorage clo
    join   GoodsDeliveries@eol gdy
    on     gdy.DeliveryNumber = clo.OrderExternalRef
    join   goodsdeliverylines@eol gle
    on     gle.entryid = gdy.entryid
    group
    by     gdy.EntryId
    ,      gdy.DeliveryNumber
    ,      gle.ItemCode
    ;
    select listagg
           ( 'The delivery number '
             || coalesce(cle.OrderExternalRef, to_char(gdy.DeliveryNumber))
             || ' for '
             || coalesce(cle.QtyDelivered, gdy.QuantityOrdered)
             || ' x '
             || coalesce(gdy.ItemCode, cle.ItemNum)
             || ' '
             || case
                when gdy.DeliveryNumber is null
                then ' can not be found in Exact Online.'
                when cle.OrderExternalRef is null
                then ' exists in Exact Online, but not in the picked items report.'
                else ' has ' || cle.QtyDelivered || ' pieces in picked items report, but ' || gdy.QuantityOrdered || ' in Exact Online.'
                end
           , chr(13) || chr(10)
           ) errors_txt
    into   l_errors_3
    from   collolines@inmemorystorage cle
    full
    outer
    join   gdy_totals@inmemorystorage gdy
    on     gdy.DeliveryNumber = cle.OrderExternalRef
    and    gdy.ItemCode       = cle.ItemNum
    where  ( gdy.DeliveryNumber is null or cle.OrderExternalRef is null or cle.QtyDelivered != gdy.QuantityOrdered )
    ;
    --
    -- TODO: Accept POST of xml file with picked items.
    --
    create or replace table output@inmemorystorage
    as
    select l_errors_1 txt
    from   dual@datadictionary
    where  l_errors_1 is not null
    union all
    select l_errors_2
    from   dual@datadictionary
    where  l_errors_2 is not null
    union all
    select l_errors_3
    from   dual@datadictionary
    where  l_errors_3 is not null
    ;
    select count(*)
    into   l_cnt_output
    from   output@inmemorystorage
    ;
    if l_cnt_output = 0 
    then
      l_xlsx_filename := 'shipping-results-success.xlsx';
    else
      l_xlsx_filename := 'shipping-results-errors.xlsx';
    end if;
    --
    -- Retrieve results.
    --
    l_workbook := excel.new();
    --
    -- Add a worksheet with a title.
    --
    l_worksheet := excel.add_worksheet
    ( l_workbook
    , 'Parameters'
    );  
    excel.set_cell_contents(l_worksheet, 'A1', 'Exact Online load WICS shipping results using Invantive Cloud');
    excel.set_cell_contents(l_worksheet, 'A2', 'Created (UTC) ' || to_char(sysdateutc));    
    --
    l_worksheet := excel.add_worksheet
    ( l_workbook
    , 'Shipping Results'
    );  
    excel.fill_using_query(l_worksheet, 'select * from output@inmemorystorage');
    --
    -- Retrieve the resulting XLSX-file.
    --
    l_binary := excel.export_to_xlsx(l_workbook);
    --
    -- Return the XLSX file to the user.
    --
    cloud_http.set_response_body_binary(l_binary);
    cloud_http.set_response_content_type('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
    cloud_http.set_response_header_value('Content-Disposition', 'attachment; filename="' || l_xlsx_filename || '"');
  end if;
end;```

Het gebruik van een tabel die kort daarvoor via een DDL-statement in het zelfde PSQL-block is aangemaakt wordt maar beperkt ondersteund in de huidige versie van de SQL-engine. Het is ongewis of dit in een eventueel volgende versie helemaal niet meer kan of flexibeler wordt.

Workaround voor korte termijn is om de tabel niet in-memory aan te maken, maar in bijvoorbeeld een Azure SQL Server instance (kleine maat).

Een analyse zal gemaakt worden of het mogelijk is om in de huidige SQL-engine versie het gebruik mogelijk te maken. Zodra hier een update op is, zal dit toegevoegd worden.

Met release 22.0.179 wordt de tabel met data uit WICS WMS wel herkend, maar de velden van de select * in de cursor loop, zoals TrackingCode zijn niet beschikbaar voor een update. Dit veld staat bij -- ONBEKEND VELD.

Hoe kan ik die velden uitlezen en gebruiken in de update?

declare
  p_run           boolean;
  --
  l_errors_1      varchar2;
  l_errors_2      varchar2;
  l_errors_3      varchar2;
  l_xml           varchar2;
  l_workbook      excel_workbook;
  l_worksheet     excel_worksheet;
  l_binary        blob;
  l_cnt_output    number;
  l_xlsx_filename varchar2;
  l_xml_filename  varchar2;
begin
  --
  -- Get parameters.
  --
  p_run := cast(cloud_http. get_request_form_value('p_run') as boolean);
  --
  if coalesce(p_run, false) = false
  then
    --
    -- Enter parameters manually.
    -- A POST from curl loading the WICS shipping XML file directly into Exact Online is also possible.
    --
    cloud_http.set_use_template(true);
    cloud_http.set_template_step_name(translate_resources('{res:itgen_parameters}'));
    cloud_http.append_line_to_response_body_text('<form method="post" enctype="multipart/form-data">');
    cloud_http.append_line_to_response_body_text('<input type="hidden" id="p_run" name="p_run" value="true"/>');
    cloud_http.append_line_to_response_body_text('<ul>');
    cloud_http.append_line_to_response_body_text
    ( '<li><label for="p_file">' 
      || translate_resources('{res:itgen_file}') 
      || '</label></li><li><input type="file" id="p_file" name="p_file" accept=".xml" required/></li>'
    );
    cloud_http.append_line_to_response_body_text('<li><input type="submit" value="Inlezen WICS shipments in Exact Online"/></li>');
    cloud_http.append_line_to_response_body_text('</ul>');
    cloud_http.append_line_to_response_body_text('</form>');
  else
    --
    -- Process XML file with shipments from WICS.
    --
    l_xml_filename := cloud_http.get_request_form_file_name('p_file');
    --
    if l_xml_filename is null
    then
      raise_application_error('sample001', 'The file name is empty.');
    end if;
    --
    l_xml := cloud_http.get_request_form_file_contents('p_file');
    --
    if l_xml is null
    then
      raise_application_error('sample002', 'The file XML payload is empty.');
    end if;  
    --
    l_errors_1 := '';
    l_errors_2 := '';
    l_errors_3 := '';
    --
    create or replace table shipments@inmemorystorage
    as
    select *
    from   xmltable
           ( '/Shipment'
             passing l_xml
             columns OrderExternalRef varchar2 path './OrderExternalRef'
             ,       ShippingDate     datetime path './ShippingDate'
           )
    ;
    create or replace table collos@inmemorystorage
    as
    select *
    from   xmltable
           ( '/Shipment/Collos/Collo'
             passing l_xml
             columns OrderExternalRef varchar2 path '../../OrderExternalRef'
             ,       ShippingDate     datetime path '../../ShippingDate'
             ,       TrackingCode     varchar2 path './TrackingCode'
           )
    ;
    create or replace table collolines@inmemorystorage
    as
    select *
    from   xmltable
           ( '/Shipment/Collos/Collo/Lines/Line'
             passing l_xml
             columns OrderExternalRef varchar2 path '../../../../OrderExternalRef'
             ,       ShippingDate     datetime path '../../../../ShippingDate'
             ,       TrackingCode     varchar2 path '../../TrackingCode'
             ,       OrderlineID      integer  path './OrderlineID'
             ,       ItemNum          varchar2  path './ItemNum'
             ,       QtyDelivered     integer  path './QtyDelivered'
             ,       StockUnit        varchar2  path './StockUnit'
             ,       Notes            varchar2  path './Notes'
           )
    ;
    --
    -- Update tracking numbers.
    --
    for r
    in 
    ( select *
      from   collos@inmemorystorage
    )
    loop
      update goodsdeliveries@eol
      set    TrackingNumber = r.TrackingCode -- ONBEKEND VELD
      where  deliverynumber = r.OrderExternalRef
      and    TrackingNumber = 'COMMUNICATED'
      ;
      if sqlrowcount != 1
      then
        l_errors_1 := l_errors_1 || chr(13) || 'Could not find delivery number ' || r.OrderExternalRef || ' to update tracking reference to ' || r.TrackingCode || '.';
      end if;
    end loop;
    --
    select listagg
           ( 'The delivery number ' || clo.OrderExternalRef || ' can not be found in Exact Online.'
           , chr(13) || chr(10)
           )
           errors_txt
    into   l_errors_2
    from   collos@inmemorystorage clo
    left
    outer
    join   goodsdeliveries@eol gdy
    on     gdy.DeliveryNumber = clo.OrderExternalRef
    where  gdy.DeliveryNumber is null
    ;
    create or replace table gdy_totals@inmemorystorage
    as
    select gdy.EntryId
    ,      gdy.DeliveryNumber
    ,      gle.ItemCode
    ,      sum(gle.QuantityOrdered) QuantityOrdered
    from   Collos@inmemorystorage clo
    join   GoodsDeliveries@eol gdy
    on     gdy.DeliveryNumber = clo.OrderExternalRef
    join   goodsdeliverylines@eol gle
    on     gle.entryid = gdy.entryid
    group
    by     gdy.EntryId
    ,      gdy.DeliveryNumber
    ,      gle.ItemCode
    ;
    select listagg
           ( 'The delivery number '
             || coalesce(cle.OrderExternalRef, to_char(gdy.DeliveryNumber))
             || ' for '
             || coalesce(cle.QtyDelivered, gdy.QuantityOrdered)
             || ' x '
             || coalesce(gdy.ItemCode, cle.ItemNum)
             || ' '
             || case
                when gdy.DeliveryNumber is null
                then ' can not be found in Exact Online.'
                when cle.OrderExternalRef is null
                then ' exists in Exact Online, but not in the picked items report.'
                else ' has ' || cle.QtyDelivered || ' pieces in picked items report, but ' || gdy.QuantityOrdered || ' in Exact Online.'
                end
           , chr(13) || chr(10)
           ) errors_txt
    into   l_errors_3
    from   collolines@inmemorystorage cle
    full
    outer
    join   gdy_totals@inmemorystorage gdy
    on     gdy.DeliveryNumber = cle.OrderExternalRef
    and    gdy.ItemCode       = cle.ItemNum
    where  ( gdy.DeliveryNumber is null or cle.OrderExternalRef is null or cle.QtyDelivered != gdy.QuantityOrdered )
    ;
    --
    -- TODO: Accept POST of xml file with picked items.
    --
    create or replace table output@inmemorystorage
    as
    select l_errors_1 txt
    from   dual@datadictionary
    where  l_errors_1 is not null
    union all
    select l_errors_2
    from   dual@datadictionary
    where  l_errors_2 is not null
    union all
    select l_errors_3
    from   dual@datadictionary
    where  l_errors_3 is not null
    ;
    select count(*)
    into   l_cnt_output
    from   output@inmemorystorage
    ;
    if l_cnt_output = 0 
    then
      l_xlsx_filename := 'shipping-results-success.xlsx';
    else
      l_xlsx_filename := 'shipping-results-errors.xlsx';
    end if;
    --
    -- Retrieve results.
    --
    l_workbook := excel.new();
    --
    -- Add a worksheet with a title.
    --
    l_worksheet := excel.add_worksheet
    ( l_workbook
    , 'Parameters'
    );  
    excel.set_cell_contents(l_worksheet, 'A1', 'Exact Online load WICS shipping results using Invantive Cloud');
    excel.set_cell_contents(l_worksheet, 'A2', 'Created (UTC) ' || to_char(sysdateutc));    
    --
    l_worksheet := excel.add_worksheet
    ( l_workbook
    , 'Shipping Results'
    );  
    excel.fill_using_query(l_worksheet, 'select * from output@inmemorystorage');
    --
    -- Retrieve the resulting XLSX-file.
    --
    l_binary := excel.export_to_xlsx(l_workbook);
    --
    -- Return the XLSX file to the user.
    --
    cloud_http.set_response_body_binary(l_binary);
    cloud_http.set_response_content_type('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
    cloud_http.set_response_header_value('Content-Disposition', 'attachment; filename="' || l_xlsx_filename || '"');
  end if;
end;

De volgende versie werkt wel in het Query Tool, maar vereist losse blokken:

--
-- Import XML from WICS WMS.
--
-- Marks picking slips with tracking code from WICS WMS.
--
set use-http-disk-cache false;

set use-http-memory-cache false;

local undefine XML_FILE_NAME_PATH

--
-- Place XML data in temporary in-memory tables.
--
declare
  l_xml           varchar2;
  l_xml_filename  varchar2 := '${XML_FILE_NAME_PATH}';
begin
  --
  -- Process XML file with shipments from WICS.
  --
  select file_contents
  into   l_xml
  from   read_file_text(l_xml_filename)@os
  ;
  --
  if l_xml is null
  then
    raise_application_error('sample002', 'The file XML payload is empty.');
  end if;  
  --
  create or replace table shipments@inmemorystorage
  as
  select *
  from   xmltable
         ( '/Shipment'
           passing l_xml
           columns OrderExternalRef varchar2 path './OrderExternalRef'
           ,       ShippingDate     datetime path './ShippingDate'
         )
  ;
  create or replace table collos@inmemorystorage
  as
  select *
  from   xmltable
         ( '/Shipment/Collos/Collo'
           passing l_xml
           columns OrderExternalRef varchar2 path '../../OrderExternalRef'
           ,       ShippingDate     datetime path '../../ShippingDate'
           ,       TrackingCode     varchar2 path './TrackingCode'
         )
  ;
  create or replace table collolines@inmemorystorage
  as
  select *
  from   xmltable
         ( '/Shipment/Collos/Collo/Lines/Line'
           passing l_xml
           columns OrderExternalRef varchar2 path '../../../../OrderExternalRef'
           ,       ShippingDate     datetime path '../../../../ShippingDate'
           ,       TrackingCode     varchar2 path '../../TrackingCode'
           ,       OrderlineID      integer  path './OrderlineID'
           ,       ItemNum          varchar2  path './ItemNum'
           ,       QtyDelivered     integer  path './QtyDelivered'
           ,       StockUnit        varchar2  path './StockUnit'
           ,       Notes            varchar2  path './Notes'
         )
  ;
end;

--
-- Mark the picking slips with the tracking code from WICS WMS.
--
-- Separate PSQL block to allow collos@inmemorystorage to be pre-defined.
--
declare
  l_errors_1      varchar2;
  l_errors_2      varchar2;
  l_errors_3      varchar2;
  l_workbook      excel_workbook;
  l_worksheet     excel_worksheet;
  l_binary        blob;
  l_cnt_output    number;
  l_xlsx_filename varchar2;
begin
  --
  l_errors_1 := '';
  l_errors_2 := '';
  l_errors_3 := '';
  --
  -- Update tracking numbers.
  --
  for r
  in 
  ( select *
    from   collos@inmemorystorage
  )
  loop
    update goodsdeliveries@eol
    set    TrackingNumber = r.TrackingCode
    where  deliverynumber = r.OrderExternalRef
    and    TrackingNumber = 'COMMUNICATED'
    ;
    if sqlrowcount != 1
    then
      l_errors_1 := l_errors_1 || chr(13) || 'Could not find delivery number ' || r.OrderExternalRef || ' to update tracking reference to ' || r.TrackingCode || '.';
    end if;
  end loop;
  --
  select listagg
         ( 'The delivery number ' || clo.OrderExternalRef || ' can not be found in Exact Online.'
         , chr(13) || chr(10)
         )
         errors_txt
  into   l_errors_2
  from   collos@inmemorystorage clo
  left
  outer
  join   goodsdeliveries@eol gdy
  on     gdy.DeliveryNumber = clo.OrderExternalRef
  where  gdy.DeliveryNumber is null
  ;
  create or replace table gdy_totals@inmemorystorage
  as
  select gdy.EntryId
  ,      gdy.DeliveryNumber
  ,      gle.ItemCode
  ,      sum(gle.QuantityOrdered) QuantityOrdered
  from   Collos@inmemorystorage clo
  join   GoodsDeliveries@eol gdy
  on     gdy.DeliveryNumber = clo.OrderExternalRef
  join   goodsdeliverylines@eol gle
  on     gle.entryid = gdy.entryid
  group
  by     gdy.EntryId
  ,      gdy.DeliveryNumber
  ,      gle.ItemCode
  ;
  select listagg
         ( 'The delivery number '
           || coalesce(cle.OrderExternalRef, to_char(gdy.DeliveryNumber))
           || ' for '
           || coalesce(cle.QtyDelivered, gdy.QuantityOrdered)
           || ' x '
           || coalesce(gdy.ItemCode, cle.ItemNum)
           || ' '
           || case
              when gdy.DeliveryNumber is null
              then ' can not be found in Exact Online.'
              when cle.OrderExternalRef is null
              then ' exists in Exact Online, but not in the picked items report.'
              else ' has ' || cle.QtyDelivered || ' pieces in picked items report, but ' || gdy.QuantityOrdered || ' in Exact Online.'
              end
         , chr(13) || chr(10)
         ) errors_txt
  into   l_errors_3
  from   collolines@inmemorystorage cle
  full
  outer
  join   gdy_totals@inmemorystorage gdy
  on     gdy.DeliveryNumber = cle.OrderExternalRef
  and    gdy.ItemCode       = cle.ItemNum
  where  ( gdy.DeliveryNumber is null or cle.OrderExternalRef is null or cle.QtyDelivered != gdy.QuantityOrdered )
  ;
  create or replace table output@inmemorystorage
  as
  select l_errors_1 txt
  from   dual@datadictionary
  where  l_errors_1 is not null
  union all
  select l_errors_2
  from   dual@datadictionary
  where  l_errors_2 is not null
  union all
  select l_errors_3
  from   dual@datadictionary
  where  l_errors_3 is not null
  union all
  select 'Verwerkt: ' || trackingcode txt
  from   COLLOLINES@InMemoryStorage
  ;
  select count(*)
  into   l_cnt_output
  from   output@inmemorystorage
  ;
  l_xlsx_filename := 'shipping-results-';
  if l_cnt_output = 0 
  then
    l_xlsx_filename := l_xlsx_filename || 'success';
  else
    l_xlsx_filename := l_xlsx_filename || 'errors';
  end if;
  l_xlsx_filename := l_xlsx_filename || '-' || to_char(sysdateutc, 'YYYYMMDDHH24MISS') || '.xlsx';
  --
  -- Retrieve results.
  --
  l_workbook := excel.new();
  --
  -- Add a worksheet with a title.
  --
  l_worksheet := excel.add_worksheet
  ( l_workbook
  , 'Parameters'
  );  
  excel.set_cell_contents(l_worksheet, 'A1', 'Exact Online load WICS shipping results using Invantive Query Tool');
  excel.set_cell_contents(l_worksheet, 'A2', 'Created (UTC) ' || to_char(sysdateutc));    
  --
  l_worksheet := excel.add_worksheet
  ( l_workbook
  , 'Shipping Results'
  );  
  excel.fill_using_query(l_worksheet, 'select * from output@inmemorystorage');
  --
  -- Retrieve the resulting XLSX-file.
  --
  l_binary := excel.export_to_xlsx(l_workbook);
  --
  -- Create output file.
  --
  create or replace table outputblob@inmemorystorage
  as
  select l_xlsx_filename filename
  ,      l_binary file_contents
  ;
end;

--
-- Create Excel sheet with import results on desktop folder of current Windows user.
--
select *
from   outputblob@inmemorystorage

local export documents in file_contents to "${system:userdesktopdirectory}" filename column filename

Goed dat je een workaround hebt gevonden in het Query Tool. We hebben al een gedeelte van de analyse van dit probleem kunnen doen, en het zit 'm in iets dat “scoping” heet: welke variabelen zijn waar en wanneer gedefinieerd. Daar gaat iets in fout voor dit specifieke statement.

We gaan er verder in duiken. Als en zodra er een oplossing is dan voegen we een antwoord hier toe.