# Flat Files

**URL:** <https://techcommunity.softwareag.com/t/flat-files/108456>\
**Category:** Forum\
**Tags:** EDI\
**Created:** [March 10, 2005, 5:40pm UTC](https://techcommunity.softwareag.com/t/flat-files/108456 "2005-03-10T17:40:01Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![parani](https://avatars.discourse-cdn.com/v4/letter/p/f1d935/32.png) [@parani](https://techcommunity.softwareag.com/u/parani)\
**Post date:** [March 10, 2005, 5:40pm UTC](https://techcommunity.softwareag.com/t/flat-files/108456/1 "2005-03-10T17:40:01Z")

</div>

Hi,  
I have created a flat file schema with record length of about 80.  
I mapped the some string with the fields defined in the schema structure.When I tried to convert the schema document into string  
using pub.flatFile:convertToString i got the error like this…  
“com.wm.ff.parse.StorageException: [FFP.0015.0005] Specified an invalid schema `scenario1:scenarioFlatFixedSchemaDT`, is not a Flat File Schema” what would be the problem?  
please help me…

---

<div class="post-metadata">

**Author:** ![Guest](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/guest/32/75_2.png) [@Guest](https://techcommunity.softwareag.com/u/Guest)\
**Post date:** [March 10, 2005, 5:48pm UTC](https://techcommunity.softwareag.com/t/flat-files/108456/2 "2005-03-10T17:48:29Z")

</div>

parani ,

```
    i think u have created flat file schema right , have u tested that schema in creation schema level itself . if there it works then it works even in flows .. try this and give me feed back.

```

---

<div class="post-metadata">

**Author:** ![parani](https://avatars.discourse-cdn.com/v4/letter/p/f1d935/32.png) [@parani](https://techcommunity.softwareag.com/u/parani)\
**Post date:** [March 10, 2005, 6:03pm UTC](https://techcommunity.softwareag.com/t/flat-files/108456/3 "2005-03-10T18:03:53Z")

</div>

ya i tried that too muneer  
there is no problem with the mapping of string field with the schema fields,i think the exception is due to this service pub.flatFile:convertToString ,how could i get rid out of it…

---

<div class="post-metadata">

**Author:** ![Guest](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/guest/32/75_2.png) [@Guest](https://techcommunity.softwareag.com/u/Guest)\
**Post date:** [March 10, 2005, 6:13pm UTC](https://techcommunity.softwareag.com/t/flat-files/108456/4 "2005-03-10T18:13:24Z")

</div>

give me clear cut information about the process , i mean to say why u have created ffile and why u want to convert to string …

```
   i tell u one thing what ever the data u have in ffile are consider as string then why u need to converttoString again..

```

---

<div class="post-metadata">

**Author:** ![Guest](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/guest/32/75_2.png) [@Guest](https://techcommunity.softwareag.com/u/Guest)\
**Post date:** [March 10, 2005, 6:16pm UTC](https://techcommunity.softwareag.com/t/flat-files/108456/5 "2005-03-10T18:16:29Z")

</div>

istead of giving schema in service in ur giving dt values …  
if that currect fine then we will see…

---

<div class="post-metadata">

**Author:** ![gupta\_r.17495](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@gupta\_r.17495](https://techcommunity.softwareag.com/u/gupta_r.17495)\
**Post date:** [March 10, 2005, 8:09pm UTC](https://techcommunity.softwareag.com/t/flat-files/108456/6 "2005-03-10T20:09:05Z")

</div>

Parani,

You should pass the FF Schema not the DT(flatfileDocument)in the convertToString.since i have noticed you are using scenarioFlatFixedSchemaDT.Please make sure you are doing right.

HTH,  
RMG.

---

<div class="post-metadata">

**Author:** ![parani](https://avatars.discourse-cdn.com/v4/letter/p/f1d935/32.png) [@parani](https://techcommunity.softwareag.com/u/parani)\
**Post date:** [March 11, 2005, 9:32am UTC](https://techcommunity.softwareag.com/t/flat-files/108456/7 "2005-03-11T09:32:25Z")

</div>

hi all,  
once again i clearly explain my scenario.  
I retrived some records from the Oracle table.Each record consists of eno(number),ename(string),sal(number) and doj(date) fields.I want to convert this records into a single string.  
for example record 1: 1 dani 3000 11-03-2005  
record 2: 2 sam 4000 11-03-2005  
i want the result to be _dani_3000_11-03-2005_sam_4000_11-03-2005\*  
that is the reason why i chose flat file concepts.  
and i am working with that one got it.  
if any one faced this kind of problem let me know ur experience  
thanks rmg & muneer

---

<div class="post-metadata">

**Author:** ![Guest](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/guest/32/75_2.png) [@Guest](https://techcommunity.softwareag.com/u/Guest)\
**Post date:** [April 8, 2005, 11:13am UTC](https://techcommunity.softwareag.com/t/flat-files/108456/8 "2005-04-08T11:13:12Z")

</div>

I got error message such as "com.wm.ff.parse.StorageException: [FFP.0015.0005] Specified an invalid schema `EDIFFSchema.UNEDIFACT.V96A:TPRICAT`, is not a Flat File Schema "  
during execuing wm.b2b.edi:convertToString service after the validation check of TPRICAT. What’s wrong?  
Thank your help.

---

<div class="post-metadata">

**Author:** ![Guest](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/guest/32/75_2.png) [@Guest](https://techcommunity.softwareag.com/u/Guest)\
**Post date:** [April 21, 2005, 6:09pm UTC](https://techcommunity.softwareag.com/t/flat-files/108456/9 "2005-04-21T18:09:45Z")

</div>

Hi All,

I’m facing some problem in getting the records form Oracle database to flatfile.  
I have created a ffSchema and in that i have specified the delimeter and created record definition as well as field definition.  
and iam using the services  
select service to select the tables,  
convertToString,  
but the main problem is iam getting only RECORD DEFINITION, i’am not getting field definition in the output.  
My point is that flatfileschema is sufficient or shall i create a flatfile dictionary.  
if any one has done the scenerio plz guide me.

thanks,

---

<div class="post-metadata">

**Author:** ![rkk](https://avatars.discourse-cdn.com/v4/letter/r/dbc845/32.png) [@rkk](https://techcommunity.softwareag.com/u/rkk)\
**Post date:** [April 22, 2005, 3:08pm UTC](https://techcommunity.softwareag.com/t/flat-files/108456/10 "2005-04-22T15:08:33Z")

</div>

Hi All,

I’m working on webMethods6.1 using flatfile schema i retrieved the records from the oracle database and written in a flatfile, but the field which is a date is missing in the flatfile.  
plz guide me if anyone knows the problem.

Thanks,

---

<div class="post-metadata">

**Author:** ![kiran\_developer](https://avatars.discourse-cdn.com/v4/letter/k/c2a13f/32.png) [@kiran\_developer](https://techcommunity.softwareag.com/u/kiran_developer)\
**Post date:** [April 27, 2005, 10:22pm UTC](https://techcommunity.softwareag.com/t/flat-files/108456/11 "2005-04-27T22:22:18Z")

</div>

hi  
i need to create a flat file schema ,can any one please guide me in this regard,after that i need to read records from the flat file  
the flat file is like  
1kiran1000  
2ramus2000  
3rajas3000

the flat file is like a fixed length of 10 and it has three records

---

<div class="post-metadata">

**Author:** ![gupta\_r.17495](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@gupta\_r.17495](https://techcommunity.softwareag.com/u/gupta_r.17495)\
**Post date:** [April 28, 2005, 12:25am UTC](https://techcommunity.softwareag.com/t/flat-files/108456/12 "2005-04-28T00:25:40Z")

</div>

Kiran,

Create your record in the Dictionary.  
Then in the Schema set it as the default record.  
See Marks’ response in this post [url=“[wmusers.com](http://www.wmusers.com/wmusers/messages/117/12282.shtml)”][wmusers.com](http://www.wmusers.com/wmusers/messages/117/12282.shtml%5B/url%5D).

HTH,  
RMG

---

<div class="post-metadata">

**Author:** ![Guest](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/guest/32/75_2.png) [@Guest](https://techcommunity.softwareag.com/u/Guest)\
**Post date:** [May 18, 2005, 6:33pm UTC](https://techcommunity.softwareag.com/t/flat-files/108456/13 "2005-05-18T18:33:24Z")

</div>

HI  
i have a problem in creating a schema for a flat file of variable length, can any one help me in this regard…  
i am giving the sample format of the flatfile ,so have a look at let me know how to write the schema:

Record 1 12kiran25abc

field 1 is 12 (length of the record), field 2 is kiran (name of the employee) field 3 is abc(dept)

Record 2 25rajeshflatno:45,hyddefg  
field 1 is 25(length of the record) field 2 is rajesh(name of the employee) field 3 is flatno:45,hyd (address) and field 4 is defg (dept)

so if these are the two records in a flat file then how to write a flat file schema

i will be great ful for your response

thanks  
praveen

---

<div class="post-metadata">

**Author:** ![Guest](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/guest/32/75_2.png) [@Guest](https://techcommunity.softwareag.com/u/Guest)\
**Post date:** [May 23, 2005, 1:48pm UTC](https://techcommunity.softwareag.com/t/flat-files/108456/14 "2005-05-23T13:48:19Z")

</div>

Hi ,  
i have a small doubt , i am placing it in front of you people , please help me in this regard.How to and when to use the option variable length in the flat file schema structure tab.when using this option how should the flatfile look like ,can any one give me an example of the flatfile for which we have to use this option and how to use that option

I will be greatful for you response

thanks  
praveen

---

<div class="post-metadata">

**Author:** ![Guest](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/guest/32/75_2.png) [@Guest](https://techcommunity.softwareag.com/u/Guest)\
**Post date:** [May 27, 2005, 4:47pm UTC](https://techcommunity.softwareag.com/t/flat-files/108456/15 "2005-05-27T16:47:56Z")

</div>

We have a schema whose properties are as specified below

Flat file Definition:

Record Parser: Delimiter  
Record Delimiter: newline  
Record Identifier: Starts at Position “0”.

Fields in the record are defined as fixed length, i.e. their Extractor property is set as

“Fixed Length”. We have certain fields which has subfields in it. Hence we have declared

those fields as Composite. The extractor property of these subfields is also set as "Fixed

Length".

But the extractor property of the Composite field which contains the subfields declared

under it has no option to set Extractor has “Fixed Length”. The only option available in the

Extractor property of this composite field is “Nth Field”.

When we run the schema setting the value in “Nth field” of the composite field, it is not

recognizing the composite field.

Please clarify how to use the composite fields for the fixed length fields.

---

<div class="post-metadata">

**Author:** ![karupuv](https://avatars.discourse-cdn.com/v4/letter/k/57b2e6/32.png) [@karupuv](https://techcommunity.softwareag.com/u/karupuv)\
**Post date:** [June 14, 2005, 5:55pm UTC](https://techcommunity.softwareag.com/t/flat-files/108456/16 "2005-06-14T17:55:41Z")

</div>

Hi,  
How can we assign the values for composite fields in Flat file schema.  
how can we receive the Flat file from the FTP site.i.e to get the flat file which was sent by FTP.  
Pls help me.  
Regards,  
viji.

---

<div class="post-metadata">

**Author:** ![gupta\_r.17495](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@gupta\_r.17495](https://techcommunity.softwareag.com/u/gupta_r.17495)\
**Post date:** [June 14, 2005, 6:46pm UTC](https://techcommunity.softwareag.com/t/flat-files/108456/17 "2005-06-14T18:46:19Z")

</div>

Vijaya,

Assign the composite fields in the Dictionary and reference those in the schema and if you put the flatfile.txt from ftp site or filepoller the webMethods receive service input should be defined as ffdata (stream object)then convert it using streamTobytes and bytesToString for parsing the filefile.

Please search in this site for more information on transporting flatfiles via ftp site or filepolling mechanism.

HTH,  
RMG

---

<div class="post-metadata">

**Author:** ![Serge\_Aube1](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@Serge\_Aube1](https://techcommunity.softwareag.com/u/Serge_Aube1)\
**Post date:** [June 28, 2005, 9:19pm UTC](https://techcommunity.softwareag.com/t/flat-files/108456/18 "2005-06-28T21:19:10Z")

</div>

Hi,

I have a flat file that I need to transform into an XML Structure. The file is an invoice. For an invoice I may have multiple pages. for each page I may have multiple record type. Until their I’m fine.

See in attachement the actual Flat file

![](http://www.wmusers.com/wmusers/icons/mime_txt.gif)Flat File  
[\Caqbmonta-ss-23\d\WMAlpha\Out\inv\_12805622.ds](http://www.wmusers.com/wmusers/messages/117/__Caqbmonta-ss-23_d_WMAlpha_Out_inv_12805622-50275.txt) (1.6 k)

```
		 and a screen shot of the Flat file record [img]http://www.wmusers.com/wmusers/messages/117/50276.jpg[/img] 

```

The first 3 caracters are the record type…  
The logical structure of the file is:  
One ENT record per file.  
At least one PAG per file.  
In eache PAG you may find any PRO or COM record in any order and they cand be mixed up, the last record of a PAG record is a FOO record.

My issue is that anything in a page (PAG) HAVE TO keep the same order in the XML structure as in the flat file. Can you tell me how I should do the mapping into a XML format to keep the right order?

Thanks

---

<div class="post-metadata">

**Author:** ![gupta\_r.17495](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@gupta\_r.17495](https://techcommunity.softwareag.com/u/gupta_r.17495)\
**Post date:** [June 28, 2005, 9:29pm UTC](https://techcommunity.softwareag.com/t/flat-files/108456/19 "2005-06-28T21:29:39Z")

</div>

Serge,

How is your target XML sturcture looks like?

My issue is that anything in a page (PAG) HAVE TO keep the same order in the XML structure as in the flat file. Can you tell me how I should do the mapping into a XML format to keep the right order?

This depends on the XML structure how the PAG mapping structures build.

HTH,  
RMG

---

<div class="post-metadata">

**Author:** ![Serge\_Aube1](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@Serge\_Aube1](https://techcommunity.softwareag.com/u/Serge_Aube1)\
**Post date:** [June 28, 2005, 10:24pm UTC](https://techcommunity.softwareag.com/t/flat-files/108456/20 "2005-06-28T22:24:34Z")

</div>

RMG,

The XML Structure looks like this:

![](http://www.wmusers.com/wmusers/messages/117/50279.jpg)

All the tags in the pages tag are optional!

Thanks

[Next page](https://techcommunity.softwareag.com/t/flat-files/108456.md?page=2)
