|
Hi Joe, the program+library information you require is in your job data, the program stack. It would surely be an easy task to write a small CL utility to print the program stack, copy it to a PF, then read through the PF looking for the program name (a passed parameter?) and to return the library name. There is almost certainly a job-API that can help, but that may take a bit longer to get working. Kind Regards, Jeff Bull AS/400 Software Support Consultant IBM Certified AS/400 System Administrator Mailto:jeff.bull@itm-group.co.uk Website: http://www.itm-group.co.uk ITM Group, Chalfont Grove, Narcot Lane, Chalfont St Peter, SL9 8TY, United Kingdom SwBd: +44 [0208] 476 2000 ; Fax: +44 [0208] 476 2111 ; Mbl: +44 [0786] 750 4961 -----Original Message----- From: Joe Pluta [mailto:joepluta@PlutaBrothers.com] Sent: 15 November 2001 16:31 To: midrange-l@midrange.com Subject: Getting the library name from a CL program Here's a silly question. I've always been able to get the library a program was called from in RPG by using the program status data structure. In a C/S environment, this is really important, because it allows you to have multiple environments based on just the library you call your initial program from. However, I have never figured out a way to do the same thing from a CL. Anybody have any sneaky ways of doing this, or do I just use my tried and true method of wrapping the CL program in an RPG wrapper that determines the library? Joe _______________________________________________ This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l or email: MIDRANGE-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l. _____________________________________________________________________ This message has been checked for all known viruses by Star Internet delivered through the MessageLabs Virus Scanning Service. For further information visit http://www.star.net.uk/stats.asp or alternatively call Star Internet for details on the Virus Scanning Service. DISCLAIMER Any opinions expressed in this email are those of the individual and not necessarily the Company. This email and any files transmitted with it, including replies and forwarded copies (which may contain alterations) subsequently transmitted from the Company, are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivering to the intended recipient, be advised that you have received this email in error and that any use is strictly prohibited. If you have received this email in error please notify the IT manager by telephone on +44 (0)208 4762000 or via email to Administrator@itm-group.co.uk, including a copy of this message. Please then delete this email and destroy any copies of it. _____________________________________________________________________ This message has been checked for all known viruses by Star Internet delivered through the MessageLabs Virus Scanning Service. For further information visit http://www.star.net.uk/stats.asp or alternatively call Star Internet for details on the Virus Scanning Service.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.