11 Replies Latest reply: Nov 13, 2015 8:25 AM by Friedrich Hofmann RSS

    LOAD with a lot of variables

    Friedrich Hofmann

      Hi,

       

      I have a rather complicated LOAD from an Excel list where each month one column is inserted in a specific place.

      To find out whether or not to load certain columns, I have a script working in several steps (I will attach it all in a txt file so that you can reconstruct it)

       

      - First, I have a FIRST1 LOAD so that I know all the fieldnames;

      - Then I parse columns 33 (in this instance) to 45 (12 months) and fill two variables for each:

         - If the fieldname is such that it is a real field, the first variable holds its fieldname

         - In that case, the second one holds an alias (the fieldname a bit shorter)

         - If the fieldname does not meet my criteria, both variables are e.g. > dummy_37 <

       

      Once all those variables are filles, I have the actual LOAD with 12 lines (33 to 45) all looking the same (built up in Excel). They work fine in principle but for a detail:

      - When I put the field_variable in square brackets (they do have BLANKs), then the script breaks at line 44 (there is no data for Nov and

       

         thus there is no column) and I get a message "Field not found > dummy_44 <"

      - When I put the field_variable in quotes instead, I get only the name of the field in every line, not the value.

       

      Can anyone help me solve that issue?

       

      Thanks a lot!

       

      Best regards,

       

      DataNibbler