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 

SCHENV parameter

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


Joined: 02 Dec 2002
Posts: 629
Topics: 176
Location: Stockholm, Sweden

PostPosted: Tue Mar 06, 2012 5:19 am    Post subject: SCHENV parameter Reply with quote

Our job statements can basically look similar to the following
Code:

//xxxxxxxx JOB (xxxx),CLASS=0,MSGCLASS=T,SCHENV='OSI',     
//         NOTIFY=&SYSUID,REGION=1024K                         

I have Gilbert Saint-Flour's excellent program that
Quote:
THIS PROGRAM RETRIEVES SPECIFIC JOB-RELATED DATA FROM MVS
CONTROL BLOCKS AND MOVES IT TO WORKING-STORAGE.


but I can't find out how to pick up the SCHENV. I've tried displaying as much info as I can get in the areas for PSA, TCB, TIOT etc etc , but nowhere can I see a reference to OSI (in this example).

Anyone able to help me please ?

BTW - perhaps I should mention that the reason I'm after this info is that I want to know whether I'm running in a test or prod environment without performing any IMS or DB2 calls (my program is a bog-standard read/write files program)
Back to top
View user's profile Send private message Send e-mail
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Tue Mar 06, 2012 7:28 am    Post subject: Reply with quote

though the lpar name is different than the SCHENV,
determining the lpar should suffice, no?

find lpar in cobol program

schenv is a WLM value
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
misi01
Advanced


Joined: 02 Dec 2002
Posts: 629
Topics: 176
Location: Stockholm, Sweden

PostPosted: Tue Mar 06, 2012 10:26 am    Post subject: Thanks Dick - Reply with quote

have copied the program and tested it. I'll have to wait and see as to whether the results indicate in which environment I'm running. I'll get back on 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: Tue Mar 06, 2012 1:11 pm    Post subject: Reply with quote

misi01,

If your intention is to pick the LPAR then you can check this link

http://www.mvsforums.com/helpboards/viewtopic.php?t=536&highlight=lpar

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
misi01
Advanced


Joined: 02 Dec 2002
Posts: 629
Topics: 176
Location: Stockholm, Sweden

PostPosted: Wed Mar 07, 2012 5:14 am    Post subject: Thanks to both Reply with quote

The end result will be that I look at the accounting info (we run TEST and PROD in the same machine, so the LPAR won't be unique).

Our accounting info has to be either USER or TEST-xxx in test, so I can test for those - if it ain't either of them, then it's prod. This is what the code ending up looking like
Code:

      *                                                             
       01  cb1.                                                     
           05  ptr1        pointer occurs 256.                       
      *                                                             
       01  cb2.                                                     
           05  ptr2        pointer occurs 256.                       
      *                                                             
       01  sigrs040.                                                 
           copy sigrs040.                                           
      *                                                             
      ***************************************************************
      * PROCEDURE DIVISION                                           
      ***************************************************************
       procedure division  using sigrs040.                           
                                                                     
           move ' '                    to sigrs040                   
      *    PSA                                                       
           set address of cb1          to null                       
      *    TCB                                                       
           set address of cb1          to ptr1(136)                 
      *    JSCB                                                     
           set address of cb2          to ptr1(46)                   
      *    JCT                                                       
           set address of cb2          to ptr2(66)                   
                                                                     
      *    ACT                                                       
           move 0                      to full-word                 
           move cb2(57:3)              to four-bytes(2:3)         
           set address of cb2          to ptr4                     
      *    Send the accounting info back (for confirmation of the 
      *    test/prod setting)                                     
           move cb2(50:8)              to s040-account-info       
                                                                   
      *    Note that we DELIBERATELY test for USER or TEST in the 
      *    account info. UNLESS we find this, we assume the job is
      *    being run in PROD rather than test   
           evaluate true                                           
             when s040-account-info(1:4) = 'USER'                 
             when s040-account-info(1:4) = 'TEST'                 
               set s040-test           to true                     
             when other                                           
               set s040-produktion     to true                     
           end-evaluate           
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