MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

From which load lib was program executed

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
Pudah
Beginner


Joined: 20 Jun 2003
Posts: 27
Topics: 8
Location: East of the Rock, West of the Hard Place

PostPosted: Mon Sep 18, 2006 5:18 pm    Post subject: From which load lib was program executed Reply with quote

Do any of you know a method to use to get an assembler program to write out what load library it was executed from? I've searched the forum on all of the terms that I could think of and nothing turns up. Same with the HLASM Programmer's Guide and Language Reference. Any of you ever do this?
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Mon Sep 18, 2006 6:58 pm    Post subject: Reply with quote

Pudah,

Check this link

http://www.mvsforums.com/helpboards/viewtopic.php?t=3036&highlight=load

Quote:

Same with the HLASM Programmer's Guide and Language Reference.

Click on the "Quick Manuals" link on top of this page and check under "Assembler" section

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Mon Sep 18, 2006 8:54 pm    Post subject: Reply with quote

If you want the program to do it by itself, then get the address of the program, do a CSVQUERY macro against it. Its been years since I did this, but I think that will give you back enough information to chase this down. There is a control block called the CDE that you want to look for and I think it contains something like the tiot entry # for the data set from which the module was loaded. It is something like that. There are some publicly available programs with source (SHOWMVS for example) that do things like this. Some of the interfaces they use are not intended programming interfaces, but they seem to work for now.
Back to top
View user's profile Send private message Visit poster's website
Pudah
Beginner


Joined: 20 Jun 2003
Posts: 27
Topics: 8
Location: East of the Rock, West of the Hard Place

PostPosted: Tue Sep 19, 2006 4:10 am    Post subject: Reply with quote

kolusu, I really need to improve my search skills, because I should have been able to find that thread. Unfortunately it doesn't help me.

semigeezer, yes, I do want the program to do it itself. That is, if I have the following execution JCL:

Code:
//RUN      EXEC PGM=MYPROG                 
//STEPLIB   DD DSN=SYSTEM.LOAD.LIB,DISP=SHR
//          DD DSN=MY.LOAD.LIB1,DISP=SHR   
//          DD DSN=MY.LOAD.LIB2,DISP=SHR   
//          DD DSN=MY.LOAD.LIB3,DISP=SHR   
//SYSPRINT  DD SYSOUT=*                   
//*                                       


and if we assume that there are copies of MYPROG is contained in MY.LOAD.LIB2 and MY.LOAD.LIB3, I want MYPROG to display something like

EXECUTED FROM: MY.LOAD.LIB2

since it would be picked up from there before the version that is in MY.LOAD.LIB3.

I will look into the CSVQUERY macro and see what I can figure out.
Back to top
View user's profile Send private message Send e-mail
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Tue Sep 19, 2006 12:22 pm    Post subject: Reply with quote

If you will always be using STEPLIB, you can use BLDL on a DCB against STEPLIB and find the concatenation # from there. But if you will eventually be running from link list or other source, CSVQUERY is the way to go.
Back to top
View user's profile Send private message Visit poster's website
bauer
Intermediate


Joined: 10 Oct 2003
Posts: 317
Topics: 50
Location: Germany

PostPosted: Wed Sep 20, 2006 1:17 am    Post subject: Reply with quote

Is any sample coding available ?
Back to top
View user's profile Send private message
Pudah
Beginner


Joined: 20 Jun 2003
Posts: 27
Topics: 8
Location: East of the Rock, West of the Hard Place

PostPosted: Wed Sep 20, 2006 6:25 pm    Post subject: Reply with quote

There is a very complex example in the SHOWMVS program that semigeezer mentioned (you can get it from the CBT tape lib)
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group