| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| mgjagadish Beginner
 
 
 Joined: 18 Jan 2003
 Posts: 13
 Topics: 7
 Location: 7/2,rams Apartments,Chennai1-14
 
 | 
			
				|  Posted: Sun Feb 03, 2008 3:06 am    Post subject: fetch and call |   |  
				| 
 |  
				| cAN WE HAVE FETCH AND CALL TOGETHER IN pli programs _________________
 JAGADISH
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| anbesivam Beginner
 
 
 Joined: 09 Aug 2006
 Posts: 66
 Topics: 14
 
 
 | 
			
				|  Posted: Mon Feb 04, 2008 4:59 am    Post subject: |   |  
				| 
 |  
				| Yes. You need to have FETCh and then followed by CALL for the Fetched module. 
 Usaully we cod as follows:
 
 
  	  | Code: |  	  | DCL module_name EXTERNAL ENTRY(PTR) OPTIONS(FETCHABLE); 
 CALL module_name(PTR);
 | 
 
 Or
 
 
  	  | Code: |  	  | DCL module_name EXTERNAL ENTRY(PTR); 
 FETCH module_name;
 
 CALL module_name(PTR);
 | 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Nic Clouston Advanced
 
 
 Joined: 01 Feb 2007
 Posts: 1075
 Topics: 7
 Location: At Home
 
 | 
			
				|  Posted: Mon Feb 04, 2008 5:35 am    Post subject: |   |  
				| 
 |  
				| Actually, you do not need the FETCH if you have RELEASE. The compiler will spot one of these and realise that the called module will not be linked into the main load module and will generate the necessary code. However, it is not wrong and I always do FETCH/CALL/RELEASE in my own programs. _________________
 Utility and Program control cards are NOT, repeat NOT, JCL.
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| kgaugelo Beginner
 
 
 Joined: 14 Jan 2008
 Posts: 1
 Topics: 0
 
 
 | 
			
				|  Posted: Mon Feb 25, 2008 1:32 am    Post subject: |   |  
				| 
 |  
				| how does the call and copy statements work, mostly when it come to copying/calling external programs??? |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Nic Clouston Advanced
 
 
 Joined: 01 Feb 2007
 Posts: 1075
 Topics: 7
 Location: At Home
 
 | 
			
				|  Posted: Mon Feb 25, 2008 3:54 am    Post subject: |   |  
				| 
 |  
				| kgaugelo 
 You should start new thread for a new topic.
 
 COPY is a directive to the compiler to copy in some source code into your source code before it compiles it.
 
 CALLing a program happens when your program is already executing and it CALLs another program to do some function.
 
 This is probably something that you could have found out by looking in the index of the manual for COPY and CALL.
 _________________
 Utility and Program control cards are NOT, repeat NOT, JCL.
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		|  | 
	
		|  |