× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: $Center procedure (was Procedure Problem)
  • From: "Wayne Achenbaum" <wache@xxxxxxxxxxx>
  • Date: Tue, 4 Jan 2000 21:45:22 -0500

Thanks again Barbara. I appreciate the further input and it sounds like it
will work just fine, and I learned how to define the length of a variable
size field. But I don't see where the procedure call will fail to return a
centered field when using  eval ctrfld = $center(entfld). As long as entfld
is within 256 bytes.

----- Original Message -----
From: <bmorris@ca.ibm.com>
To: <MIDRANGE-L@midrange.com
Sent: Tuesday, January 04, 2000 12:10 PM
Subject: Re: $Center procedure (was Procedure Problem)


>
>
>
> >Date: Sat, 1 Jan 2000 10:47:20 -0500
> >From: "Wayne Achenbaum" <wache@slomins.com>
> > ...
> >I tried changing Field_out to varying, but that caused an
> >error when on the Line that tried to substring text into
> >the center of  Field_out  (I'm on V4R4).  When I leave
> >Field_out as a non-varying alpha field it works fine.
> > ...
>
> Wayne, your procedure might work fine for your current callers,
> but if you receive the returned value in a varying length field,
> the length will always be 256 rather than the length of field_in.
>
> If you make field_out varying, you need to set its length before
> you can substring into it.  Just add this line to the beginning of
> your procedure:
> C          EVAL   %LEN(field_out) = %LEN(field_in)
> and your substring will be fine.
>
> Barbara Morris
>
>
> +---
> | This is the Midrange System Mailing List!
> | To submit a new message, send your mail to MIDRANGE-L@midrange.com.
> | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
> | To unsubscribe from this list send email to
MIDRANGE-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator:
david@midrange.com
> +---

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.