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 

Cobol return system id

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


Joined: 11 Mar 2003
Posts: 1
Topics: 1

PostPosted: Tue Mar 11, 2003 9:20 am    Post subject: Cobol return system id Reply with quote

Hello.

I am looking for a simple cobol sample to return the name of the mvs lpar or system that the program is running on.

Has anyone done something like this ?
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Tue Mar 11, 2003 10:26 am    Post subject: Reply with quote

Johnscott,

The following Cobol program will give you the MVS LPAR or system that the program is runninn on.

Code:

IDENTIFICATION DIVISION.
PROGRAM-ID. COBSITE.
AUTHOR. KOLUSU
ENVIRONMENT DIVISION.
DATA DIVISION.
LINKAGE SECTION.
01  PSA-BLOCK.
    05                      PIC  X(16).
    05  CVT-ADDRESS         POINTER.
01  CVT-BLOCK.
    05                      PIC  X(196).
    05  CVT-SMF-ADDRESS     POINTER.
01  SMF-BLOCK.
    05                      PIC  X(16).
    05  SMF-ID              PIC  X(04).

PROCEDURE DIVISION.

     SET ADDRESS OF PSA-BLOCK  TO NULL.
     SET ADDRESS OF CVT-BLOCK  TO CVT-ADDRESS.
     SET ADDRESS OF SMF-BLOCK  TO CVT-SMF-ADDRESS.
     DISPLAY "JOB RUNNING ON:" SMF-ID.
     GOBACK.



or you can simply check the variables ZSYSID ,ZSYSNODE,ZSYSPLEX in the option 7.3 from your ISPF primary menu.

Hope this helps...

cheers

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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