Trapping with same characteristics

Jill_22468
Jill_22468 Altair Community Member
edited June 2019 in Community Q&A

​I am trying to build a model and two of the items that I need to trap as seperate items have the same label and characteristics in my report. Any suggestions or advice in trapping these items would be greatly appreciated. The items are labeled in red, TRACE:.

------------------------------
Jill Williams
Director of Finance
Schneider Regional Medical Center Hospital
340-776-8311 etc 8106
------------------------------

Tagged:

Best Answer

  • CPorthouse
    CPorthouse
    Altair Employee
    edited June 2019 Answer ✓
    In your sample, it appears that the first trace number is not always the same length.  What about the second trace number?  The first suggestion would work if you can be certain that a blank will always occur somewhere in the same column that the second trace number isn't.

    Does the second trace number always occur above the settlement date line?  If so, you can create a multiline trap to capture the two lines:
    • TRACE NUMBER
    • SETTLEMENT DATE
    Set the trap line to #2 and your trap to capture settlement date.  In your sample text window you can then define two fields, Settlement date and TraceNumber2.

    You can then create another trap for the first trace number to trap on "Trace Number:"
    I mocked up your sample like so:
    sample
    And here is what I get in my data preview:
    data preview


    ------------------------------
    Chris Porthouse
    Senior Implementation & Integration Engineer
    Altair
    ------------------------------
    -------------------------------------------
    Original Message:
    Sent: 06-24-2019 10:07 AM
    From: Jill Williams
    Subject: Trapping with same characteristics

    I am trying to build a model and two of the items that I need to trap as seperate items have the same label and characteristics in my report. Any suggestions or advice in trapping these items would be greatly appreciated. The items are labeled in red, TRACE:.

    ------------------------------
    Jill Williams
    Director of Finance
    Schneider Regional Medical Center Hospital
    340-776-8311 etc 8106
    ------------------------------
    "

Answers

  • jdb910
    jdb910 Altair Community Member
    edited June 2019
    If all of the Trace Number records have the same number of digits as your example, the top one could be trapped with the literal "Trace Number:" with a "Blank" in the column to the far right of the last digit.  The bottom one could be trapped with the literal "Trace Number:" with a "Number" in the column at the same position as the "Blank" in the top one.  

    I am speaking from v10.5 thru v12.x experience, it may be easier with newer versions.  Also depending on version, there are limits to the number of "Append, Header, Footer traps, but I think you could trap all of the data even within the strictest limits.

    Just a question, do you have any power over format of the report?  If so, I would make the format such that would always have the same number of lines per record.  That would enhance the ability to trap the data.

    ------------------------------
    Joe Berry
    Healthcare Consultant
    Legacy Monarch Users
    IL
    (309) 224-6347
    ------------------------------
    -------------------------------------------
    Original Message:
    Sent: 06-24-2019 10:07 AM
    From: Jill Williams
    Subject: Trapping with same characteristics

    I am trying to build a model and two of the items that I need to trap as seperate items have the same label and characteristics in my report. Any suggestions or advice in trapping these items would be greatly appreciated. The items are labeled in red, TRACE:.

    ------------------------------
    Jill Williams
    Director of Finance
    Schneider Regional Medical Center Hospital
    340-776-8311 etc 8106
    ------------------------------
    "
  • CPorthouse
    CPorthouse
    Altair Employee
    edited June 2019 Answer ✓
    In your sample, it appears that the first trace number is not always the same length.  What about the second trace number?  The first suggestion would work if you can be certain that a blank will always occur somewhere in the same column that the second trace number isn't.

    Does the second trace number always occur above the settlement date line?  If so, you can create a multiline trap to capture the two lines:
    • TRACE NUMBER
    • SETTLEMENT DATE
    Set the trap line to #2 and your trap to capture settlement date.  In your sample text window you can then define two fields, Settlement date and TraceNumber2.

    You can then create another trap for the first trace number to trap on "Trace Number:"
    I mocked up your sample like so:
    sample
    And here is what I get in my data preview:
    data preview


    ------------------------------
    Chris Porthouse
    Senior Implementation & Integration Engineer
    Altair
    ------------------------------
    -------------------------------------------
    Original Message:
    Sent: 06-24-2019 10:07 AM
    From: Jill Williams
    Subject: Trapping with same characteristics

    I am trying to build a model and two of the items that I need to trap as seperate items have the same label and characteristics in my report. Any suggestions or advice in trapping these items would be greatly appreciated. The items are labeled in red, TRACE:.

    ------------------------------
    Jill Williams
    Director of Finance
    Schneider Regional Medical Center Hospital
    340-776-8311 etc 8106
    ------------------------------
    "
  • Jill_22468
    Jill_22468 Altair Community Member
    edited June 2019

    In your sample, it appears that the first trace number is not always the same length.  What about the second trace number?  The first suggestion would work if you can be certain that a blank will always occur somewhere in the same column that the second trace number isn't.

    Does the second trace number always occur above the settlement date line?  If so, you can create a multiline trap to capture the two lines:

    • TRACE NUMBER
    • SETTLEMENT DATE
    Set the trap line to #2 and your trap to capture settlement date.  In your sample text window you can then define two fields, Settlement date and TraceNumber2.

    You can then create another trap for the first trace number to trap on "Trace Number:"
    I mocked up your sample like so:
    sample
    And here is what I get in my data preview:
    data preview


    ------------------------------
    Chris Porthouse
    Senior Implementation & Integration Engineer
    Altair
    ------------------------------
    -------------------------------------------
    Original Message:
    Sent: 06-24-2019 10:07 AM
    From: Jill Williams
    Subject: Trapping with same characteristics

    I am trying to build a model and two of the items that I need to trap as seperate items have the same label and characteristics in my report. Any suggestions or advice in trapping these items would be greatly appreciated. The items are labeled in red, TRACE:.

    ------------------------------
    Jill Williams
    Director of Finance
    Schneider Regional Medical Center Hospital
    340-776-8311 etc 8106
    ------------------------------
    "
    This worked perfectly! This is the first time I have used a multi line trap and it worked great. Thank you so much for the advice! Have a great day.


    ------------------------------
    Jill Williams
    Director of Finance
    Schneider Regional Medical Center Hospital
    340-776-8311 etc 8106
    ------------------------------
    -------------------------------------------
    Original Message:
    Sent: 06-25-2019 06:36 AM
    From: Chris Porthouse
    Subject: Trapping with same characteristics

    In your sample, it appears that the first trace number is not always the same length.  What about the second trace number?  The first suggestion would work if you can be certain that a blank will always occur somewhere in the same column that the second trace number isn't.

    Does the second trace number always occur above the settlement date line?  If so, you can create a multiline trap to capture the two lines:
    • TRACE NUMBER
    • SETTLEMENT DATE
    Set the trap line to #2 and your trap to capture settlement date.  In your sample text window you can then define two fields, Settlement date and TraceNumber2.

    You can then create another trap for the first trace number to trap on "Trace Number:"
    I mocked up your sample like so:
    sample
    And here is what I get in my data preview:
    data preview


    ------------------------------
    Chris Porthouse
    Senior Implementation & Integration Engineer
    Altair
    ------------------------------

    Original Message:
    Sent: 06-24-2019 10:07 AM
    From: Jill Williams
    Subject: Trapping with same characteristics

    I am trying to build a model and two of the items that I need to trap as seperate items have the same label and characteristics in my report. Any suggestions or advice in trapping these items would be greatly appreciated. The items are labeled in red, TRACE:.

    ------------------------------
    Jill Williams
    Director of Finance
    Schneider Regional Medical Center Hospital
    340-776-8311 etc 8106
    ------------------------------
    "