Webmethods - FlatFiles
Webmethods - FlatFiles
IP și
programul user agent sunt trimise către Google împreună cu valorile privind performanța și securitatea pentru AFLAȚI MAI MULTE OK
asigurarea calității serviciului, generarea statisticilor de utilizare, detectarea și remedierea abuzurilor.
webMethods
This Blog content is copied from various blogs and websites... i am created this for an easy use... Don't
Mind...
Titles
FlatFiles ▼
▼ 2017 (1)
▼
▼ February (1)
What is FlatFile? FlatFiles
A simple text file having data in text format(non formatted text) is called flatfile , flatfiles are used since the advent of computers in business and still they
are used widely. ►
► 2016 (6)
►
► 2015 (92)
Two Types of flatfiles we can use in webMethods,
1. With No record identifier.
2. With record identifier. About Me
Crazyyyy
1.With No record identifier
View my complete profile
How many different types of flatfiles are there based on record parsing methods?
Flatfiles can be broadly classified into three different types based on the type of their record parsing methods , these three types are :-
1)Delimited FlatFile
2)Fixed length FlatFile
3)Variable length FlatFile
Again Flatfiles can be divided into two different types based on the type of field extractors , these are :-
1)Fixed length
2)Nth field
In Fixed length extractor type each field is defined by its starting index and end index , in this case the length of the field will be constant for every
record.
In Nth field extractor the field is extracted by the position of the field , such as 0,1,2 . the position starts from 0. This is the most widely used extractor
type for the flatfiles because it does not limit the size of the field as in the case of Fixed length extractor.
Delimited FlatFile :- In these kind of FlatFiles , the records are separated by some kind of delimiters such as newline,pipe(|),tab etc. The field extractor
can be any of the two i.e fixed length or Nth field extractor.
Now we can see Delimited FlatFile with the following screen shots,
Before going to create flatfile just look out the definitions of FF dictionary and FF Schema
Flatfile dictionary:- Flatfile dictionaries are created as namespace elements in the Integration Server and contain definitions of records, composites,
and fields. When you change a definition in a flatfile dictionary that is referenced in multiple flatfile schemas, the element definition is updated
automatically in all of the flatfile schemas.
Flatfile Schema:- To communicate using flatfiles, we have to create a flatfile schema that contains a particular flatfile’s structural information, including
how to identify records and separate those records into fields.
Right click on folder select new and select Flat File Dictionary
Now create a Field definition as per the text file in my assumption i created like this
give name of the first field in my case that is EmpNo like wise create EmpName and salary
we have a composite fields in our text file i.e., Address and it has 2 sub fields(area and city)
So we have to create composite field definition and sub fields for this
Give Extractor type as Nth field because here there is no fixed positions in the text file and give names as according to text file data in my case area:city
Now create Record definition meaning you have to give one name to the text file data like in database table name
And then click on EmployeeDetails then click on new we can see below screen
Already we created the field definition so click on field reference and click next
Select the field name which already created in field definition, those will appear in the screen only when you save the dictionary and click next
Give Extractor type as Nth field and positions are starts from '0' and in my case position '0' is EmpNo and '1' is EmpName and so on
Like field reference select composite reference also which already created in composite definition and click next.
give position (continue positions from field reference already i gave 0,1,2 so now giving 3) and click finish. so the flatfile dictionary is created
successfully.
right click on flatfile folder and the click on new flatfile schema and give name then click finish
Select delimiter(most of the cases we use delimiters only) and give the fields as per text document
Record :- Record is seperated by ';' type ';' otherwise if you don't give any record ended then simply give new line.
Field:- Field is ended with ','
subfield:- is given as ':'
Quoted Release Character :- Quoted release character is used to keep the section of a flat file as it is mentioned in the flat file , any delimiters
included within the quoted release character will not be counted.
And select dictionary then click on next and then finish and save.
Now create one flow service and invoke wmpublic----> pub ---> file ----> getfile service
then goto pipeline double click on filename and give fullpath of the file location including name as mentioned above screen shot.
invoke one more service to convert flatfile to document it is located in wmFlatFile ---> pub---->flatFile---->convertToValues service
Then go to pipe line and double click on ffSchema and give full location of ffschema which we created in designer. for eg:
Practice.flatfiles:empFFSchema then click ok and then ok.
Posted by Crazyyyy
9 comments:
Replies
Reply
Replies
Reply
Great article. Could you please assist me in converting EDI 270 file to fixed length delimited flat file.
Reply
Reply
Charan Raj@Latest Trendz Courses. Simple theme. Theme images by gaffera. Powered by Blogger.