Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagetext
 D* procedure to override field data, from *SRVPGM PROFOUNDUI               
 D profoundui_overrideValue...                                              
 D                 pr                  ExtProc('profoundui_overrideValue') 
 D  FileName                       *   value options(*string:*trim)        
 D  RecordName                     *   value options(*string:*trim)        
 D  FieldName                      *   value options(*string:*trim)        
 D  Data                           *   value options(*string)              
 D  DataLen                      10i 0 value                   

 

How to use this procedure:

  1.  Include /COPY member PROFOUNDUI/QRPGLEINC, PUIRDF in your progarm.
  2.  Define the field with a small size (less than 32K) in your Rich Display File as normal.
  3.  In your program, before a WRITE or EXFMT, call procedure profoundui_overrideValue() to indicate to the Profound UI handler to use the data specified on the procedure call (instead of the data in the DDS record) for the specified field and record format. Use the parameters “Data” and “DataLen” to point to the location and length of the data.
  4.  Compile your program with service program PROFOUNDUI in the library list.
  5.  At WRITE or EXFMT time, the Profound UI handler will send that data to the Rich Display File for that field in that record format.

Example program of how this procedure is used:

  • Suppose you have a customer address file CUSTADRP with the following fields
    • CUSTNO: zoned(4:0)
    • NAME: char(30)
    • STREET: char(30)
    • CITY: char(20)
    • STATE: char(2)
    • POSTAL: char(10)
  • The fields NAME, STREET, CITY are defined on the Rich Display File with their normal sizes.
  • However, you want to to send very large data (> 32K) for those fields to the Rich Display File at WRITE or EXFMT time.
  • The example program uses procedure profoundui_overrideValue() to override the value for those fields (NAME, CITY, STREET), using data from the big fields “bigName”, “bigStreet”, “bigCity”,  before doing WRITE or EXFMT to the record format,
  • The large fields can be type CHAR, VARCHAR, or CLOB, as shown in the example.

...