# Problem With Conditional Syntax In General Link Properties

**URL:** <https://techcommunity.softwareag.com/t/problem-with-conditional-syntax-in-general-link-properties/107402>\
**Category:** Forum\
**Tags:** EDI\
**Created:** [November 25, 2004, 1:42am UTC](https://techcommunity.softwareag.com/t/problem-with-conditional-syntax-in-general-link-properties/107402 "2004-11-25T01:42:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![duffymo](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@duffymo](https://techcommunity.softwareag.com/u/duffymo)\
**Post date:** [November 25, 2004, 1:42am UTC](https://techcommunity.softwareag.com/t/problem-with-conditional-syntax-in-general-link-properties/107402/1 "2004-11-25T01:42:24Z")

</div>

Sorry to bother the forum community again, but I seem to have missed another fundamental point regarding conditional syntax in general link properties.

I want to map an input value with path /Specialized850/ST/PO1/SLN/PID/PID05, which is of type String. I want to map it to a custom flat file schema.

My first pass at doing this the straightforward way resulted in a NullPointerException. When I look at my data, I see the following two records in the input EDI:

PID~F~~SHEAR TIE\*  
PID~F~~\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* COMPLETE PER DRAWING \*\*\*

The first PID record maps just fine to “SHEAR TIE”. The problem with the second one is obvious: those stupid stars that make up part of the comment mess things up, because ‘\*’ is the end of record character here. (The string ends up as “unDefData” when wM parses it.)

I thought I could get past this by putting a check into the link properties, like this:

!%Specialized850/ST/PO1/SLN/PID/PID05%

But this doesn’t appear to be correct. When I leave off the leading and trailing ‘%’ char, Developer complains: “No closing delimiter found”. Adding the ‘%’ chars fixes that problem, but the check isn’t saving me.

What is the correct syntax? What is the correct idiom for avoiding this problem?

Thanks - %

---

<div class="post-metadata">

**Author:** ![Yemi\_Bedu](https://avatars.discourse-cdn.com/v4/letter/y/7993a0/32.png) [@Yemi\_Bedu](https://techcommunity.softwareag.com/u/Yemi_Bedu)\
**Post date:** [November 25, 2004, 2:03am UTC](https://techcommunity.softwareag.com/t/problem-with-conditional-syntax-in-general-link-properties/107402/2 "2004-11-25T02:03:32Z")

</div>

Hello,  
If you use automatic translation of the EDI document, then you have to tell the sender to change the delimiters to characters not found elsewhere in the document like (\_ or ^).  
If you are manually translating, then you could pass the data through a “polishing” routine to remove possibly invalid chars. Something like removing mulitple occurances of an end-of-record character. Another would be removing an end-of-record if the following ID is more than 3 chars, and this is not a perfect routine but may buy you some time. I use such a service to handle non-printable characters (like linefeed) being used as delimiters.

Good day.

---

<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:04pm UTC](https://techcommunity.softwareag.com/t/problem-with-conditional-syntax-in-general-link-properties/107402/3 "2021-04-02T15:04:47Z")

</div>


