dbTalk Databases Forums  

Program to pull 4gos back out of a 4gi?

comp.databases.informix comp.databases.informix


Discuss Program to pull 4gos back out of a 4gi? in the comp.databases.informix forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Todd Roy
 
Posts: n/a

Default Program to pull 4gos back out of a 4gi? - 08-27-2010 , 08:13 AM






Hi all,
Does anybody have a program, or know of a program that will deconcatenate the 4go components
out of a 4gi? I know that this shouldn't be too hard to whip up, I'm just looking to save myself some
work.

Our problem is that we have multiple versions of some function modules and we are not always
sure what versions are actually in production.


Thanks,
Todd

Reply With Quote
  #2  
Old   
Art Kagel
 
Posts: n/a

Default Re: Program to pull 4gos back out of a 4gi? - 08-27-2010 , 08:43 AM






If you are using version control, there should be version strings in the
source code. You should be assigning copies of those strings into data
objects so that they appear in the object files (.4go) and so get included
in the executables. Then you can search for these strings to see what
versions of the source were included in the executable. For example, using
RCS or CVS, you would do:

char Revision[] = "$Source$: $Revision$";

RCS/CVS will expand this at checkout time into the source filename and
revision strings, so something like:

char Revision[] = "$Source: mylib_func.4gl $: $Revision: 2.3 $";

Then you can use the RCS ident utility or the UNIX strings utility piped
into grep to find the versions that are included in the executable:

ident myapplication.4gi
....
$Source: mylib_func.4gl $: $Revision: 2.3 $";
....

or
strings myapplication.4gi | egrep 'Revision|Source'

Art
..
Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
IIUG Board of Directors (art (AT) iiug (DOT) org)

Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Advanced DataTools, the IIUG, nor any other
organization with which I am associated either explicitly, implicitly, or by
inference. Neither do those opinions reflect those of other individuals
affiliated with any entity with which I am affiliated nor those of the
entities themselves.



On Fri, Aug 27, 2010 at 9:13 AM, Todd Roy <tmroy (AT) hotmail (DOT) com> wrote:

Quote:
Hi all,
Does anybody have a program, or know of a program that will
deconcatenate the 4go components
out of a 4gi? I know that this shouldn't be too hard to whip up, I'm just
looking to save myself some
work.

Our problem is that we have multiple versions of some function modules
and we are not always
sure what versions are actually in production.


Thanks,
Todd



_______________________________________________
Informix-list mailing list
Informix-list (AT) iiug (DOT) org
http://www.iiug.org/mailman/listinfo/informix-list


Reply With Quote
  #3  
Old   
Art Kagel
 
Posts: n/a

Default Re: Program to pull 4gos back out of a 4gi? - 08-27-2010 , 08:45 AM



OK, that was an odd mix of C-ish and 4GL-ish code, but you get the idea.

Art

Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
IIUG Board of Directors (art (AT) iiug (DOT) org)

Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Advanced DataTools, the IIUG, nor any other
organization with which I am associated either explicitly, implicitly, or by
inference. Neither do those opinions reflect those of other individuals
affiliated with any entity with which I am affiliated nor those of the
entities themselves.



On Fri, Aug 27, 2010 at 9:43 AM, Art Kagel <art.kagel (AT) gmail (DOT) com> wrote:

Quote:
If you are using version control, there should be version strings in the
source code. You should be assigning copies of those strings into data
objects so that they appear in the object files (.4go) and so get included
in the executables. Then you can search for these strings to see what
versions of the source were included in the executable. For example, using
RCS or CVS, you would do:

char Revision[] = "$Source$: $Revision$";

RCS/CVS will expand this at checkout time into the source filename and
revision strings, so something like:

char Revision[] = "$Source: mylib_func.4gl $: $Revision: 2.3 $";

Then you can use the RCS ident utility or the UNIX strings utility piped
into grep to find the versions that are included in the executable:

ident myapplication.4gi
...
$Source: mylib_func.4gl $: $Revision: 2.3 $";
...

or
strings myapplication.4gi | egrep 'Revision|Source'

Art
.
Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
IIUG Board of Directors (art (AT) iiug (DOT) org)

Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on my employer, Advanced DataTools, the IIUG, nor any
other organization with which I am associated either explicitly, implicitly,
or by inference. Neither do those opinions reflect those of other
individuals affiliated with any entity with which I am affiliated nor those
of the entities themselves.



On Fri, Aug 27, 2010 at 9:13 AM, Todd Roy <tmroy (AT) hotmail (DOT) com> wrote:

Hi all,
Does anybody have a program, or know of a program that will
deconcatenate the 4go components
out of a 4gi? I know that this shouldn't be too hard to whip up, I'm
just looking to save myself some
work.

Our problem is that we have multiple versions of some function modules
and we are not always
sure what versions are actually in production.


Thanks,
Todd



_______________________________________________
Informix-list mailing list
Informix-list (AT) iiug (DOT) org
http://www.iiug.org/mailman/listinfo/informix-list



Reply With Quote
  #4  
Old   
Todd Roy
 
Posts: n/a

Default RE: Program to pull 4gos back out of a 4gi? - 08-27-2010 , 08:47 AM



Sometimes we did, sometimes we didn't. We're talking 18 years of lettingprogrammers do pretty much
what they wanted to do, with the result a rather large steaming pile.

Most of them are gone, and a couple are even deceased.

Thanks,
Todd.



From: art.kagel (AT) gmail (DOT) com
Date: Fri, 27 Aug 2010 09:43:50 -0400
Subject: Re: Program to pull 4gos back out of a 4gi?
To: tmroy (AT) hotmail (DOT) com
CC: informix-list (AT) iiug (DOT) org

If you are using version control, there should be version strings in the source code. You should be assigning copies of those strings into data objects so that they appear in the object files (.4go) and so get included in the executables. Then you can search for these strings to see what versions of the source were included in the executable. For example, using RCS or CVS, you would do:



char Revision[] = "$Source$: $Revision$";

RCS/CVS will expand this at checkout time into the source filename and revision strings, so something like:

char Revision[] = "$Source: mylib_func.4gl $: $Revision: 2.3 $";



Then you can use the RCS ident utility or the UNIX strings utility piped into grep to find the versions that are included in the executable:

ident myapplication.4gi
....
$Source: mylib_func.4gl $: $Revision: 2.3 $";


....

or
strings myapplication.4gi | egrep 'Revision|Source'

Art
..Art S. Kagel
Advanced DataTools (www.advancedatatools.com)

IIUG Board of Directors (art (AT) iiug (DOT) org)


Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on my employer, Advanced DataTools, the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor thoseof the entities themselves.






On Fri, Aug 27, 2010 at 9:13 AM, Todd Roy <tmroy (AT) hotmail (DOT) com> wrote:







Hi all,
Does anybody have a program, or know of a program that will deconcatenate the 4go components
out of a 4gi? I know that this shouldn't be too hard to whip up, I'm just looking to save myself some


work.

Our problem is that we have multiple versions of some function modules and we are not always
sure what versions are actually in production.


Thanks,
Todd




_______________________________________________

Informix-list mailing list

Informix-list (AT) iiug (DOT) org

http://www.iiug.org/mailman/listinfo/informix-list

Reply With Quote
  #5  
Old   
Art Kagel
 
Posts: n/a

Default Re: Program to pull 4gos back out of a 4gi? - 08-27-2010 , 09:56 AM



Unfortunate. No tool extant, as far as I know.

Art

Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
IIUG Board of Directors (art (AT) iiug (DOT) org)

Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Advanced DataTools, the IIUG, nor any other
organization with which I am associated either explicitly, implicitly, or by
inference. Neither do those opinions reflect those of other individuals
affiliated with any entity with which I am affiliated nor those of the
entities themselves.



On Fri, Aug 27, 2010 at 9:47 AM, Todd Roy <tmroy (AT) hotmail (DOT) com> wrote:

Quote:
Sometimes we did, sometimes we didn't. We're talking 18 years of letting
programmers do pretty much
what they wanted to do, with the result a rather large steaming pile.

Most of them are gone, and a couple are even deceased.

Thanks,
Todd.



------------------------------
From: art.kagel (AT) gmail (DOT) com
Date: Fri, 27 Aug 2010 09:43:50 -0400
Subject: Re: Program to pull 4gos back out of a 4gi?
To: tmroy (AT) hotmail (DOT) com
CC: informix-list (AT) iiug (DOT) org


If you are using version control, there should be version strings in the
source code. You should be assigning copies of those strings into data
objects so that they appear in the object files (.4go) and so get included
in the executables. Then you can search for these strings to see what
versions of the source were included in the executable. For example, using
RCS or CVS, you would do:

char Revision[] = "$Source$: $Revision$";

RCS/CVS will expand this at checkout time into the source filename and
revision strings, so something like:

char Revision[] = "$Source: mylib_func.4gl $: $Revision: 2.3 $";

Then you can use the RCS ident utility or the UNIX strings utility piped
into grep to find the versions that are included in the executable:

ident myapplication.4gi
...
$Source: mylib_func.4gl $: $Revision: 2.3 $";
...

or
strings myapplication.4gi | egrep 'Revision|Source'

Art
.
Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
IIUG Board of Directors (art (AT) iiug (DOT) org)

Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on my employer, Advanced DataTools, the IIUG, nor any
other organization with which I am associated either explicitly, implicitly,
or by inference. Neither do those opinions reflect those of other
individuals affiliated with any entity with which I am affiliated nor those
of the entities themselves.



On Fri, Aug 27, 2010 at 9:13 AM, Todd Roy <tmroy (AT) hotmail (DOT) com> wrote:

Hi all,
Does anybody have a program, or know of a program that will
deconcatenate the 4go components
out of a 4gi? I know that this shouldn't be too hard to whip up, I'm just
looking to save myself some
work.

Our problem is that we have multiple versions of some function modules
and we are not always
sure what versions are actually in production.


Thanks,
Todd



_______________________________________________
Informix-list mailing list
Informix-list (AT) iiug (DOT) org
http://www.iiug.org/mailman/listinfo/informix-list



Reply With Quote
  #6  
Old   
Jonathan Leffler
 
Posts: n/a

Default Re: Program to pull 4gos back out of a 4gi? - 08-28-2010 , 01:38 PM



On Aug 27, 6:13*am, Todd Roy <tm... (AT) hotmail (DOT) com> wrote:
Quote:
* *Does anybody have a program, or know of a program that will deconcatenate *the 4go components
out of a 4gi? * I know that this shouldn't be too hard to whip up, I'm just looking to save myself some
work.

* *Our problem is that we have multiple versions of some function modules and we are not always
sure what versions are actually in production.
I've not needed to do it, so I don't have a tool that does it
available off the shelf, as it were.

However, you should find at the IIUG Software Archive a package
'rdslink' or 'rdslib'. This is a p-code librarian and linker - and
also includes a p-code scanner, rdsscan.

You could use that framework pretty easily to recognize new files
within a composite, and write each of the files to an appropriate
output file. It would be a few hours work at most, I think, to do
that. The biggest problem is probably what to do if there are
collisions in file names extracted - either with files already on the
system or because the same .4go name was used several times (with
different contents - this can happen, though it is hardly recommended
practice).

HTH - shout if you decide you need more assistance.

-=JL=-

Reply With Quote
  #7  
Old   
Sean Baker
 
Posts: n/a

Default Query for database HDR mode? - 05-26-2011 , 09:50 AM



I'm trying to determine from within an SPL routine what HDR mode the current database is in (standard, primary or secondary). Is there anything in systables that has this information? I've looked at sysopendb, but it doesn't seem to have that info.

Even better, if I can detect that I'm on a secondary server, is there a wayto lookup the primary server?

We're on IDS 11.50.FC6.

Thanks,

Sean.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.