Loading a file to is from a folder

Can any one help me out of this?

I need to load a text file from a location on my system and load it into the IS. Then i should process it and then enter the records into the database.

I am using Wm 6.1

the structure of the text file is as follows,

empname,empid,joindate,dob,salary,designation (this is record one)
empname,empid,joindate,dob,salary,designation (this is record two)
like this there are n records i need to insert all of them from this text file to the database…
Can any one help??

Hi Raju,

you can do it using flat files.

To get the file from your system to IS.You can use built in service getFile which is in wmPublic package may be under file folder.

It takes input
1.Filename :- you give the complete path where it is stored.
2.LoadAs :- in format you want to read the file i.e Stream or Bytes it depends on your requirement.

It gives output
1.body(It contains content of u r file)

after that you can pass the Body(content of file)

to the inbuilt flatfile service convertTovalues, which u can find it in wmFlatfile pakage.

it takes input
1.ffData :- file content interms of Bytes or Stream
2.ffSchema :- provide the entire name space of your Schema where it is stored.(I think uhave idea about name space)

it gives the output
1.ffvalues :- this is a documet it contains document list each document in this list represent each record of your file

after u get each record you can store them in database using your appropriate adapter service

For more information about creating flatfile Dictionary and flatFile Schema, storing ffvalues in to database.

Refer webmethods Flatfile Schema Developers Guide under webmethods documentation

If u have any doubts u can post immediately regarding this


Thank you Rajesh,
I do have some knowledge about the namespaces.
but the interesting thing in your reply has me going no where…
You said
to give the entire path of my schema.what if i am loading from a directory say d:\test rather than a package how can i read it, i mean how can i give the total path of the file to the flatFileSchema.converToValues.

Plz do explain if my understanding of your solutions is wrong.
Thank you

Hi Raju,

I am talking about namespace for the schema name not for the file name.Please read the solution carefully once and try to understand the things.

I gave brief solution to u r problem no one give that much brief solution.

Regarding name space means
if your flatfile schema is in package Main and folder sub and with the name mySchema.

u have to mention like this sub:mySchema

again post u r doubts


Hi Raju,

To read the file u have to use inBuilt service getFile.Reading file is nowhere related to Flatfile.convertTovalues

Hi Raju,

Read the message which i sent to u from wmUsers in u r wmusers Inbox ther i mentioned my mobile number. If u don't have any issuies give your mobile number


Thank you rajesh,
Presently i am in Chennai
Thanks for your concern.
My mobile no is 09884034755.

The wM documentation covers how to do these things. Do you have any questions about the docs?

how to give the record identifier and the CSV. When i have created the schema and dictionary that one reads any file rather than the specified ones. As i am a starter in this arena i dont know much about handling those things. More over if i specify CRLF as the delimiter it also appears in the text thats been read by the flat file schema. And it is my first thing in Webmethods so i think an example will suffice with explanation.
Thanks in Advance.

Hi raju,

Try like this create a record with any name in flatfile dictionary and select it as default record in your schema

Try like this i think it work’s