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



Maybe I'm not understanding, but... wouldn't it simply be like this?

if (QDFFFINF->WDFFFIOA == 0x01) {
// whatever
}

Since WDFFFIOA isn't a pointer, it's just a byte, can't you just check it directly?

Sorry... I haven't following this whole conversation, so I might be missing something important.

-SK

On 8/19/2014 8:10 AM, Frank Kolmann wrote:
Hi Jevgeni


The RPG Program I have here does get the hidden field names and attributes.
For getting the basic stuff it works well.
http://wiki.midrange.com/index.php/QDFRTVFD

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

if QDFFFINF.WDFFFIOA = x'01'

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
http://wiki.midrange.com/index.php/CQDFRTVFD
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
p_QDFFINFO = (QDFFINFO_t *)((char *) p_QDFFBASE + p_QDFFBASE->WDFFINOF);
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.
217
|
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 +=
1;
220 | }

However there are other uses of strncmp in the program that compile just
fine.
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*/
256


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


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.