× 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.



Bryan,
I do not have any problem understanding the type of field.

First I have a loop on all formats - the structures called QDFARFTE.
When "inside" the format, I have a loop on all fields - the structure QDFFFINF.
Exact as you say - I go inside this structure and for every field
retrieve some data.

Output from my program for a non-hidden field looks like this:

Field nr. 4
Field name is ZLCLC
Field position is 3 36
Output field
Output buffer displacement is 26
Program length is 3
Field data type is 0

(I was too lazy to "decode" data type, 0 stands for Alpha.)


But with hidden fields (attribute 0x06) field name is filled with
blanks, so to generate a "readable" input I had to make it like this:

if (strlen(rtrim(FldName->WDFFNAM, 10)) > 0)
printf("Field name is %10.10s\n", FldName->WDFFNAM) ;
else
printf("Field name is <empty>\n", FldName->WDFFNAM) ;

And some hidden field looks like this:

Field nr. 8
Field name is <empty>
Field position is 0 0
Hidden field
Input buffer displacement is 36
Output buffer displacement is 36
Program length is 7
Field data type is 7

This field type is 0x07 that is signed decimal.

However - obviously - hidden fields have names!




On Mon, Aug 18, 2014 at 7:08 PM, Bryan Dietz <bdietz400@xxxxxxxxx> wrote:
First I could not even attempt the coding in "C", but reading the manuals I
searched the following page for "hidden":

http://www-01.ibm.com/support/knowledgecenter/ssw_ibm_i_53/apis/qdfrtvfd.htm



Field Header Section (QDFFFINF)

Offset Bit Type Variable Name
Dec Hex
2 2 CHAR(1) WDFFFIOA

Field attribute. X'01' indicates Constant (see structure QDFFFCON, Constant
Field Header Table (QDFFFCON)), X'02' indicates Output (O), X'03' indicates
Message (M), X'04' indicates Input (I), X'05' indicates Both (B), X'06'
indicates Hidden (H), and X'07' indicates Program to System (P).


Maybe that would help you find the type of field.



Jevgeni Astanovski said the following on Mon, 8/18/2014 9:07 AM:

I used this program as a starting point and successfully retrieved
ALMOST everything.
I needed the following:
Format name, field name, field I/O attribute (Input, Output, Both,
Hidden), field type and field length.
As wrote earlier my failure was with hidden fields.
I found one place where hidden fields names could be retrieved and
another place where I could find (probably) these fields necessary
attributes - but without field names!
Names where available for all but hidden....



On Tue, Aug 12, 2014 at 11:36 PM, Bryan Dietz <bdietz400@xxxxxxxxx> wrote:




I just did a Google search "QDFRTVFD site:ibm.com"

which returned a "C" example for the API
"This document contains an example of how to retrieving the Row/Column
of a Field Using the QDFRTVFD API."

http://www-01.ibm.com/support/docview.wss?uid=nas8N1017486

--
This is the Bare Metal Programming IBM i (AS/400 and iSeries) (C400-L)
mailing list
To post a message email: C400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/c400-l
or email: C400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/c400-l.


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.