Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Get the timestamp of the programs from the load module

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: Get the timestamp of the programs from the load module
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

Senior Member


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

PostPosted: Tue Feb 10, 2009 6:37 am    Post subject: Reply to: HOW TO READ THE COBOL LOAD MODULE.
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: 3158
Location: Tucson AZ

PostPosted: Tue Feb 10, 2009 7:03 am    Post subject:
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: 7932
Location: Bellevue, IA

PostPosted: Tue Feb 10, 2009 7:09 am    Post subject:
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    Post subject:
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

Senior Member


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

PostPosted: Tue Feb 10, 2009 9:41 pm    Post subject: Reply to: Get the timestamp of the programs from the load mo
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: 7932
Location: Bellevue, IA

PostPosted: Tue Feb 10, 2009 9:49 pm    Post subject:
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    Post subject:
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

Active Member


Joined: 08 May 2006
Posts: 991
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Wed Feb 11, 2009 9:13 pm    Post subject:
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    Post subject:
Reply with quote

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

Active Member


Joined: 08 May 2006
Posts: 991
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Wed Feb 11, 2009 9:23 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Cobol list of programs being called biswajit.dattagupta COBOL Programming 5 Tue Nov 01, 2016 2:10 am
No new posts Can sending 5 MB data between cobol p... Kevin Vaz CICS 12 Tue Oct 18, 2016 4:50 pm
No new posts Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm
No new posts Copybook structure in Load module Vai123 COBOL Programming 7 Fri Sep 16, 2016 8:29 pm
This topic is locked: you cannot edit posts or make replies. ERROR WHILE SUBMITTING LOAD JOB ANURADHA NEELAKANTAN JCL & VSAM 12 Thu Aug 25, 2016 11:50 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us