Discussion:
POS Function Assistance
(too old to reply)
unknown
2009-01-23 15:43:20 UTC
Permalink
I am looking for recommendations on the use of the POS
function in InfoMaker. I have the following expression
which works fine if there is only one occurrence of a string
found. If multiple occurences are found in the
co_review_comments field the line 'End of Interqual -
Interqual Criteria.' is being displayed. I do not want this
to occur. Any recommendations would be greatly appreciated.

MID(co_review_comments, 1, Pos(co_review_comments,'InterQual
- InterQual Criteria:',1) -1) + ' ' +
MID(co_review_comments,Pos(co_review_comments,'End of
InterQual - InterQual
Criteria.',1)-1,len(co_review_comments))

The result below is when multiple occurrences of the string
are found within the co_review_comments field. The multiple
notes are correct, but the text 'Interqual....' should not
display:

01/19/2009 13:00 Smith, Jane
No need to transfer.

01/18/2009 14:00 Jones, Mary
Auth# 12345

End of Interqual - Interqual Criteria.
unknown
2009-01-26 13:31:51 UTC
Permalink
Hi Pat,

I'm not sure what you want the result to be exactly. Guessing this is
what you are after:

01/19/2009 13:00 Smith, Jane
No need to transfer.

01/18/2009 14:00 Jones, Mary
Auth# 12345

End of Interqual

you may change the expression as follows:

MID(co_review_comments, 1, Pos(co_review_comments,'InterQual
- InterQual Criteria:',1) -1) + ' ' +
MID(co_review_comments,Pos(co_review_comments,'End of
InterQual - InterQual
Criteria.',1)-1, 16)

HTH

Chris Werner
f+s software gmbh
Post by unknown
I am looking for recommendations on the use of the POS
function in InfoMaker. I have the following expression
which works fine if there is only one occurrence of a string
found. If multiple occurences are found in the
co_review_comments field the line 'End of Interqual -
Interqual Criteria.' is being displayed. I do not want this
to occur. Any recommendations would be greatly appreciated.
MID(co_review_comments, 1, Pos(co_review_comments,'InterQual
- InterQual Criteria:',1) -1) + ' ' +
MID(co_review_comments,Pos(co_review_comments,'End of
InterQual - InterQual
Criteria.',1)-1,len(co_review_comments))
The result below is when multiple occurrences of the string
are found within the co_review_comments field. The multiple
notes are correct, but the text 'Interqual....' should not
01/19/2009 13:00 Smith, Jane
No need to transfer.
01/18/2009 14:00 Jones, Mary
Auth# 12345
End of Interqual - Interqual Criteria.
unknown
2009-01-26 14:44:54 UTC
Permalink
Hi Chris,

Thank you for your response. The end result I am looking
for does not include the final line 'End of Interqual' The
text should appear as displayed below. When I modified the
expression to include your suggestion, the line of text was
removed, 'End of Interqual' but the first line of text from
the note 'No need to transfer' was also truncated. Any
other suggestions would be greatly appreciated. Thank you.

01/19/2009 13:00 Smith, Jane
No need to transfer.

01/18/2009 14:00 Jones, Mary
Auth# 12345
Post by unknown
Hi Pat,
I'm not sure what you want the result to be exactly.
01/19/2009 13:00 Smith, Jane
No need to transfer.
01/18/2009 14:00 Jones, Mary
Auth# 12345
End of Interqual
MID(co_review_comments, 1, Pos(co_review_comments
,'InterQual - InterQual Criteria:',1) -1) + ' ' +
MID(co_review_comments,Pos(co_review_comments,'End of
InterQual - InterQual
Criteria.',1)-1, 16)
HTH
Chris Werner
f+s software gmbh
for recommendations on the use of the POS function in
InfoMaker. I have the following expression which works
fine if there is only one occurrence of a string found.
If multiple occurences are found in the
co_review_comments field the line 'End of Interqual -
Interqual Criteria.' is being displayed. I do not want
this to occur. Any recommendations would be greatly
appreciated. >
MID(co_review_comments, 1, Pos(co_review_comments
,'InterQual - InterQual Criteria:',1) -1) + ' ' +
MID(co_review_comments,Pos(co_review_comments,'End of
InterQual - InterQual
Criteria.',1)-1,len(co_review_comments))
The result below is when multiple occurrences of the
string are found within the co_review_comments field.
The multiple notes are correct, but the text
01/19/2009 13:00 Smith, Jane
No need to transfer.
01/18/2009 14:00 Jones, Mary
Auth# 12345
End of Interqual - Interqual Criteria.
unknown
2009-01-26 14:54:20 UTC
Permalink
Hi Pat,

it would be interesting to know what exactly the
column 'co_review_comments' contains.

Chris Werner
f+s software gmbh
Post by unknown
Hi Chris,
Thank you for your response. The end result I am looking
for does not include the final line 'End of Interqual' The
text should appear as displayed below. When I modified the
expression to include your suggestion, the line of text was
removed, 'End of Interqual' but the first line of text from
the note 'No need to transfer' was also truncated. Any
other suggestions would be greatly appreciated. Thank you.
01/19/2009 13:00 Smith, Jane
No need to transfer.
01/18/2009 14:00 Jones, Mary
Auth# 12345
Post by unknown
Hi Pat,
I'm not sure what you want the result to be exactly.
01/19/2009 13:00 Smith, Jane
No need to transfer.
01/18/2009 14:00 Jones, Mary
Auth# 12345
End of Interqual
MID(co_review_comments, 1, Pos(co_review_comments
,'InterQual - InterQual Criteria:',1) -1) + ' ' +
MID(co_review_comments,Pos(co_review_comments,'End of
InterQual - InterQual
Criteria.',1)-1, 16)
HTH
Chris Werner
f+s software gmbh
for recommendations on the use of the POS function in
InfoMaker. I have the following expression which works
fine if there is only one occurrence of a string found.
If multiple occurences are found in the
co_review_comments field the line 'End of Interqual -
Interqual Criteria.' is being displayed. I do not want
this to occur. Any recommendations would be greatly
appreciated. >
MID(co_review_comments, 1, Pos(co_review_comments
,'InterQual - InterQual Criteria:',1) -1) + ' ' +
MID(co_review_comments,Pos(co_review_comments,'End of
InterQual - InterQual
Criteria.',1)-1,len(co_review_comments))
The result below is when multiple occurrences of the
string are found within the co_review_comments field.
The multiple notes are correct, but the text
01/19/2009 13:00 Smith, Jane
No need to transfer.
01/18/2009 14:00 Jones, Mary
Auth# 12345
End of Interqual - Interqual Criteria.
Terry Dykstra [TeamSybase]
2009-01-26 15:44:39 UTC
Permalink
So of that string occurs multiple times, what do you want to see? I'm
confused.
--
Terry Dykstra (TeamSybase)
http://powerbuilder.codeXchange.sybase.com/
http://casexpress.sybase.com
product enhancement requests:
http://my.isug.com/cgi-bin/1/c/submit_enhancement
Post by unknown
Hi Chris,
The column co_review_comments is a computed field which
consists of a total of 20 - 2000 character comments fields.
Please see attached. The problem is that there can be
multiple occurrences within co_review_comments of the string
'End of Interqual'. I believe that the POS function is for
a single occurrence, not multiple???
Post by unknown
Hi Pat,
it would be interesting to know what exactly the
column 'co_review_comments' contains.
Chris Werner
f+s software gmbh
Post by unknown
Thank you for your response. The end result I am
looking for does not include the final line 'End of
Interqual' The text should appear as displayed below.
When I modified the expression to include your
suggestion, the line of text was removed, 'End of
Interqual' but the first line of text from the note 'No
need to transfer' was also truncated. Any other
suggestions would be greatly appreciated. Thank you. >
Post by unknown
01/19/2009 13:00 Smith, Jane
No need to transfer.
01/18/2009 14:00 Jones, Mary
Auth# 12345
Post by unknown
Hi Pat,
I'm not sure what you want the result to be exactly.
01/19/2009 13:00 Smith, Jane
No need to transfer.
01/18/2009 14:00 Jones, Mary
Auth# 12345
End of Interqual
MID(co_review_comments, 1, Pos(co_review_comments
,'InterQual - InterQual Criteria:',1) -1) + ' ' +
MID(co_review_comments,Pos(co_review_comments,'End of
InterQual - InterQual
Criteria.',1)-1, 16)
HTH
Chris Werner
f+s software gmbh
looking >> > for recommendations on the use of the POS
function in >> > InfoMaker. I have the following
expression which works >> > fine if there is only one
occurrence of a string found. >> > If multiple occurences
are found in the >> > co_review_comments field the line
'End of Interqual - >> Interqual Criteria.' is being
displayed. I do not want >> > this to occur. Any
recommendations would be greatly >> appreciated. >
Post by unknown
Post by unknown
Post by unknown
MID(co_review_comments, 1, Pos(co_review_comments
,'InterQual - InterQual Criteria:',1) -1) + ' ' +
MID(co_review_comments,Pos(co_review_comments,'End of
InterQual - InterQual
Criteria.',1)-1,len(co_review_comments))
The result below is when multiple occurrences of the
string are found within the co_review_comments field.
The multiple notes are correct, but the text
01/19/2009 13:00 Smith, Jane
No need to transfer.
01/18/2009 14:00 Jones, Mary
Auth# 12345
End of Interqual - Interqual Criteria.
unknown
2009-01-26 15:50:31 UTC
Permalink
I just want to see notes entered by staff. I do not want to
see occurrences of 'InterQual - InterQual Criteria:' or
'End
InterQual - InterQual Criteria.' which is automatically
generated by the application and is included within the
co_review_comments field. I am basically trying to strip
out the Interqual text mentioned above and display the notes
entered by staff. I should only see what is mentioned
below. Thank you.

01/19/2009 13:00 Smith, Jane
No need to transfer.

01/18/2009 14:00 Jones, Mary
Auth# 12345
Post by Terry Dykstra [TeamSybase]
So of that string occurs multiple times, what do you want
to see? I'm confused.
--
Terry Dykstra (TeamSybase)
http://powerbuilder.codeXchange.sybase.com/
http://casexpress.sybase.com
http://my.isug.com/cgi-bin/1/c/submit_enhancement
Post by unknown
The column co_review_comments is a computed field which
consists of a total of 20 - 2000 character comments
fields. Please see attached. The problem is that there
can be multiple occurrences within co_review_comments of
the string 'End of Interqual'. I believe that the POS
function is for a single occurrence, not multiple???
Post by unknown
Hi Pat,
it would be interesting to know what exactly the
column 'co_review_comments' contains.
Chris Werner
f+s software gmbh
Post by unknown
Thank you for your response. The end result I am
looking for does not include the final line 'End of
Interqual' The text should appear as displayed
below. >> > When I modified the expression to include your
Post by unknown
Post by unknown
Post by unknown
suggestion, the line of text was removed, 'End of
Interqual' but the first line of text from the note
'No >> > need to transfer' was also truncated. Any other
Post by unknown
Post by unknown
suggestions would be greatly appreciated. Thank you. >
Post by unknown
01/19/2009 13:00 Smith, Jane
No need to transfer.
01/18/2009 14:00 Jones, Mary
Auth# 12345
Post by unknown
Hi Pat,
I'm not sure what you want the result to be exactly.
01/19/2009 13:00 Smith, Jane
No need to transfer.
01/18/2009 14:00 Jones, Mary
Auth# 12345
End of Interqual
MID(co_review_comments, 1, Pos(co_review_comments
,'InterQual - InterQual Criteria:',1) -1) + ' ' +
MID(co_review_comments,Pos(co_review_comments,'End
of >> >> InterQual - InterQual
Post by unknown
Post by unknown
Post by unknown
Post by unknown
Criteria.',1)-1, 16)
HTH
Chris Werner
f+s software gmbh
looking >> > for recommendations on the use of the POS
function in >> > InfoMaker. I have the following
expression which works >> > fine if there is only one
occurrence of a string found. >> > If multiple
occurences >> are found in the >> > co_review_comments
field the line >> 'End of Interqual - >> Interqual
Criteria.' is being >> displayed. I do not want >> > this
to occur. Any >> recommendations would be greatly >>
appreciated. > >> >> > MID(co_review_comments, 1,
Pos(co_review_comments >> >> > ,'InterQual - InterQual
Criteria:',1) -1) + ' ' + >> >> > MID(co_review_comments
,Pos(co_review_comments,'End of >> >> > InterQual -
InterQual >> >> > Criteria.',1)-1,len(co_review_comments))
Post by unknown
Post by unknown
Post by unknown
Post by unknown
Post by unknown
The result below is when multiple occurrences of
the >> >> > string are found within the co_review_comments
field. >> >> > The multiple notes are correct, but the
Post by unknown
Post by unknown
Post by unknown
Post by unknown
Post by unknown
01/19/2009 13:00 Smith, Jane
No need to transfer.
01/18/2009 14:00 Jones, Mary
Auth# 12345
End of Interqual - Interqual Criteria.
Terry Dykstra [TeamSybase]
2009-01-26 16:38:06 UTC
Permalink
I think I have a global function that can do that. Look in CodeXchange
(http://www.sybase.com/detail?id=1058501#385) and under
PowerBuilder/InfoMaker look for the 'IM Report Functions'. The function
that I believe will do what you are looking for:

remove_char (string searchstring, string leftchar, string rightchar, string
whichoccurrence )
Returns: string with all characters removed from leftchar to rightchar
included. If whichoccurrence is set to 1, only the first matching set is
removed, else all occurrences are replaced.
Example: remove_char('<b>some text</b>', '<', '>', '1') returns 'some
text</b>'
Example: remove_char('<b>some text</b>', '<', '>', '*') returns 'some text'
--
Terry Dykstra (TeamSybase)
http://powerbuilder.codeXchange.sybase.com/
http://casexpress.sybase.com
product enhancement requests:
http://my.isug.com/cgi-bin/1/c/submit_enhancement
Post by unknown
I just want to see notes entered by staff. I do not want to
see occurrences of 'InterQual - InterQual Criteria:' or
'End
InterQual - InterQual Criteria.' which is automatically
generated by the application and is included within the
co_review_comments field. I am basically trying to strip
out the Interqual text mentioned above and display the notes
entered by staff. I should only see what is mentioned
below. Thank you.
01/19/2009 13:00 Smith, Jane
No need to transfer.
01/18/2009 14:00 Jones, Mary
Auth# 12345
Post by Terry Dykstra [TeamSybase]
So of that string occurs multiple times, what do you want
to see? I'm confused.
--
Terry Dykstra (TeamSybase)
http://powerbuilder.codeXchange.sybase.com/
http://casexpress.sybase.com
http://my.isug.com/cgi-bin/1/c/submit_enhancement
Post by unknown
The column co_review_comments is a computed field which
consists of a total of 20 - 2000 character comments
fields. Please see attached. The problem is that there
can be multiple occurrences within co_review_comments of
the string 'End of Interqual'. I believe that the POS
function is for a single occurrence, not multiple???
Post by unknown
Hi Pat,
it would be interesting to know what exactly the
column 'co_review_comments' contains.
Chris Werner
f+s software gmbh
Post by unknown
Thank you for your response. The end result I am
looking for does not include the final line 'End of
Interqual' The text should appear as displayed
below. >> > When I modified the expression to include your
Post by unknown
Post by unknown
Post by unknown
suggestion, the line of text was removed, 'End of
Interqual' but the first line of text from the note
'No >> > need to transfer' was also truncated. Any other
Post by unknown
Post by unknown
suggestions would be greatly appreciated. Thank you. >
Post by unknown
01/19/2009 13:00 Smith, Jane
No need to transfer.
01/18/2009 14:00 Jones, Mary
Auth# 12345
Post by unknown
Hi Pat,
I'm not sure what you want the result to be exactly.
01/19/2009 13:00 Smith, Jane
No need to transfer.
01/18/2009 14:00 Jones, Mary
Auth# 12345
End of Interqual
MID(co_review_comments, 1, Pos(co_review_comments
,'InterQual - InterQual Criteria:',1) -1) + ' ' +
MID(co_review_comments,Pos(co_review_comments,'End
of >> >> InterQual - InterQual
Post by unknown
Post by unknown
Post by unknown
Post by unknown
Criteria.',1)-1, 16)
HTH
Chris Werner
f+s software gmbh
looking >> > for recommendations on the use of the POS
function in >> > InfoMaker. I have the following
expression which works >> > fine if there is only one
occurrence of a string found. >> > If multiple
occurences >> are found in the >> > co_review_comments
field the line >> 'End of Interqual - >> Interqual
Criteria.' is being >> displayed. I do not want >> > this
to occur. Any >> recommendations would be greatly >>
appreciated. > >> >> > MID(co_review_comments, 1,
Pos(co_review_comments >> >> > ,'InterQual - InterQual
Criteria:',1) -1) + ' ' + >> >> > MID(co_review_comments
,Pos(co_review_comments,'End of >> >> > InterQual -
InterQual >> >> > Criteria.',1)-1,len(co_review_comments))
Post by unknown
Post by unknown
Post by unknown
Post by unknown
Post by unknown
The result below is when multiple occurrences of
the >> >> > string are found within the co_review_comments
field. >> >> > The multiple notes are correct, but the
Post by unknown
Post by unknown
Post by unknown
Post by unknown
Post by unknown
01/19/2009 13:00 Smith, Jane
No need to transfer.
01/18/2009 14:00 Jones, Mary
Auth# 12345
End of Interqual - Interqual Criteria.
unknown
2009-01-26 16:59:00 UTC
Permalink
Will do.....thank you very much for your assistance.
Post by Terry Dykstra [TeamSybase]
I think I have a global function that can do that. Look in
CodeXchange (http://www.sybase.com/detail?id=1058501#385)
and under PowerBuilder/InfoMaker look for the 'IM Report
Functions'. The function that I believe will do what you
remove_char (string searchstring, string leftchar, string
rightchar, string whichoccurrence )
Returns: string with all characters removed from leftchar
to rightchar included. If whichoccurrence is set to 1,
only the first matching set is removed, else all
occurrences are replaced. Example: remove_char('<b>some
text</b>', '<', '>', '1') returns 'some text</b>'
Example: remove_char('<b>some text</b>', '<', '>', '*')
returns 'some text'
--
Terry Dykstra (TeamSybase)
http://powerbuilder.codeXchange.sybase.com/
http://casexpress.sybase.com
http://my.isug.com/cgi-bin/1/c/submit_enhancement
to see notes entered by staff. I do not want to see
occurrences of 'InterQual - InterQual Criteria:' or
'End InterQual - InterQual Criteria.' which is
automatically generated by the application and is
included within the co_review_comments field. I am
basically trying to strip out the Interqual text
mentioned above and display the notes entered by staff.
I should only see what is mentioned below. Thank you.
01/19/2009 13:00 Smith, Jane
No need to transfer.
01/18/2009 14:00 Jones, Mary
Auth# 12345
Post by Terry Dykstra [TeamSybase]
So of that string occurs multiple times, what do you
want >> to see? I'm confused.
Post by Terry Dykstra [TeamSybase]
--
Terry Dykstra (TeamSybase)
http://powerbuilder.codeXchange.sybase.com/
http://casexpress.sybase.com
http://my.isug.com/cgi-bin/1/c/submit_enhancement
Post by unknown
The column co_review_comments is a computed field
which >> > consists of a total of 20 - 2000 character
comments >> > fields. Please see attached. The problem is
that there >> > can be multiple occurrences within
co_review_comments of >> > the string 'End of Interqual'.
I believe that the POS >> > function is for a single
occurrence, not multiple??? >> >
Post by Terry Dykstra [TeamSybase]
Post by unknown
Post by unknown
Hi Pat,
it would be interesting to know what exactly the
column 'co_review_comments' contains.
Chris Werner
f+s software gmbh
Chris, >> >> >
Post by Terry Dykstra [TeamSybase]
Post by unknown
Post by unknown
Post by unknown
Thank you for your response. The end result I am
looking for does not include the final line 'End
of >> >> > Interqual' The text should appear as displayed
Post by Terry Dykstra [TeamSybase]
below. >> > When I modified the expression to include
your >> >> > suggestion, the line of text was removed,
'End of >> >> > Interqual' but the first line of text from
the note >> 'No >> > need to transfer' was also truncated.
Any other >> >> suggestions would be greatly appreciated.
Thank you. > >> >> > 01/19/2009 13:00 Smith, Jane
Post by Terry Dykstra [TeamSybase]
Post by unknown
Post by unknown
Post by unknown
No need to transfer.
01/18/2009 14:00 Jones, Mary
Auth# 12345
Post by unknown
Hi Pat,
I'm not sure what you want the result to be
01/19/2009 13:00 Smith, Jane
No need to transfer.
01/18/2009 14:00 Jones, Mary
Auth# 12345
End of Interqual
MID(co_review_comments, 1, Pos(co_review_comments
,'InterQual - InterQual Criteria:',1) -1) + ' ' +
MID(co_review_comments,Pos(co_review_comments
,'End >> of >> >> InterQual - InterQual
Post by Terry Dykstra [TeamSybase]
Post by unknown
Post by unknown
Post by unknown
Post by unknown
Criteria.',1)-1, 16)
HTH
Chris Werner
f+s software gmbh
looking >> > for recommendations on the use of the
POS >> >> function in >> > InfoMaker. I have the
following >> >> expression which works >> > fine if there
is only one >> >> occurrence of a string found. >> > If
multiple >> occurences >> are found in the >> >
co_review_comments >> field the line >> 'End of Interqual
- >> Interqual >> Criteria.' is being >> displayed. I do
not want >> > this >> to occur. Any >> recommendations
would be greatly >> >> appreciated. > >> >> >
MID(co_review_comments, 1, >> Pos(co_review_comments >> >>
,'InterQual - InterQual >> Criteria:',1) -1) + ' ' + >>
Post by Terry Dykstra [TeamSybase]
Post by unknown
MID(co_review_comments >> ,Pos(co_review_comments
,'End of >> >> > InterQual - >> InterQual >> >> >
Criteria.',1)-1,len(co_review_comments)) >> >> >> >
Post by Terry Dykstra [TeamSybase]
Post by unknown
Post by unknown
Post by unknown
Post by unknown
Post by unknown
The result below is when multiple occurrences
of >> the >> >> > string are found within the
co_review_comments >> field. >> >> > The multiple notes
are correct, but the >> text >> >> > 'Interqual....'
should not display: >> >> >> >
Post by Terry Dykstra [TeamSybase]
Post by unknown
Post by unknown
Post by unknown
Post by unknown
Post by unknown
01/19/2009 13:00 Smith, Jane
No need to transfer.
01/18/2009 14:00 Jones, Mary
Auth# 12345
End of Interqual - Interqual Criteria.
Loading...