|
Mark,QsnSetFld
Recovery . . . : Specify a field ID that is defined through the
IDAPI and try the request again.
__________________________________
Does that mean that the entire screen must be generated via
DSM? Or can I retrofit this in combination with standard DDS?
When you use QsnSetFld you use the Field ID *or* the row and column but
never both (either *OMIT the others or pass zeros). However, the field
is a concept that only exists within the DSM apis for your convienencein
creating dynamic displays. When you add fields using QsnSetFld you canother
specify any unique non-zero value as a field ID (they do not need to be
consecutive) and the DSM apis remember it and allow you to use it in
APIs in lieu of the row/col pair.controller
However, it is not part of the 5250 data stream, nor does the WS
format have any concept of any field IDs. Unless you are usingDSPATR(PC)
in the DDS, the only alternative is to ultimately set the row/colvalues.
And at that point you may just as well use the DDS keyword CSRLOCinstead of
bothering with QsnSetCsrAdr().row/col
However, that does not necessarily mean you need to hard code the
pairs. What I did was create a service program routine RtvFldLoc()which
accepts a display file, format, and field name and optionally the mode,then
uses the QDFRTVFD api to retrieve that field's screen location atruntime.
Then I just pass those to the variables used with CSRLOC() keyword inthe
display file. The service program routine caches the last used valuesfor
the display file and format so it can minimize the overhead ofpopulating
the user space. Performance is fine.before,
But QDFRTVFD is not the simplest API around. If you haven't used it
Google for examples.
Doug
As an Amazon Associate we earn from qualifying purchases.
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.