×
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.
I orignally posted an issue that a program would not convert to V6R1 from an
earlier release even though all "creation" data was there.
I've came across this code below which is some where down in the bowels of
it all. I know what it is doing, but I'm not comfortable that I really
understand the "how", and I see a reference to QUSRTOOL and MI Instruction.
The person who wrote this had a reasonable grip on the 400 in 1993 and a
huge knowledge years later. He hated doing a "hack" but would do so if need
be. Later on through networking he obtained lots more knowledge of the 400.
Is this a hack and is it likely to be something that V6R1 under level 40
would not approve off?
BTW, the cross platform stuff for PC_DOS is not longer supported so it could
be removed if somehow it might be hanging around to confuse V6R1.
/********************************************************************
* Program.....: GETINVAR
* Date........: August 1993
* Copyright...: Copyright (c) 1993 Access Paths Inc
* Version.....: ILE C/400, Watcom C/C++
* Modified....:
* Description.:
*
* This program reads the *LIBL/TRECSINI User Space or or %path%\TRECS.INI,
* looks up the variable name passed, and returns the value assigned to the
* variable as a NULL terminated string.
*
* Parameters passed are 1. INI user space name defaults to *LIBL/TRECSINI
* 2. Variable name
* 3. Variable value returned to caller
#if defined(AS400)
* 4. (optional) length of target area
#endif
********************************************************************/
for (val = w1 = 0;w1<size && *(s1+w1);w1++)
{
val = val * 16;
if (*(s1+w1) & 0xF0 == 0x30)
val = val + (*(s1+w1) - 0x30);
else
val = val + (toupper(*(s1+w1)-'A'+10));
}
return(val);
}
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.