Clicky
Skip to Content
Custom Search

Reply to comment

siteadmin
Offline
Joined: 07/25/2010

 

 

 

I have a program DYNA1 which calls another program DYNA2 dynamically. 
 
I compiled the two programs using "DYNAM" option of compiler and link edited the links LDYNA1 and LDYNA2.
 
Please refer below the 
 
1.Compiler options.
2.Calling pgm DYNA1
3.Called pgm DYNA2.
4.Link for DYNA1
5.Link for DYNA2.
 
But when I try to run a program DYNA1, it fails with S0C1 while trying to call DYNA2.
 
I could see the following in the dump created by the job
which kind of seem alerting to me.
 
Inaccessible storage.
 
Installation default             DYNDUMP(*USERID,NODYNAMIC,TDUMP
 
 
Could it be the reason that my installations defaults are such that 
I can not use dynamic calling? Our system I know supports static calling.
 
So was just curious if this could be an issue that dynamic calling is
not permitted 
 
 
 
1.Compiler options used
----------------------------------
 
//PGMCOMP  EXEC PGM=IGYCRCTL,                   
//             PARM=('LIB,RENT,DATA(31),OFFSET',
//             'BUF(32K),OPT,MAP',              
//             'DYNAM,NOADV,NOTERM',            
//             'NUMPROC(NOPFD)',                
//             'NOLIST')                        
 
 
2.COBOL Program "DYNA1" calling program "DYNA2"
-------------------------------------------------------------------------
 
IDENTIFICATION DIVISION.            
                                    
PROGRAM-ID.       DYNA1.            
ENVIRONMENT DIVISION.               
DATA DIVISION.                      
WORKING-STORAGE SECTION.            
01 PGM-NAME PIC X(5) VALUE SPACES.  
PROCEDURE DIVISION.                 
0000-MAIN-LOGIC.                    
    DISPLAY 'DYNAMIC CALLING'       
    DISPLAY 'IN PROGRAM DYNA1'      
    DISPLAY 'CALLING PROGRAM DYNA2
    MOVE 'DYNA2' TO PGM-NAME        
    DISPLAY PGM-NAME                
    CALL 'DYNA2'.                   
    STOP RUN.                       
    
 
3.COBOL Program "DYNA2" called by program "DYNA1"
---------------------------------------------------------------------------
 
 
IDENTIFICATION DIVISION.            
                                    
PROGRAM-ID.       DYNA2.            
ENVIRONMENT DIVISION.               
DATA DIVISION.                      
WORKING-STORAGE SECTION.            
PROCEDURE DIVISION.                 
0000-MAIN-LOGIC.                    
    DISPLAY 'DYNAMIC CALLING'       
    DISPLAY 'IN PROGRAM DYNA2'      
    GOBACK.                         
    
 
4.Link member (LDYNA1) for Program DYNA1
--------------------------------------------------------------
    
 INCLUDE SYSLIB(DYNA1
 ENTRY DYNA1           
 NAME LDYNA1(R)            
 
5.Link member (LDYNA2) for Program DYNA2
--------------------------------------------------------------
 
 
 INCLUDE SYSLIB(DYNA2
 ENTRY DYNA2           
 NAME LDYNA2(R)         

Reply

  • Allowed HTML tags:
      1. Lines and paragraphs break automatically.

    More information about formatting options

    CAPTCHA
    This question is for testing whether you are a human visitor and to prevent automated spam submissions.

Navigation

Click the +1 button  below to share it with your friends and colleagues

 

Share this if you liked it!

 

Disclaimer



Number of Registered users 714
Theme by Dr. Radut.