Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EXTRACT FUNCTION

Status
Not open for further replies.

jhakas29

Programmer
Feb 17, 2006
1
US
f_837I_ROUTING(EXTRACT(Subscriber:provider HL Loop:.:EDI_837I,1=1),PF_ROUTING)

what is meant by 1=1 ??
 
Who wrote the rule? You seem to be choosing (extracting) the Subscriber where 1=1. Is that the whole rule? Should start with an = sign.



BocaBurger
<===========================||////////////////|0
The pen is mightier than the sword, but the sword hurts more!
 
1 = 1 ist just an alternative way of writing (logial) true, i.e. there is no real condition to be met for the EXTRACT, thus returning the complete series.

Maybe there was a "real" condition in the past that became superfluous and the developer (carefully) decided to modify just the condition instead of taking out the whole EXTRACT statement.
 
And carefully decided not to document it. :)



BocaBurger
<===========================||////////////////|0
The pen is mightier than the sword, but the sword hurts more!
 
Newbie question - typically how to store comments for mercator? Wrire them directly in the type trees and maps?
 
Don't know what you mean by "store comments for mercator". You can include comments in rules in a C/C++ fashion, i.e. either single line comments using

// everything in this line following the two slashes is a comment

or multi line comments using

/* everything
between the slash/asterisk
pair is a comment */
 
/*comment */ is the prefered method:

/*This rule intentionally equals none*/
=NONE



BocaBurger
<===========================||////////////////|0
The pen is mightier than the sword, but the sword hurts more!
 
Well the documentation I can access doesn't tell anything about the single line comments but just displays the other (6.7.1). Okay, that might also be a definition of "prefered" ;-)
 
From the 6.7.1 Map Designer manual

Comments in Map Rules
You can add inline comments to map rules. Comments do not affect how map
rules are evaluated. A comment may appear anywhere in a rule, as long as it does
not separate object names.
A comment is identified with the start characters /*. While the end characters */
can be present, they are not required. If the end characters are not present,
everything up to the end of that rule is the comment.

The following map rule has two comments, which are indicated by blue text:
= EXTRACT (Record:Customers /*Extract the Records */,
State Field:.:Customers = "FL" /* Get only the customers in
Florida */ )
 
Personally, I prefer the comments before the rule. Embedding them in the rule can make it difficult to read.



BocaBurger
<===========================||////////////////|0
The pen is mightier than the sword, but the sword hurts more!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top