webMethods

webMethods

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

Validate records with no identifiers in a flat file

  • 1.  Validate records with no identifiers in a flat file

    Posted Fri October 11, 2013 12:49 AM

    Hi,

    I have data records in my flat file with no record identifiers, so I created a default record in my dictionary and specified that as the default record in the flat file schema. I need to validate my data records for mandatory fields and some field length restrictions so I specified them when I defined my record in the dictionary. However, when I am trying to validate my invalid flat file against the schema, none of the validations are working. Does it mean that we cannot validate records with no definitions in our flat file or am I missing something ?

    Thanks,
    Shanthi


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 2.  RE: Validate records with no identifiers in a flat file

    Posted Fri October 11, 2013 10:10 AM

    It should not be like that in convertToValues if you give validate=true
    then it will generate errors


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 3.  RE: Validate records with no identifiers in a flat file

    Posted Fri October 11, 2013 06:30 PM

    What parameters you set on the flatFile:convertToValues with validate=true and returnErrors = asArray and maxErrors = -1? then it should return errors list in the Results pipeline.

    HTH,
    RMG


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 4.  RE: Validate records with no identifiers in a flat file

    Posted Sun October 13, 2013 03:39 PM

    I have specified validate=“true” for the convertToValues service and yet it does not validate the default records. I have header and trailer records which have record identifiers and those get validated just fine . It’s only the data records which do not have the record identifiers that are not getting validated. I have specified certain fields as mandatory in the data records and if I am not passing any values, it should fail but it validates to true.


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 5.  RE: Validate records with no identifiers in a flat file

    Posted Tue October 15, 2013 10:46 AM


  • 6.  RE: Validate records with no identifiers in a flat file

    Posted Tue October 15, 2013 11:24 AM

    What ever data I pass gets parsed correctly.


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 7.  RE: Validate records with no identifiers in a flat file

    Posted Tue October 15, 2013 01:48 PM

    Can you provide more details about dictonary and flatfile data, if possiable attach a sample file also


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 8.  RE: Validate records with no identifiers in a flat file

    Posted Tue October 15, 2013 02:27 PM

    Hi Sai,

    Please find the sample flat files attached. Basically, my flat file has a header and trailer with record identifiers and multiple data records with no record Identifiers.I have attached a copy of both the valid and invalid flat files. In the Invalid file I have only three fields in the first data record and the fourth field which is not present is mandatory. I have skipped the rest of the fields as well. When I run the invalid file against the schema it validates to true.

    Thanks,
    Shanthi
    InvalidData.txt (218 Bytes)
    ValidData.txt (223 Bytes)


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 9.  RE: Validate records with no identifiers in a flat file

    Posted Thu October 31, 2013 12:48 PM

    I am also running through the same situation… anyone has answer for it? why it validates as true even for invalid files too?


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 10.  RE: Validate records with no identifiers in a flat file

    Posted Thu October 31, 2013 02:10 PM

    What settings you have in covertToValues inputs?

    Also by default your FF data should match exact same wrt FFSchema to make it work.

    HTH,
    RMG


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 11.  RE: Validate records with no identifiers in a flat file

    Posted Thu January 24, 2019 07:50 AM

    I am also facing a similar issue.Did any forum member find solution of this?


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB