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



could it be that your code (unless you posted it incorrectly) was wrong?
D tidInInt s 5u 0 based(subInInt_p)
D tidInInt_p s * inz(%addr(TID))
shouldn't tidInInt be based on tidInInt_p rather than subInInt_p???


Thanks,
Tommy Holden



From: "hockchai Lim" <lim.hock-chai@xxxxxxxxxxxxxxx>
To: rpg400-l@xxxxxxxxxxxx
Date: 02/05/2010 03:30 PM
Subject: Re: Binary type in physical file that created thru DDS
Sent by: rpg400-l-bounces@xxxxxxxxxxxx



I resolved the problem by doing below (note: The physical file is ECDHDR):
D ECDHDRDS E DS extname(ECDHDR :RECDHDR :*input)
D qualified
D SUBInInt 10u 0 overlay(SUB)
D TIDInInt 5u 0 overlay(TID)
D PHN_OR_PINInInt...
D 20i 0 overlay(PHN_OR_PIN)

when the program does the read, I've it read into the ECDHDRDS structure.
The TIDInInt shows up correctly.

Strange that this work but the other way doesn't

Thanks


"Lim Hock-Chai" <Lim.Hock-Chai@xxxxxxxxxxxxxxx> wrote in message
news:mailman.6808.1265402631.2580.rpg400-l@xxxxxxxxxxxxxxx
I've a physical file that has a field that is declared as such in the
DDS:
A TID 2B 0

Data in this file is added/updated thru a C program. This C program
treats this TID field like it is an unsigned int. Everything works fine
in the C Program. But thing get a bit strange when I try to access it
thru RPG.

In Debug mode, below is what I see in RPG vs. actual hex value:
TID Actual TID Value TID Hex Value
Hex Value In RPG In RPG
0001 1 001F
00C8 0 000F

I think I know why it is doing this, so I did below to try to get around
the problem:
D tidInInt s 5u 0 based(subInInt_p)
D tidInInt_p s * inz(%addr(TID))

But it still did not slove my problem.
x'00C8' in TID is showing as x'006E' in tidInInt. <== This, I'm not
able to explain.





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.