Re: Problem with globals and the definition of structures

Sergio Szychowski <[email protected]> Mon, 25 Mar 2024 12:28:16 -0300
Newsgroups gmane.comp.lang.4gl.aubit.general
Message-ID <CAHrRhujHr1yLtZd3oEUWE=a9H9QLJ1FJbk0jJVe1wBTue8Egjg@mail.gmail.com>
--===============0808301857945595067==
Content-Type: multipart/alternative; boundary="000000000000420d6006147dd32c"

--000000000000420d6006147dd32c
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hi Mike,
We found the problem, they were old *.glb.dat, it is essential before
compiling the globa-type modules, to delete the corresponding glb.dat.

Thanks in advance.
Best regards


El lun, 25 mar 2024 a la(s) 11:47=E2=80=AFa.m., Mike Aubury ([email protected]=
)
escribi=C3=B3:

> I'd need a small example to try here.
>
> On Mon, 25 Mar 2024 at 14:45, Sergio Szychowski <[email protected]>
> wrote:
>
>> Hi,
>> I have the problem that several modules have globals, and when using the
>> values of some 'records'
>> the information seems to be corrupted. Looking at the definition of the
>> structures in 'C', several records seem to have changed the order of the
>> fields, even for modules that use the same global file.
>> Additionally, values are only preserved between modules if the modules
>> use the same global file. In informix4gl, field values in globals are
>> preserved for all modules no matter if the module uses a global from a f=
ile
>> or if the global is defined in the module itself.
>> I use version 1.5.2 with postgresql.
>>
>> In global.4gl
>> struct {
>>    long rowid ;
>>    char codemp_c [1+1];
>>    char empresa_c [20+1];
>>    fgldate fechoy_h ;
>>    fgldate fecsis_h ;
>>    fgldecimal tperiodo_d ;
>>    char tsucurs_c [4+1];
>>    char rubro_c [1+1];
>>    char categ_c [1+1];
>>    fgldecimal nserie ;
>>    char name_dia [9+1];
>>    char name_mes [10+1];
>>    short tdia ;
>>    short nmes ;
>>    short tipo_s ;
>>    char sistema_c [1+1];
>>    char transac_c [1+1];
>>    char version_c [2+1];
>>    char so_c [1+1];
>>    short graba_s ;
>>    char prueba_c [1+1];
>> } p_tpar;
>>
>> In module.4gl that uses "global.4gl" filename
>> extern struct {
>>    long rowid ;
>>    fgldate fecsis_h ;
>>    short tipo_s ;
>>    short graba_s ;
>>    char rubro_c [1+1];
>>    char empresa_c [20+1];
>>    char name_dia [9+1];
>>    short tperiodo_d ;
>>    char tsucurs_c [4+1];
>>    char transac_c [1+1];
>>    char so_c [1+1];
>>    long nserie ;
>>    char codemp_c [1+1];
>>    char prueba_c [1+1];
>>    char sistema_c [1+1];
>>    fgldate fechoy_h ;
>>    char categ_c [1+1];
>>    char name_mes [10+1];
>>    char version_c [2+1];
>>    short tdia ;
>>    short nmes ;
>> } p_tpar;
>>
>> Thanks in advance.
>> Best regards
>> _______________________________________________
>> Aubit4gl-discuss mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss
>>
>

--000000000000420d6006147dd32c
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-size:large">Hi =
Mike,</div><div class=3D"gmail_default" style=3D"font-size:large">We found =
the problem, they were old *.glb.dat, it is essential before compiling the =
globa-type modules, to delete the corresponding glb.dat.</div><div class=3D=
"gmail_default" style=3D"font-size:large"></div><div class=3D"gmail_default=
" style=3D"font-size:large"><br></div><div class=3D"gmail_default" style=3D=
"font-size:large">Thanks in advance.</div><div class=3D"gmail_default" styl=
e=3D"font-size:large">Best regards<br></div><div class=3D"gmail_default" st=
yle=3D"font-size:large"><br></div></div><br><div class=3D"gmail_quote"><div=
 dir=3D"ltr" class=3D"gmail_attr">El lun, 25 mar 2024 a la(s) 11:47=E2=80=
=AFa.m., Mike Aubury (<a href=3D"mailto:[email protected]">[email protected]</a>)=
 escribi=C3=B3:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:=
0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">=
<div dir=3D"ltr">I&#39;d need a small example to try here.</div><br><div cl=
ass=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Mon, 25 Mar 20=
24 at 14:45, Sergio Szychowski &lt;<a href=3D"mailto:[email protected]" t=
arget=3D"_blank">[email protected]</a>&gt; wrote:<br></div><blockquote cl=
ass=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid=
 rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr"><div class=3D"gmail_de=
fault" style=3D"font-size:large">Hi,</div><div class=3D"gmail_default" styl=
e=3D"font-size:large">I have the problem that several modules have globals,=
 and when using the values of some &#39;records&#39;<br>the information see=
ms to be corrupted. Looking at the definition of the structures in &#39;C&#=
39;, several records seem to have changed the order of the fields, even for=
 modules that use the same global file.</div><div class=3D"gmail_default" s=
tyle=3D"font-size:large">Additionally, values are only preserved between mo=
dules if the modules use the same global file. In informix4gl, field values=
 in globals are preserved for all modules no matter if the module uses a gl=
obal from a file or if the global is defined in the module itself.</div><di=
v class=3D"gmail_default" style=3D"font-size:large">I use version 1.5.2 wit=
h postgresql.</div><div class=3D"gmail_default" style=3D"font-size:large"><=
br></div><div class=3D"gmail_default" style=3D"font-size:large">In global.4=
gl<br></div><div class=3D"gmail_default" style=3D"font-size:large">struct {=
<br>=C2=A0 =C2=A0long rowid ;<br>=C2=A0 =C2=A0char codemp_c [1+1];<br>=C2=
=A0 =C2=A0char empresa_c [20+1];<br>=C2=A0 =C2=A0fgldate fechoy_h ;<br>=C2=
=A0 =C2=A0fgldate fecsis_h ;<br>=C2=A0 =C2=A0fgldecimal tperiodo_d ;<br>=C2=
=A0 =C2=A0char tsucurs_c [4+1];<br>=C2=A0 =C2=A0char rubro_c [1+1];<br>=C2=
=A0 =C2=A0char categ_c [1+1];<br>=C2=A0 =C2=A0fgldecimal nserie ;<br>=C2=A0=
 =C2=A0char name_dia [9+1];<br>=C2=A0 =C2=A0char name_mes [10+1];<br>=C2=A0=
 =C2=A0short tdia ;<br>=C2=A0 =C2=A0short nmes ;<br>=C2=A0 =C2=A0short tipo=
_s ;<br>=C2=A0 =C2=A0char sistema_c [1+1];<br>=C2=A0 =C2=A0char transac_c [=
1+1];<br>=C2=A0 =C2=A0char version_c [2+1];<br>=C2=A0 =C2=A0char so_c [1+1]=
;<br>=C2=A0 =C2=A0short graba_s ;<br>=C2=A0 =C2=A0char prueba_c [1+1];<br>}=
 p_tpar;</div><div class=3D"gmail_default" style=3D"font-size:large"><br></=
div><div class=3D"gmail_default" style=3D"font-size:large">In module.4gl th=
at uses &quot;global.4gl&quot; filename<br>extern struct {<br>=C2=A0 =C2=A0=
long rowid ;<br>=C2=A0 =C2=A0fgldate fecsis_h ;<br>=C2=A0 =C2=A0short tipo_=
s ; <br>=C2=A0 =C2=A0short graba_s ;<br>=C2=A0 =C2=A0char rubro_c [1+1];<br=
>=C2=A0 =C2=A0char empresa_c [20+1];<br>=C2=A0 =C2=A0char name_dia [9+1];<b=
r>=C2=A0 =C2=A0short tperiodo_d ;<br>=C2=A0 =C2=A0char tsucurs_c [4+1];<br>=
=C2=A0 =C2=A0char transac_c [1+1];<br>=C2=A0 =C2=A0char so_c [1+1];<br>=C2=
=A0 =C2=A0long nserie ;<br>=C2=A0 =C2=A0char codemp_c [1+1];<br>=C2=A0 =C2=
=A0char prueba_c [1+1];<br>=C2=A0 =C2=A0char sistema_c [1+1];<br>=C2=A0 =C2=
=A0fgldate fechoy_h ;<br>=C2=A0 =C2=A0char categ_c [1+1];<br>=C2=A0 =C2=A0c=
har name_mes [10+1];<br>=C2=A0 =C2=A0char version_c [2+1];<br>=C2=A0 =C2=A0=
short tdia ;<br>=C2=A0 =C2=A0short nmes ;<br>} p_tpar;</div><div class=3D"g=
mail_default" style=3D"font-size:large"><br></div><div class=3D"gmail_defau=
lt" style=3D"font-size:large">Thanks in advance.</div><div class=3D"gmail_d=
efault" style=3D"font-size:large">Best regards<br></div></div>
_______________________________________________<br>
Aubit4gl-discuss mailing list<br>
<a href=3D"mailto:[email protected]" target=3D"_blank"=
>[email protected]</a><br>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss" r=
el=3D"noreferrer" target=3D"_blank">https://lists.sourceforge.net/lists/lis=
tinfo/aubit4gl-discuss</a><br>
</blockquote></div>
</blockquote></div>

--000000000000420d6006147dd32c--


--===============0808301857945595067==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============0808301857945595067==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Aubit4gl-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss

--===============0808301857945595067==--