IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Get the timestamp of the programs from the load module


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
r2k1984

New User


Joined: 21 Jun 2005
Posts: 69
Location: chennai

PostPosted: Tue Feb 10, 2009 6:22 am
Reply with quote

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
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Tue Feb 10, 2009 6:37 am
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Tue Feb 10, 2009 7:03 am
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Tue Feb 10, 2009 7:09 am
Reply with quote

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
View user's profile Send private message
r2k1984

New User


Joined: 21 Jun 2005
Posts: 69
Location: chennai

PostPosted: Tue Feb 10, 2009 6:47 pm
Reply with quote

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
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Tue Feb 10, 2009 9:41 pm
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Tue Feb 10, 2009 9:49 pm
Reply with quote

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
View user's profile Send private message
r2k1984

New User


Joined: 21 Jun 2005
Posts: 69
Location: chennai

PostPosted: Wed Feb 11, 2009 8:52 pm
Reply with quote

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
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Wed Feb 11, 2009 9:13 pm
Reply with quote

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
View user's profile Send private message
r2k1984

New User


Joined: 21 Jun 2005
Posts: 69
Location: chennai

PostPosted: Wed Feb 11, 2009 9:15 pm
Reply with quote

can any put the code how to use amblist?
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Wed Feb 11, 2009 9:23 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts To get the count of rows for every 1 ... DB2 3
No new posts How to load to DB2 with column level ... DB2 6
No new posts REASON 00D70014 in load utility DB2 6
No new posts Fetch data from programs execute (dat... DB2 3
Search our Forums:

Back to Top