| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| johnscott Beginner
 
 
 Joined: 11 Mar 2003
 Posts: 1
 Topics: 1
 
 
 | 
			
				|  Posted: Tue Mar 11, 2003 9:20 am    Post subject: Cobol return system id |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		| kolusu Site Admin
 
  
 
 Joined: 26 Nov 2002
 Posts: 12394
 Topics: 75
 Location: San Jose
 
 | 
			
				|  Posted: Tue Mar 11, 2003 10:26 am    Post subject: |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		|  | 
	
		|  |