Re: Finding a string literal in a *PGM object



Tom,

As I said in my first post, I am looking for a specific string that is
coded as follows in all of our COBOL programs:

77 WHAT-VER-ID PIC X(25) VALUE
"@(#) VERSION 5.00".

It might be interesting going forward to store this information in the
"program header" for easier retrieval, although I've been told that
using API's effectively on the AS400 is not for the faint of heart. Be
that as it may, the utility I need to create must be able to look at
existing program at our clients.

In fact I've already been able to find another solution that temporary
adds the version number to the end of the 8 character source member
name before compilation. The 2 digit version number is then
retrievable with DSPOBJD via the ODSRCM field in the QLIDOBJD format.
But as I say this doesn't help with existing programs.

The good news is that DMPOBJ creates a spoolfile which does contain
the "@(#)" string. My next problem is how to parse it reasonably
quickly. I use CPYSPLF to to copy the dump to a database file that I
can look at in REXX. These files are quite big depending on the size
of the original *PGM object. I just wonder how long it's going to take
to parse one in REXX.

If anyone has any ideas to speed this up they would be most welcome.

Thanks

Elliot



.



Relevant Pages

  • Re: Finding a string literal in a *PGM object
    ... As I said in my first post, I am looking for a specific string that is ... coded as follows in all of our COBOL programs: ... My next problem is how to parse it reasonably ... to parse one in REXX. ...
    (comp.sys.ibm.as400.misc)
  • Re: Help With PyParsing of output from win32pdhutil.ShowAllProcesses()
    ... None to a string). ... Still have an urge to parse with pyparsing? ... pyparsing Dict class. ... keys from the parsed data, so it looks like you are already thinking ...
    (comp.lang.python)
  • Re: hex and binary formats
    ... At this point Rexx does not care at all, whether "a" happens to point to a string that could be interpreted as a decimal number. ... Object REXX can be used without using its object-oriented features at all! ... This call would clearly be a string containing some sequence of letters, where no one would be able to know upfront, how to interpret it as a number for instance. ...
    (comp.os.os2.programmer.misc)
  • Re: Pivottables from external sources
    ... The CommandText property holds the SQL query string. ... The Connection property holds the connection string to the database file. ... Dim ws1 As Worksheet ... sPTname = "PivotTable1" ...
    (microsoft.public.excel.programming)
  • Re: Fearsome Parsing challenge, round 2.
    ... On all the platform's I've encountered, the behaviour when you change a long sting into a shorter one is to re-use the memory associated with the long string to contain the shorter string, leaving some unused, but not forgotten memory. ... I seem to recall when this feature was added to Rexx under VM. ... The definition of the overlay() function requires it return a new string value. ... In the mainframe version, a variable's value is stored directly in the variable tree (i.e., an assignment will copy the value getting assigned). ...
    (comp.lang.rexx)