# FF schema creation for a requirement

**URL:** <https://techcommunity.softwareag.com/t/ff-schema-creation-for-a-requirement/110269>\
**Category:** Forum\
**Tags:** EDI\
**Created:** [February 23, 2011, 7:09pm UTC](https://techcommunity.softwareag.com/t/ff-schema-creation-for-a-requirement/110269 "2011-02-23T19:09:26Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vekatesh\_Reddy](https://avatars.discourse-cdn.com/v4/letter/v/0ea827/32.png) [@Vekatesh\_Reddy](https://techcommunity.softwareag.com/u/Vekatesh_Reddy)\
**Post date:** [February 23, 2011, 7:09pm UTC](https://techcommunity.softwareag.com/t/ff-schema-creation-for-a-requirement/110269/1 "2011-02-23T19:09:26Z")

</div>

Hi All,

We have the below scenario.

We have a source FF (csv) which has to be parsed, converted to target structure and then convert it to FF string and send to the partner.

Till Parsing of the source file we have no issues.

Ths data contains emp details.

Suppose there are 10 emp records in the source file, then each record needs to be converted into the below FF format.

i.e each record must have 3 lines of FF data.

* * *

PTAAA50BBB11000000000CurDate\_H11NNN\*12HHH\*15KKK\*37LLL\*73PPP\*74JJJ_75UUU_

PTaaa50bbb13000000000CurDate\_H02ccc\*03ddd\*04eee_10fff_

PTAAA50BBB12000000000CurDate\_H05DDD\*48EEE_68FFF_

* * *

The fields highlighted in RED are variables which are read from the source file.

The Challenges we have are

1. 
  - at the end of each line (We are thinking to put a empty field at the end of the doc to attain this)

2. Schema for this requirement

3. If any of the variables is empty, then Leave out fields (this means the fieldnumber (2 digits) upto including the \*)

Can any one advise us the FF schema to attain this.

Thanks,  
Venkat

---

<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:** [February 23, 2011, 7:29pm UTC](https://techcommunity.softwareag.com/t/ff-schema-creation-for-a-requirement/110269/2 "2011-02-23T19:29:34Z")

</div>

Did you try using formatServices which will have to custom logic to empty fields what ever per requirement (then assign it in the FFSchema of the particular field you want to format) and also in the convertToString ( there are some inputs which let fills nulls when certain fields has empty values)

HTH,  
RMG

---

<div class="post-metadata">

**Author:** ![Senthilkumar\_G](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/senthilkumar_g/32/7349_2.png) [@Senthilkumar\_G](https://techcommunity.softwareag.com/u/Senthilkumar_G)\
**Post date:** [February 24, 2011, 12:33pm UTC](https://techcommunity.softwareag.com/t/ff-schema-creation-for-a-requirement/110269/3 "2011-02-24T12:33:13Z")

</div>

Venky,  
To understand your requirement still more better…

You have 10 employee records in the incoming data, and you want to create 3 records for each employee records in outgoing data (total 30 records) ?

PT - is it a record identifier for all 30 records?

-Senthil

---

<div class="post-metadata">

**Author:** ![Vekatesh\_Reddy](https://avatars.discourse-cdn.com/v4/letter/v/0ea827/32.png) [@Vekatesh\_Reddy](https://techcommunity.softwareag.com/u/Vekatesh_Reddy)\
**Post date:** [February 24, 2011, 2:42pm UTC](https://techcommunity.softwareag.com/t/ff-schema-creation-for-a-requirement/110269/4 "2011-02-24T14:42:24Z")

</div>

Hi Senthil/RMG,

Thanks for looking into my thread,.

PT is not a record identifier, but some constant which needs to be appended to the variable, say, ‘AAA’.

What you understood is correct. if there are 10 employee records, we need to generate 30 records in outgoing data.

The only delimiter we have in the data is \* (may be we have to decide how o use this. For now we are thinking to use \* as field delimiter and ‘/n’ as record delimiter.)

If you see, each record is ending again with a ‘_’ which is not the case in general. For this we thought of defining an extra field at the end and nullifying that so that the service convertToString will create a '_’ at the end of the record (emptyTrailingFields prop set to true)

We are working on, how best we can a single schema for this requirement (3 records) and reached out to the forum for the suggestions.

Also, another requirement given to us is,

* * *

## If any of the variables is empty, then Leave out fields (this means the fieldnumber (2 digits) upto including the \*)

We understand that suppose the record is as below

PTaaa50bbb13000000000CurDate\_H02ccc_03ddd_04eee_10fff_

Suppose if the field ‘ddd’ is empty then the record should look like this.

PTaaa50bbb13000000000CurDate\_H02ccc\*04eee_10fff_

i.e the constant ‘03’ along with the variable ‘ddd’ and \* needs to be left out.

If this possible to implement this in delimeter seperated FF?

cos, as far as I know, if filed ‘ddd’ is empty then the record looks like below.

PTaaa50bbb13000000000CurDate\_H02ccc\*\*04eee_10fff_

Could you please share your thoughts on this.

Thanks,  
Venky

---

<div class="post-metadata">

**Author:** ![Senthilkumar\_G](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/senthilkumar_g/32/7349_2.png) [@Senthilkumar\_G](https://techcommunity.softwareag.com/u/Senthilkumar_G)\
**Post date:** [February 24, 2011, 3:21pm UTC](https://techcommunity.softwareag.com/t/ff-schema-creation-for-a-requirement/110269/5 "2011-02-24T15:21:33Z")

</div>

> [@](#):
>
> as far as I know, if filed ‘ddd’ is empty then the record looks like below.
> 
> PTaaa50bbb13000000000CurDate\_H02ccc\*\*04eee_10fff_

your understanding is right… it will bring the data like \*\*… schema cannot skip the field… schema is a defined structure…

-Senthil

---

<div class="post-metadata">

**Author:** ![Vekatesh\_Reddy](https://avatars.discourse-cdn.com/v4/letter/v/0ea827/32.png) [@Vekatesh\_Reddy](https://techcommunity.softwareag.com/u/Vekatesh_Reddy)\
**Post date:** [February 24, 2011, 3:44pm UTC](https://techcommunity.softwareag.com/t/ff-schema-creation-for-a-requirement/110269/6 "2011-02-24T15:44:04Z")

</div>

Hi Senthil,

Thanks for the quick reply.

Any idea how best we can prepare the schema for the requirement. (3 sets of records for each record)

For now, we are considering to form “PTAAA50BBB11000000000CurDate\_H11NNN” as a string using multi concat  
and forming 3 records in the schema

RecordMain (occurring - infinity)  
Record 1,  
Filed 1  
|  
|  
Field 7

```
Record 2,
  Filed 1
   |
   |
  Field 3

Record 3,
  Filed 1
   |
   |
  Field 4

```

Any othr better idea than this 🙂

* * *

PTAAA50BBB11000000000CurDate\_H11NNN\*12HHH\*15KKK_37LLL_73PPP\*74JJJ_75UUU_

PTaaa50bbb13000000000CurDate\_H02ccc\*03ddd\*04eee_10fff_

PTAAA50BBB12000000000CurDate\_H05DDD\*48EEE_68FFF_

* * *

---

<div class="post-metadata">

**Author:** ![Vekatesh\_Reddy](https://avatars.discourse-cdn.com/v4/letter/v/0ea827/32.png) [@Vekatesh\_Reddy](https://techcommunity.softwareag.com/u/Vekatesh_Reddy)\
**Post date:** [March 2, 2011, 3:30pm UTC](https://techcommunity.softwareag.com/t/ff-schema-creation-for-a-requirement/110269/7 "2011-03-02T15:30:47Z")

</div>

Hi All,

If we need to form a FF like below

PTAAA50BBB11000000000CurDate H11NNN\*12HHH\*15KKK\*37LLL\*73PPP\*74JJJ_75UUU_

Can u suggest me how I can form an FF schema for this with out hard coding.

Also, If variable ‘HHH’ is empty the FF has to look as below

PTAAA50BBB11000000000CurDate H11NNN\*15KKK\*37LLL\*73PPP\*74JJJ_75UUU_

In the sample FF shown above, the variables are shown in RED ans the remaining are constants.

Thanks,  
Venkat

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 3:06pm UTC](https://techcommunity.softwareag.com/t/ff-schema-creation-for-a-requirement/110269/8 "2021-04-02T15:06:05Z")

</div>


