User SELECT ACTION processing.

Robert Deskin bob.deskin at me.com
Tue Oct 25 15:01:14 CDT 2022


If I understand this correctly, the user enters S in the Action field, and then either enters the field ID of the Foreign Currency (FC) field or is prompted automatically. The INPUT procedure for FC calculates the local currency.

Do you want to select/retrieve based on the calculated FC value?

Would a SELECT statement work? I can’t remember whether you can specify a DEFINE that would be used in the statement. Or whether you can restrict it to the situations you want. But something like

FILE <yourfile>
DEFINE FC = <FC calculation>
SELECT IF FC of <yourfile> = FC

Don’t know if I’ve got the correct LC vc FC, but if I remember correctly, and it’s been a long time, the SELECT operate on each record retrieved. The DEFINE should be calculated when referenced by the SELECT. If the SELECT fails, the record is bypassed and the next record is read, and so on.

Anywhere close?

Bob

> On Oct 25, 2022, at 11:13 AM, James B. Byrne <byrnejb at harte-lyne.ca> wrote:
> 
> Related to my previous message.  I am trying to discover if it is possible to
> use a calculated value in a user specified SELECT action.  The example is a
> foreign currency (FC) amount which is converted to the local currency (LC) when
> stored and reconverted into the foreign currency when displayed; both using an
> exchange rate stored in the record.
> 
> The FC is entered into the FIELD of the local currency amount and converted in
> an INPUT procedure to the LC value.  A corresponding OUTPUT procedure
> calculates the displayed value.
> 
> I can create a DEFINE which will give the FC value when a record is retrieved. 
> However, I cannot determine how to use a value entered in the FIELD by a USER
> SELECT action to compare against this DEFINE.  Is this possible?
> 
> 
> 
> -- 
> ***          e-Mail is NOT a SECURE channel          ***
>        Do NOT transmit sensitive data via e-Mail
>   Unencrypted messages have no legal claim to privacy
> Do NOT open attachments nor follow links sent by e-Mail
> 
> James B. Byrne                mailto:ByrneJB at Harte-Lyne.ca
> Harte & Lyne Limited          http://www.harte-lyne.ca
> 9 Brockley Drive              vox: +1 905 561 1241
> Hamilton, Ontario             fax: +1 905 561 0757
> Canada  L8E 3C3
> 
> -- 
> = = = = = = = = = = = = = = = = = = = = = = = = = = = =
> Mailing list: powerh-l at lists.sowder.com
> Subscribe: 'subscribe' in message body to powerh-l-request at lists.sowder.com
> Unsubscribe: 'unsubscribe <password>' in message body to powerh-l-request at lists.sowder.com
> https://lists.sowder.com/mailman/listinfo/powerh-l
> This list is closed, thus to post to the list you must be a subscriber.
> Add 'site:lists.sowder.com powerh-l' to your search terms to search the list archive at Google.




More information about the powerh-l mailing list