Hi Jevgeni

The RPG Program I have here does get the hidden field names and attributes.
For getting the basic stuff it works well.

I am converting it to C but I am stuck on converting this line of code


I coded it in C as a strncmp but I get this compile error.
I tried many things to attempt to cast from const char* to char but I
am failing.
(the C code of the program is here
It is a mix of the IBM code and the code I am converting , I am using the
IBM code as a guide to the conversion

also I must admit I dont really know what this code means
I know it sets a pointer to the data but what does
(QDFFINFO_t *)((char *) mean ?

This is and example of the compile error I am getting.
218 17 | if (strncmp(p_QDFFFINF->WDFFFIOA, Attrib, 1) == 0)
218 17 + if ((_STRNCMPNULL((p_QDFFFINF->WDFFFIOA),(Attrib),(1))) ==
0) {
*=SEVERE==========> a - CZM0280 Function argument assignment between types
"const char*" and "char" is not allowed.
219 18 | NumFlds +=
220 | }

However there are other uses of strncmp in the program that compile just
for example.

253 4 | for (i=0; i<p_QDFFBASE->WDFFRCS; ++i)
254 5 | if (strncmp(p_QDFARFTE->WDFARFNM,MyRec,10) == 0)
255 6 | RecIndex = i + 1; /* Entry in QDFARFTE table for the
requested name*/

Thanks Buck for the insight on what to return.
I think I will just allocate an array in the caller and pass in a pointer
to the array
and see how that goes.

date: Mon, 18 Aug 2014 16:07:35 +0300
from: Jevgeni Astanovski <jevgeniast@xxxxxxxxx>

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

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 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 here. If you have questions about this, please contact [javascript protected email address].