Topic
  • 7 replies
  • Latest Post - ‏2013-07-05T17:49:42Z by pcp
migsss
migsss
13 Posts

Pinned topic Validating a flat file

‏2013-07-01T11:51:25Z |

Is it possible to validate a flat file against a type tree and report all errors that the file contains?

Thank you...

  • gopiTX
    gopiTX
    8 Posts

    Re: Validating a flat file

    ‏2013-07-02T14:10:53Z  

    Yes You can do that by using restart attribute and REJECT Function.

  • migsss
    migsss
    13 Posts

    Re: Validating a flat file

    ‏2013-07-03T10:28:09Z  
    • gopiTX
    • ‏2013-07-02T14:10:53Z

    Yes You can do that by using restart attribute and REJECT Function.

    Thank you for the answer!

    I am trying to use restart and Reject to validate the file but I have a lot of doubts. I am putting restart attribute at the group level (in order to catch errors for each line of the file) and using reject to report the content that was not valid.

    The problem is that I cannot know what field of the record is the source of the error. Do I have to use restart and reject for all the single fields of the tree?

    In addiction, I can now that there was an error and the content of the record or field that was invalid. But how can I get the reason. Is not enough to tell the client "Something is wrong with your data". I need to tell him why. And I do not know any function to get the description of the error.

    What is the technique to achieve what I need. There has to be a way...

  • gopiTX
    gopiTX
    8 Posts

    Re: Validating a flat file

    ‏2013-07-03T10:52:55Z  
    • migsss
    • ‏2013-07-03T10:28:09Z

    Thank you for the answer!

    I am trying to use restart and Reject to validate the file but I have a lot of doubts. I am putting restart attribute at the group level (in order to catch errors for each line of the file) and using reject to report the content that was not valid.

    The problem is that I cannot know what field of the record is the source of the error. Do I have to use restart and reject for all the single fields of the tree?

    In addiction, I can now that there was an error and the content of the record or field that was invalid. But how can I get the reason. Is not enough to tell the client "Something is wrong with your data". I need to tell him why. And I do not know any function to get the description of the error.

    What is the technique to achieve what I need. There has to be a way...

    You can get the exact error from trace file

  • migsss
    migsss
    13 Posts

    Re: Validating a flat file

    ‏2013-07-04T07:13:27Z  
    • gopiTX
    • ‏2013-07-03T10:52:55Z

    You can get the exact error from trace file

    And how do you report to the client of the map? Do you give him access to the trace file? You make some mapping of the trace? Or your answer is only "there was some error" and he has to use human communication (talking with an administrator) in order to know the details?

    Thank you!!

  • Sidhumohan
    Sidhumohan
    34 Posts

    Re: Validating a flat file

    ‏2013-07-04T08:27:47Z  
    • migsss
    • ‏2013-07-04T07:13:27Z

    And how do you report to the client of the map? Do you give him access to the trace file? You make some mapping of the trace? Or your answer is only "there was some error" and he has to use human communication (talking with an administrator) in order to know the details?

    Thank you!!

    If you want to repor the error to the customer.

    Use the Resatrt attribute in the parent group level and then use the function GETXMLERRORMSG(Input card number). This wil capture the error in the file. If you want to report it pass the extracted information from this, pass it to another map and get it done. You will get the excat field level details from the file and so you will get all informations from the same.

     

  • migsss
    migsss
    13 Posts

    Re: Validating a flat file

    ‏2013-07-04T08:36:40Z  

    If you want to repor the error to the customer.

    Use the Resatrt attribute in the parent group level and then use the function GETXMLERRORMSG(Input card number). This wil capture the error in the file. If you want to report it pass the extracted information from this, pass it to another map and get it done. You will get the excat field level details from the file and so you will get all informations from the same.

     

    Thank you for the advice.

    My problem is that the input card's type tree is a flat format, not a XML, so I think that the function GETXMLERRORMSG will not return anything...

  • pcp
    pcp
    14 Posts

    Re: Validating a flat file

    ‏2013-07-05T17:49:42Z  

    You can do that using Data Audit Settings.

    Once the window opens, drag and drop the Group where you set the Restart option.

    Change the settings in the Track, Details and Item Data  to "Error".

    All the fields in error will be reported in the Audit Log file that is generated from the map on validation errors.

    Thanks,

    Phil