| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| zatlas Beginner
 
 
 Joined: 17 Dec 2002
 Posts: 43
 Topics: 4
 
 
 | 
			
				|  Posted: Mon Jul 18, 2011 6:08 am    Post subject: Rexx and C on mainframe |   |  
				| 
 |  
				| I am new to Rexx and mainframe Rexx, but I need to learn fast. Please point me to the correct documentation or guide me.
 I need to call programs that are coded in C from mainframe Rexx in z/OS (NOT using Unix Services.)
 
 Is there a way to call C program directly from Rexx?  [i.e. CALL xxx or rc=xxx()]  If so how is it done?
 
 If not what would be the standard so I can issue "XXX ()" and access the result or same question with using ADDRESS.
 
 Thanks
 ZA
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| kolusu Site Admin
 
  
 
 Joined: 26 Nov 2002
 Posts: 12394
 Topics: 75
 Location: San Jose
 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| superk Advanced
 
  
 Joined: 19 Dec 2002
 Posts: 684
 Topics: 5
 
 
 | 
			
				|  Posted: Mon Jul 18, 2011 1:17 pm    Post subject: |   |  
				| 
 |  
				| I'm curious, how is a program coded in 'C' different from other programs coded in languages like COBOL or PLI or Assembler? |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| zatlas Beginner
 
 
 Joined: 17 Dec 2002
 Posts: 43
 Topics: 4
 
 
 | 
			
				|  Posted: Mon Jul 18, 2011 3:50 pm    Post subject: |   |  
				| 
 |  
				| Thanks Kolusu, I specifically need mainframe, z/OS, no Unix services (good ol' Rexx)!
 
 Superk, yes it is not different.  Please guide me to how to do it in any z/os native language and I will be good.  When I say guid me, I mean point me to the correct book/chapter or article.  I will do the rest.
 
 ZA
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| papadi Supermod
 
 
 Joined: 20 Oct 2009
 Posts: 594
 Topics: 1
 
 
 | 
			
				|  Posted: Mon Jul 18, 2011 4:47 pm    Post subject: |   |  
				| 
 |  
				| Suggest you ask others who use your system to show you a couple of examples of existing rexx calling COBOL or Assembler modules. 
 What you need to do will be very similar. . .
 
 At run time, the system does not care much about the source language. A proper load module should work with no problems. Possibly a good first test is the popular "Hello World" program.
 
 There may be prior topics in the forum that can help. Here is one:
 http://www.mvsforums.com/helpboards/viewtopic.php?t=8020
 _________________
 All the best,
 
 di
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| zatlas Beginner
 
 
 Joined: 17 Dec 2002
 Posts: 43
 Topics: 4
 
 
 | 
			
				|  Posted: Mon Jul 18, 2011 11:15 pm    Post subject: |   |  
				| 
 |  
				| Hi Papadi Unfortunately, there is no one here to help me, a remote lowly consultant.  On the other hand the link-chain you've mentioned, seems to be very interesting.  I will try it within a short time.
 thank you
 ZA
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| rlilley Beginner
 
 
 Joined: 05 Apr 2010
 Posts: 19
 Topics: 3
 
 
 | 
			
				|  Posted: Tue Jul 19, 2011 4:38 am    Post subject: |   |  
				| 
 |  
				| Here are a couple examples of how I call my C programs from REXX code 
 if running under ISPF:
 
 address ispexec "SELECT PGM(Cpgmname) PARM(pgmparms)"
 
 using LINKMVS:
 
 ADDRESS LINKMVS 'Cpgmname' P1 P2 P3 P4
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| zatlas Beginner
 
 
 Joined: 17 Dec 2002
 Posts: 43
 Topics: 4
 
 
 | 
			
				|  Posted: Tue Jul 19, 2011 8:19 am    Post subject: |   |  
				| 
 |  
				| Thank you all ZA
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| asr2 Beginner
 
 
 Joined: 25 Jun 2011
 Posts: 26
 Topics: 4
 Location: Germany
 
 | 
			
				|  Posted: Fri Jul 22, 2011 2:46 am    Post subject: |   |  
				| 
 |  
				| My book, Practical Usage of TSO REXX, also available as e-book (PDF), provides a very comprehensive discussion, with code examples, of using REXX with various programming languages (Assembler, C, COBOL, PLI). 
 Regards
 Tony
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		|  | 
	
		|  |