IBM Sterling Transformation Extender

 View Only
Expand all | Collapse all

v10.1.2 Is there a way to stop log files from creating in xml maps?

  • 1.  v10.1.2 Is there a way to stop log files from creating in xml maps?

    Posted 29 days ago

    These files are building up on our production servers.  Is there a switch somewhere to stop them from being created on every run?



    ------------------------------
    Steve Arbo
    ------------------------------


  • 2.  RE: v10.1.2 Is there a way to stop log files from creating in xml maps?

    Posted 29 days ago

    Usually we refer Log file as Audit Log. It's produced by each map execution. It's compiled into the map when it's turned on.  Usually it's done by the map developer.  For most runtime platforms, you can also turn it off without recompiling the map.



    ------------------------------
    Rex Chan
    ------------------------------



  • 3.  RE: v10.1.2 Is there a way to stop log files from creating in xml maps?

    Posted 29 days ago

    All audit log settings are set to OFF.  The file that gets produced is the incoming file name with "_log.xml" appended to it.



    ------------------------------
    Steve Arbo
    ------------------------------



  • 4.  RE: v10.1.2 Is there a way to stop log files from creating in xml maps?

    Posted 29 days ago

    I assume this is produced by ITX and not the map (with an output card).   Can you cut and paste 20+ lines here so we know what we are dealing with?



    ------------------------------
    Rex Chan
    ------------------------------



  • 5.  RE: v10.1.2 Is there a way to stop log files from creating in xml maps?

    Posted 29 days ago

    I don't know what's producing the log but it's not an output card.  Not clear on what 20 lines you're referring to?  We have what we call a shell map that executes several commands, including running the map that translates the xml.

    This only happens in our maps that translate xml.  We also do flat files, X12, etc.  Those don't produce a log.



    ------------------------------
    Steve Arbo
    ------------------------------



  • 6.  RE: v10.1.2 Is there a way to stop log files from creating in xml maps?

    Posted 29 days ago

    I just want to see if this log is produced by ITX or not.   I won't want to be shooting in the dark.

    In addition to seeing the content, can you give an example of the xml file name?



    ------------------------------
    Rex Chan
    ------------------------------



  • 7.  RE: v10.1.2 Is there a way to stop log files from creating in xml maps?

    Posted 28 days ago

    Here are two screen shots of the shell map and the map it calls.

    Example input file name;  EDII.G0SK1R1.Y22011.R999999.LFN0363.G0001V00

    Log file produced;  EDII.G0SK1R1.Y22011.R999999.LFN0363.G0001V00_log.xml



    ------------------------------
    Steve Arbo
    ------------------------------



  • 8.  RE: v10.1.2 Is there a way to stop log files from creating in xml maps?

    Posted 28 days ago

    I don't mean the map screen shot, I mean the content of the log file.  This is what you have.

    Log file produced;  EDII.G0SK1R1.Y22011.R999999.LFN0363.G0001V00_log.xml

    I looked at my folder which runs a XML map and this is what it produced:

    Mer_XMLTo810_70601610408425_92_virtuser-PC_log.xml

    This is part of the content from the beginning of the file:

    <!--Received StartElement : Partner --> 
    <!--Received StartElement : Partner --> 
    <!--Finding Element Partner with namespace  in Partner --> 
    <!--Partner Element is found under Partner --> 
    <!--Received StartElement : Element --> 
    <!--Finding Element Element with namespace  in Partner --> 
    <!--Element Element is found under Partner --> 
    <!--Received EndElement : Element --> 
    <TypeEntry>
        <TypeName>Element</TypeName>
        <Type>16</Type>
        <ParentType>14</ParentType>
        <Level>4</Level>
        <DocumentType>XML_ELEMENT</DocumentType>
        <LogicalOffset>120</LogicalOffset>
        <LogicalLength>1</LogicalLength>
        <Length>1</Length>
        <ObjectNumber>0</ObjectNumber>
        <Data></Data>
    </TypeEntry>

    It is a XML parser trace file.  The reason this file is produced is because the Map Trace is turned on. This is the one that produces the .mtr file.  Turn it off and this log file with xml extension should not be produced.



    ------------------------------
    Rex Chan
    ------------------------------



  • 9.  RE: v10.1.2 Is there a way to stop log files from creating in xml maps?

    Posted 28 days ago
    Edited by Rex Chan 28 days ago

    If the XML file is not read by the main map you showed, it's probably in one of the RUN maps.

    In RUN map, you can turn the trace on (-T).

    These are the possible RUN options.

    https://www.ibm.com/docs/en/ste/10.0.0?topic=commands-execution

    If you don't see it, check the map (the one with the RUN command) to see if the Trace is turned on in the Map setting.

    ------------------------------
    Rex Chan
    ------------------------------



  • 10.  RE: v10.1.2 Is there a way to stop log files from creating in xml maps?

    Posted 28 days ago

    The trace is OFF in the map settings for both but we do have a -T in the run line to create one for trouble shooting on bad files.  When I took the -T out, it did not produce a log file.  I guess there's no way to have a trace created without creating a log file.  I'll just have to execute another line to delete the log file every time.

    RUN("GNMA_0363.mmc", "-TIC1=" + cmd_line1 Fields:trigger_out + ".mtr" + " -IF1 " + cmd_line4 Fields:trigger_out + cmd_line1 Fields:trigger_out + " -OF1 " + cmd_line4 Fields:trigger_out + cmd_line1 Fields:trigger_out + ".TRN")



    ------------------------------
    Steve Arbo
    ------------------------------



  • 11.  RE: v10.1.2 Is there a way to stop log files from creating in xml maps?

    Posted 28 days ago

    Another technique available is to use an Output card to capture the XML trace.  In a new card, use this function where (1) is input card #1:

    =GETXMLERRORMSG (1)

    This is what is produced and that's what we usually want to debug an XML error.  It tells you exactly which line number and the error.  To me, it's more valuable than regular map trace (which may only give you a generic error).  The map trace can be set to OFF to get this error message.

    Error (-1), "XMLParser: Error(s) occurred."
    SAXParseException, Error [line: 235 column: 55] Datatype error: Type:NumberFormatException, Message: Invalid chars encountered. 

    In addition, you have better control over the output file name and folder location.



    ------------------------------
    Rex Chan
    ------------------------------



  • 12.  RE: v10.1.2 Is there a way to stop log files from creating in xml maps?

    Posted 28 days ago

    I ran a good XML file and it produces an empty file (zero bytes).

    I changed the output card setting for this card to "CreateOnContent".

    No file is produced.

    This is nice because I don't want to see any error file produced when there is no error.



    ------------------------------
    Rex Chan
    ------------------------------



  • 13.  RE: v10.1.2 Is there a way to stop log files from creating in xml maps?

    Posted 7 days ago

    Hi Steve,

    This reply may be a tad late but I thought I would add a bit to Rex's explanations.  He provided the link with the full list of run-time execution command line overrides:

    https://www.ibm.com/docs/en/ste/10.0.0?topic=commands-execution

    This is a helpful page to bookmark to be able to refer back to when needing to either use or decode ones in use.  From the RUN() command example you provided I and prior comments I can deduce a few things:

    1. The developer of the map turned on both Trace and Audit when they compiled the map.
    2. The Trace option is being overridden to limit it to input trace for card 1 only and written to a file name defined in the map field called cmd_line1.  The Input and outputs are also overridden in a similar manner using content defined in the map.

    What isn't obvious in either the official documentation or the map settings is a few things I have learned over time working with ITX since 1999.  Some ITX versions/deployment targets do not let you override these settings for Trace and Audit unless they were included at compile time.  For example, if I compile a map on windows in 10.1 for Linux without enabling Trace or Audit, I cannot force it (without recompile) to produce the trace or audit file.

    The inverse is also similarly true.  If it has been enabled and not explicitly turned off it will always produce the content in the default locations (map directory or whatever was compiled into the map at development time). 

    So from you example to suppress the audit from being produced BUT still keeping the trace file you would need to add a "-A" to the command line.  "-A" or -"T" without any other qualifying options is the override to NOT produce the audit or trace regardless of it being enabled or not.  If you don't want these items (especially in a production environment) always include -A -T to suppress in the RUN command settings and that way you don't have to guess what the dev did or didn't do to enable these run artifacts.

    Here is your RUN with Audit suppressed:

    RUN("GNMA_0363.mmc", "-A -TIC1=" + cmd_line1 Fields:trigger_out + ".mtr" + " -IF1 " + cmd_line4 Fields:trigger_out + cmd_line1 Fields:trigger_out + " -OF1 " + cmd_line4 Fields:trigger_out + cmd_line1 Fields:trigger_out + ".TRN")

    Happy mapping!



    ------------------------------
    Lisa Edwards
    Software Engineer / Subject Matter Expert
    Rainbow Data Systems, Inc
    ------------------------------