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

Flat file schema problem

  • 1.  Flat file schema problem

    Posted Mon November 14, 2005 04:50 PM

    I am facing prob in creating flatfile schema. COuld anyone please help me…

    Sample flat file Data:

    0000401|001|20|30|5000|0002|234|US|wewwe|qwerqwe|qwerqw|qwer|
    0000406|001|20|30|5000|0002|23423|US|rfff|ertr|qwerqw|dgfh|
    0000407|001|40|30|5000|0002|23423|US|xcvdf|qwerqw|qwerq|wert|

    I have created a Flat file schema with the “recordWithNoId” as record defintion with Max repeat=Unlimted.
    Under the record, created the field definitions(field=1,2,…12)

    under FlatFile Defnition:

    Record Parser: Delimiter
    Character: newline
    filed or composite: |

    When I try to test this schema , it is showing up the below error:
    “com.wm.ff.parse.ParseException: [FFP.0012.0004] Found no valid records”

    Thanks in advance …

    Regards,
    Sunny


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


  • 2.  RE: Flat file schema problem

    Posted Mon November 14, 2005 05:42 PM

    Hi,

    try it with recordWithNoID
    instead of recordWithNoId
    (Notice the last letter, I got confused a couple of times too…)

    It should work, let me know


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


  • 3.  RE: Flat file schema problem

    Posted Mon November 14, 2005 06:45 PM

    Hi Monzon,
    Thanks for the quick response.

    I tried with recordWithNoID instead of recordWithNoId
    but still I am getting the same error
    “com.wm.ff.parse.ParseException: [FFP.0012.0004] Found no valid records”

    Regards,
    Sunny


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


  • 4.  RE: Flat file schema problem

    Posted Mon November 14, 2005 08:49 PM

    Did you set RecordDefiniton recordWithNoIDmaxRepeat=unlimited?
    also make sure you use nth field option if it is not fixed length flatfile.

    HTH,
    RMG


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


  • 5.  RE: Flat file schema problem

    Posted Mon November 14, 2005 08:51 PM

    It looks you have everything in place based on your above comments,try flatfile with one line instead of multiple lines and make sure you have defined everything in the flatfile as per the sample data you have

    If it works then test with multiple lines

    HTH,
    RMG


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


  • 6.  RE: Flat file schema problem

    Posted Mon November 14, 2005 09:26 PM

    Hi,

    I don’t see why it is not working, but I can suggest the pub.string.tokenize alternative using “|” as your delimiter to extract your data, and then work it from there.

    hth


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


  • 7.  RE: Flat file schema problem

    Posted Mon November 14, 2005 09:56 PM

    Hi,
    I have tried using single line. It is still fails.
    I am attaching the zip file with this message. Please go through that and let me know where I am wrong…

    0000401|001|20|30|5000|0002|234|US|wewwe|qwerqwe|qwerqw|qwer|
    0000406|001|20|30|5000|0002|23423|US|rfff|ertr|qwerqw|dgfh|
    0000407|001|40|30|5000|0002|23423|US|xcvdf|qwerqw|qwerq|wert|

    Regards,
    Sunny

    FFScema
    testSchemanov14.zip (4.1 k)


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


  • 8.  RE: Flat file schema problem

    Posted Tue November 15, 2005 05:01 AM

    Sunny,

    Try setting the field positions as Nth field.
    And also set the default record to the record you defined.
    I’m assuming you are using a 6.X version. recordWithNoID does not work like it did in 4.6. I have lots of discussion on here about that.
    The “new” way is to use the default record.
    For more details use the search feature for recordWithNoID or default record.
    But first try my first two suggestions.


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


  • 9.  RE: Flat file schema problem

    Posted Tue November 15, 2005 03:12 PM

    In 6.x i believe with out using default record the recordWithNID will work i am not sure whether you are missing selecting of Nth field option while you defined field position.(1,2,3,4…).

    If this not works try with default record option unless you have dictionary created.

    HTH,
    RMG


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


  • 10.  RE: Flat file schema problem

    Posted Tue November 15, 2005 04:38 PM

    Hi ,

    I am not clear about setting the default record option.
    Could you please let me know how to set the default record in dictionary. I looked under SETTINGS for that, but unable to find.

    Regards,
    Sunny


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


  • 11.  RE: Flat file schema problem

    Posted Tue November 15, 2005 05:32 PM

    Basically you have to do in the Schema under Settings and use default record referring with Dictionary,this should have recordWithNoID.

    HTH,
    RMG


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


  • 12.  RE: Flat file schema problem

    Posted Tue November 15, 2005 10:28 PM

    I made the chaanges as you have suggested. But still I am having the same problem. I tried with simple data.

    asdasasdasasdasd!

    Please go through the services and let me know where I am incorrect.
    Thanks in advance…

    Regards,
    Sunny

    testSchemaNoRecords
    testSchemanov15.zip (4.8 k)


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


  • 13.  RE: Flat file schema problem

    Posted Thu November 17, 2005 04:04 PM

    Hi,

    Thanks a lot for all your help …
    It is working for me now …

    Regards,
    Sunny


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


  • 14.  RE: Flat file schema problem

    Posted Fri December 02, 2005 12:44 PM

    version 6.1
    Input flat file is
    //1st record
    018301014 - 00000009047+000000000002005100312:47:19200510030000
    2032J Wilson Copsey PO Box 402 Mechanicsville
    D 20659-0402
    ACCL
    // 2nd record
    047551001 -00000088288+000000000002005100402:07:08200510040000
    6590Delores E Wathen C/O Est of James M Wathen PO Box 165
    Faulkner MD 20632-0165
    ESTRF
    //3rd record
    055556001 -00000029432+000000000002005100307:48:33200510030000
    8361Capt William Runyon PO Box 114 La Plata MD 20
    46-0114
    ACCL
    //4th record

     124998074            -00000001354+000000000002005100307:48:47200510034600 
    

    0047Anneza L Flowers 10803 Alyssa Ln Waldorf MD 206
    3-3959
    ACCL

    /////file ends here

    now we have to create a flat file schema for it …

    and then we have to use ftp protocol for acepting the input and then produce then map the output in the document…

    do help guys (!!! its urgent)


    testFTPFile.txt (1.5 k)


    testFTPFile.txt (1.5 k)


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


  • 15.  RE: Flat file schema problem

    Posted Fri December 02, 2005 05:03 PM

    Hello,

    Yemi Bedu


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


  • 16.  RE: Flat file schema problem

    Posted Mon February 13, 2006 07:18 PM

    hi ,
    i am having the same problem with flatfile schema , when i run my schema and give the flatfile as input it says " no valid records" i saw ur post and u said it worked ,can u tell me what changes u made to make it work .
    mine is a fixed length flatfile schema.
    thanks
    sri


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


  • 17.  RE: Flat file schema problem

    Posted Mon February 13, 2006 11:59 PM

    Shrikanth,

    Pl elaborate your scenario for ppl here to be able to help you better. As for prob reported by Sunny’s, I tried his scenario and was able to make it work by defining a FF Dictionary with a record named “recordWithNoID” that had 12 fields (looking at the data that Sunny posted, there were 12 fields in each record, separated by | ). I then created a record reference in the FF Schema and pointed it to the record in the FF Dictionary, also I set the default record property of the FF Schema to the “recordWithNoID” of the FF Dictionary.

    Under the FF Definition tab of the schema, I defined Record Parser as “Delimiter” and defined a “newline” as a record delimiter and a “|” as the field delimiter. Thereafter I was able to submit the data Sunny posted in his first post and the data was successfully parsed.

    HTH, Rohit


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


  • 18.  RE: Flat file schema problem

    Posted Tue February 14, 2006 01:56 AM

    hi rohit,
    i have a flat file with 5 record , each is a doc list , and unlimited occurances. so my each rec is of fixed length, and i want to know how can i specify a defaullt record (bec i have 5 records ),and also if i dont create a dictionary does it throw a exception, bec i created a schema with 5 rec with all the options as above .and when i give my input file to validate schema it says valid record not found.
    my sample file looks like this
    rec1
    rec2
    rec3
    rec1
    rec2
    rec3
    rec1
    rec2
    rec3


    as u can see each line has a record and each record is fixed length ,and the set (rec1,rec2,rec3) repeats unlimited…
    i am just not understanding how can i make it work …
    thanks
    srikanth


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


  • 19.  RE: Flat file schema problem

    Posted Tue February 14, 2006 06:36 AM

    Srikanth,

    I couldn’t quite follow you there… a doc list within a flat file? Can you paste a sample of your flat file?

    Rohit


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


  • 20.  RE: Flat file schema problem

    Posted Tue February 14, 2006 03:39 PM

    hi rohit,
    ok ill explain in detail ,the incoming flat file is a batch file ,so consider one single file contains 3 lines with each line data is a different record, so we have rec1
    rec2
    rec3
    so this is a single file,but as we have a batch file the incoming file will have unlimited occurances of that seq ,like rec1
    rec2
    rec3
    rec1
    rec2
    rec3…
    so my question is ,how should i create schema for this kind of incoming batch file.


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


  • 21.  RE: Flat file schema problem

    Posted Tue February 14, 2006 03:50 PM

    Do they have record identifiers for rec1,2,3 in your batch file?If so this should help in parsing the file.

    create a Schema with record definition (rec1) and followed by fields(fixed length)
    under this same rec1 hierarchy create record definition (rec2) followed by fields,another record definition (rec3) followed by fields.

    ex:rec1 (max repeat=unlimited)
    ----rec2
    ----rec3

    test the schema with one set of recr1,2,3 and later with multiples.

    If this doesnt work,some one will assist you.

    HTH,
    RMG


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


  • 22.  RE: Flat file schema problem

    Posted Tue February 14, 2006 04:46 PM

    thank you rmg,
    awsome ,it worked just perfect and more over i need to loop only once on that doc list.
    cool
    thank you
    regards
    srikanth


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


  • 23.  RE: Flat file schema problem

    Posted Tue February 14, 2006 04:49 PM


  • 24.  RE: Flat file schema problem

    Posted Wed February 15, 2006 04:16 PM

    hi rmg,
    i am struck at a small problem ,actually i am entring date into the database,and i am getting the error. the column type in database is smalldatetime ,and the input i am providing it is MM/dd/yyyy, but it says need format MM-dd-yyyy mm hh etc…
    and i have just input for the date .
    thanks
    srikanth


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


  • 25.  RE: Flat file schema problem

    Posted Wed February 15, 2006 04:26 PM

    So build the date with dateFormat(Pattern MM-dd-yyyy HH:mm:ss) service accordingly and insert it,also there are few threads discussed on the problem.

    For these type of problems,please do search this site it saves your time.

    HTH,
    RMG


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


  • 26.  RE: Flat file schema problem

    Posted Thu February 16, 2006 02:40 PM

    hi rmg,
    i am struck at a step.
    where in i am populating an array in a loop with values ,
    input output
    string string list
    and when i check the values in string list outside the loop i am getting just the last value entered inside the string list.
    do u have any idea why its happening.
    thanks
    sri


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


  • 27.  RE: Flat file schema problem

    Posted Thu February 16, 2006 03:14 PM

    Sri,

    For this kind use appendToStringList service inside the loop,this should build you the stringlist output.See BuiltInServices userguide for more inputs information.

    But a trick when using this service basically in the pipeline out drop the toList,fromItem.

    HTH,
    RMG


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


  • 28.  RE: Flat file schema problem

    Posted Thu February 16, 2006 03:25 PM

    Sri,

    Make sure you are mapping a string list to “toList” and a string to “fromItem” in “Service In” of pub.list:appendToStringList. Please step through the flow and see the stringList after each iteration.

    HTH.

    -Pauly


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


  • 29.  RE: Flat file schema problem

    Posted Thu February 16, 2006 04:14 PM

    hi rmg,
    thank you
    i have one more quesiton idk if i am doing it properly.
    when i get the string list out of loop,actually i got 2 string lists.
    and i need to put the values in the database ,so what i am doing is
    loop over stringlist1
    loop over stringlist2
    string1 ,string2 map to insertadapter
    exit loop (if success)
    its working fine but duplicate values are getting into database ,do u think exit has something to do with it.logically it seems to be right but idk its not working.
    thanks sri


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


  • 30.  RE: Flat file schema problem

    Posted Thu February 16, 2006 04:28 PM

    duplicate values getting into database?Debugging helps for looping problem.So step thru the loops and see the pipeline what values being passed to insertAdapter service and how is ur exit loop working.

    Basically you will need to step thru the flows for this kind of problem,since we dont have clear picture what you are doing in mapping,drop variables,loop iterations,pipeline behaviour etc…

    HTH,
    RMG


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


  • 31.  RE: Flat file schema problem

    Posted Thu February 16, 2006 09:21 PM

    check whether your are dropping the unnecessary values or not before entering the loop again and again.


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


  • 32.  RE: Flat file schema problem

    Posted Thu March 06, 2008 07:42 AM

    I seem to be having the same problem here. Any resolution tips for the same. Only difference is that my data looks like

    aawew=paramater1?
    sadadas=paramater2?

    nightfox.


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