View previous topic :: View next topic
|
Author |
Message |
r2k1984
New User
Joined: 21 Jun 2005 Posts: 69 Location: chennai
|
|
|
|
Hi,
I have a requirement to get the timestamp of the programs from the load module.
for that i need to read the load module. it can be done by rexx or jcl or any other means.
Please let me know how to do it. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
I would first use ISPF browse to make sure that a time stamp is in there.
Then perhaps use AMBLIST to format the load module and process the AMBLISTing with rexx to search for the values you want. The timestamp might not be in the same location all of the time. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
The compiler/assembler leaves a version/timestamp in the compiled code and (IIRC) the binder/linkage editor does the same.
There are several free/pay for/included programs that can scan a load module PDS and extract the info into whatever format you are willing to mine it for.... |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
COBOL generates a time stamp that is version specific for the compile date and time. When the program runs through the binder (or linkage editor depending on system) a packed decimal date and time stamp are placed on a particular record (length 22 hex perhaps -- it's been a while). |
|
Back to top |
|
|
r2k1984
New User
Joined: 21 Jun 2005 Posts: 69 Location: chennai
|
|
|
|
I agree that we get time stamp..I have used Amblist to get the timestamp.
I need to read the load like reading the file..
I tried with rexx and jcl but not able to do it..
please let me know the way to read it |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
When you give up trying to read it, try this:
> Then perhaps use AMBLIST to format the load module and process
> the AMBLISTing with rexx to search for the values you want. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
ramakrishnan: I just checked the REXX manual and it specifically states that EXECIO will not read undefined format files -- and load modules are undefined format. If your requirement really is to read the load module, you cannot use REXX to do so. |
|
Back to top |
|
|
r2k1984
New User
Joined: 21 Jun 2005 Posts: 69 Location: chennai
|
|
|
|
Is there any faclity in jcl or cobol to read the load module and write it to a vb or fb file? |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
The simplest solution for your requirement is to do as Pedro suggested. Write a REXX program that allocates the files needed for AMBLIST, invokes AMBLIST, and then processes the output. This way, AMBLIST does the hard bit and you get the results in one execution of your REXX program. The fact that AMBLIST is doing the work "under the covers" is transparent.
Garry. |
|
Back to top |
|
|
r2k1984
New User
Joined: 21 Jun 2005 Posts: 69 Location: chennai
|
|
|
|
can any put the code how to use amblist? |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
Here's a snippet you could work from
Code: |
"
/* allocate ddnames used by AMBLIST */
ADDRESS TSO ,
"ALLOC FI(LOAD) DSORG(PO) SHR DSNAME('loadlib')"
ADDRESS TSO ,
"ALLOC FI(SYSIN) NEW SPA(1,1) TR REUSE "
ADDRESS TSO ,
"ALLOC FI(SYSPRINT) NEW SPA(1,1) CYL REUSE"
DROP CTRL.
CTRL.1 = " LISTLOAD DDN=LOAD,MEMBER="member",OUTPUT=XREF "
CTRL.0 = 1
ADDRESS TSO ,
"EXECIO * DISKW SYSIN (FINIS STEM CTRL.
ADDRESS LINKMVS "AMBLIST"
ADDRESS TSO ,
"EXECIO * DISKR SYSPRINT (FINIS STEM AMBLINE. "
ADDRESS TSO ,
"FREE FI(LOAD)"
ADDRESS TSO ,
"FREE FI(SYSIN)"
ADDRESS TSO ,
"FREE FI(SYSPRINT)" |
The AMBLINE. stem variable contains the lines output by AMBLIST. Change CTRL.1 to reflect whatever AMBLIST option you would submit via SYSIN.
Garry. |
|
Back to top |
|
|
|