View previous topic :: View next topic |
Author |
Message |
misi01 Advanced
Joined: 02 Dec 2002 Posts: 629 Topics: 176 Location: Stockholm, Sweden
|
Posted: Tue Mar 06, 2012 5:19 am Post subject: SCHENV parameter |
|
|
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 |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Tue Mar 06, 2012 7:28 am Post subject: |
|
|
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 |
|
 |
misi01 Advanced
Joined: 02 Dec 2002 Posts: 629 Topics: 176 Location: Stockholm, Sweden
|
Posted: Tue Mar 06, 2012 10:26 am Post subject: Thanks Dick - |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
misi01 Advanced
Joined: 02 Dec 2002 Posts: 629 Topics: 176 Location: Stockholm, Sweden
|
Posted: Wed Mar 07, 2012 5:14 am Post subject: Thanks to both |
|
|
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 |
|
 |
|
|