Using SRAM With Dynamic Calls from VISION:Report
search cancel

Using SRAM With Dynamic Calls from VISION:Report

book

Article ID: 31002

calendar_today

Updated On:

Products

Vision:Report

Issue/Introduction

How to use SRAM with dynamic calls from VISION:Report. 

Resolution

SRAM can be used with programs, applications, and products that use dynamic calls. 

The calling program is not required to statically linked SRAM's SRAMASCB module for dynamic calls.
All that is required is that the CALL entries be link-edited to the SRAMASCB module as an ALIAS.              

For instance, following SRAM CALL entries:

  • SRTOPEN or CAOPN
  • SRTFILL or CAFIL
  • SRTGETR or CAGET
  • SRTCLSE or CACLS
  • SRTROPN or CAROP

would be linked to SRAMASCB as follows:

//IEWL  EXEC PGM=IEWL,REGION=2048K,                            

//             PARM='MAP,LET,LIST,NCAL'                          

//SYSLIB   DD  DSN=CAI.SRAMLIB,DISP=SHR  

//SYSLMOD  DD  DSN=CAI.SRAMLIB,DISP=SHR  

//SYSLIN   DD  *                                                 

INCLUDE SYSLIB(SRAMASCB)                                      

ALIAS    SRTOPEN                                              

ALIAS    SRTFILL                                              

ALIAS    SRTGETR                                              

ALIAS    SRTCLSE 

ALIAS    SRTROPN                                             

NAME SRAMASCB(R)                                              

//SYSUT1   DD  UNIT=SYSDA,SPACE=(CYL,(1,1))          

//SYSPRINT DD  SYSOUT=*

//           

 

VISION:Report can then be used with SRAM:

 

    OPTION IFNUM=YES,SPIE=NO,TRACECT=1                                 

   EQU FILLER       WST                                                

   EQU SRAMPARM    (56)                                               

   EQU SRAMPARM                                                       

   EQU DDNAME       (8)   C'SRAMWORK'                                  

   EQU CORE         (4)-B X'00040000'                                 

   EQU RECLEN       (2)-B X'0160'                                     

   EQU MODESRT      (2)-B X'FFFF'                                     

   EQU KEYFLD      (40)   C'(4,7,C,A,11,26,C,A)'                      

   EQU RECORD     (352)                                               

   EQU RECORD                                                         

   EQU FINDEOF      (2)-B                                             

   EQU FILLER       (1)                                               

   EQU SORT-KEY     (7)                                               

                                                                      

       CALL SRTOPEN SRAMPARM               /* OPEN SRAMWORK FILE      

                                                                       

 100                                                                   

      GET INF ATEND 200                                                

      MOVE INF1-352 TO RECORD  

      MOVE RECORD TO PRT1 X'0064'                                      

      PRINT                                                            

      CALL SRTFILL SRAMPARM RECORD       /* FILL SRAMWORK WITH A RECORD

      GOTO 100                                                         

200                                                                     

      MOVE MODESRT TO FINDEOF                                          

      MOVE HIGH-VALUES TO SORT-KEY       /* HIGH-VALUES TO SORT KEY    

      CALL SRTFILL SRAMPARM RECORD       /* FILL SRAMWORK WITH EOF REC 

300                                                                    

      CALL SRTGETR SRAMPARM RECORD       /* GET SRAMWORK SORTED RECORD 

      IF FINDEOF IS NOT EQ MODESRT                                      

         GOTO 300                                                      

       ENDIF                                                           

                                                                        

      CALL SRTCLSE SRAMPARM               /* CLOSE SRAMWORK FILE       

400                                                                  

      CALL SRTROPN SRAMPARM               /* REOPEN SRAMWORK FILE    

      MOVE C'SORTED' TO PRT1                                         

      PRINT                                                          

500                                                                  

      CALL SRTGETR SRAMPARM RECORD       /* GET SRAMWORK SORTED RECORD

      IF FINDEOF IS NOT EQ MODESRT                                   

         MOVE RECORD TO PRT1 X'0064'                                  

         PRINT                                                       

         GOTO 500                                                    

      ENDIF                                                          

                                                                      

 

      CALL SRTCLSE SRAMPARM               /* CLOSE SRAMWORK FILE