Passing a system variable to a choose statement

James B. Byrne byrnejb at harte-lyne.ca
Thu Jun 20 09:29:51 CDT 2024


I have an Image Detail Dataset with the following layout:

                                             INPUT OUTPUT
TRANACCT                                TYPE SCALE SCALE  DEC PICTURE
* ACCOUNT-NUMBER                        NUM     0     0    0  ^^^^^^^^
* TRANS-IDENT                           CHAR                  X(8) ^^^^^^^^
  STATUS-CODE                           CHAR                  X(2) ^^
  DESCRIPTION                           CHAR                  X(30)
  CR-DB-FLAG                            CHAR                  X(2)
  AMOUNT                                NUM     0     2    0   ^^^^^^^^^^....
  BALANCE                               NUM     0     2    0   ^^^^^^^^^^....
  RECORD-TYPE                           CHAR                  X(4)
* DATE-TRANSACTED                       DATE                  YYYY MMM DD
  DATE-PRINTED                          DATE                  YYYY MMM DD

I wish to pass a computed date to a QUIZ CHOOSE statement using a system variable:

SETVAR HL_LASTDAY STR("![HPDATETIME]",1,8)

But using CHOOSE with the SYSTEMVALUE option produces an error:

ACCESS TRANACCT

CHOOSE DATE-TRANSACTED SYSTEMVALUE "HL_LASTDAY"
*E* You must include a value(s) or a parm for each linkitem for this file type.

What is the correct way to do this?  I do not want to use a SELECT given the
size of the dataset.

Thanks,


-- 
***          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



More information about the powerh-l mailing list