Accessing variables in .r file

Scleameth

New Member
Since this is my first post here, I'll give a quick 'sup to you all !!
'sup ? :)

My company runs version 9.1D.
I need to check which is the most recent compiled version of any program... In all .p files is the variable "&scop object-version" but when the program is compiled, how can I access this variable to see what the value is ?

RCODE-INFO does not offer any decent options in ver 9...

I've read through many threads on this site and most of the related posts refer to : http://pdecode.webpark.sk, but I can't find what I'm looking for there either.

I don't want to run every program in order to find out what the version is... there has to be an easier way ?? :confused:
 
Since this is my first post here, I'll give a quick 'sup to you all !!
'sup ? :)

My company runs version 9.1D.
I need to check which is the most recent compiled version of any program... In all .p files is the variable "&scop object-version" but when the program is compiled, how can I access this variable to see what the value is ?

RCODE-INFO does not offer any decent options in ver 9...

I've read through many threads on this site and most of the related posts refer to : http://pdecode.webpark.sk, but I can't find what I'm looking for there either.

I don't want to run every program in order to find out what the version is... there has to be an easier way ?? :confused:

Nope, this is not possible. Scoped-defines are first preprocessed before the r-code is generated and completely disappear in the r-code, so even if you open the r code in an ascii editor (like notepad, or ultraedit) you will not see it.

There is one thing that I have done in the passed, it involves some work however. When you write a program to compile your sources you can put some extra information at the end of the file. For instance 2 or 3 bytes with a major and a minor version number in it. When progress runs the r-file this extra information is completely ignored. If you make this extra information a fixed length then you can write a program in Progress that reads the last 2 or 3 bytes of the .r file and can show you the information that is in it.

An other solution is that you make sure that you can run all programs independently and start them persistent. The only thing that you will need then is a procedure that you can call in this procedure which returns or shows the version number.

Unfortunatelly a more simple solution is (not yet) available.
 
the preprocessor is compiler feature, its own mini language.

before the compiler goes on with compiling code it executes directives for segment inclusions ({&x}), file inclusions ({include.i}), conditional inclusions (&if)

and that's where the name comes from :)


by the way if that version number is a string and has some kind of defined format you could search for it in the r-code's text segment.

you mentioned the version number could be obtained while running.

if building an automated process that goes through and checks procedures using only 4gl wouldn't work.

you could try using win api's (and running on windows) synthesizing keyboard and mouse events.
 
There is one thing that I have done in the passed, it involves some work however. When you write a program to compile your sources you can put some extra information at the end of the file. For instance 2 or 3 bytes with a major and a minor version number in it. When progress runs the r-file this extra information is completely ignored. If you make this extra information a fixed length then you can write a program in Progress that reads the last 2 or 3 bytes of the .r file and can show you the information that is in it.

Thanks ! This sounds like a viable option, but would you mind telling me how exactly you included that extra information ?
 
Back
Top