home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / pc3270sa.zip / srpsmp / ibmabase.asm < prev    next >
Assembly Source File  |  2002-02-28  |  38KB  |  460 lines

  1. ***********************************************************************         
  2. * TITLE: IBMABASE MAINLINE                                                      
  3. *                                                                               
  4. * LOGIC: Determine the function requested, and perform that function.           
  5. *                                                                               
  6. * OPERATION:                                                                    
  7. * 1. Establish addressability to the server parameters.                         
  8. * 2. Determine that we have a server request.                                   
  9. * 3. Establish addressability to the CPRB.                                      
  10. * 4. If the cms files are not open:                                             
  11. *      - Open them.                                                             
  12. * 5. Determine the function requested.                                          
  13. * 6. If function 1 is requested:                                                
  14. *      - Issue the FSREAD macro to read in a record.                            
  15. *      - If the end of file was encountered:                                    
  16. *          a. Close the data sets.                                              
  17. *          b. Set end of file return code                                       
  18. *      - Else, no end of file encountered:                                      
  19. *          a. If the transaction should be logged:                              
  20. *               - Issue the FSWRITE macro to output the log message.            
  21. *          b. Translate the reply data into ASCII.                              
  22. * 7. If function 2 is requested:                                                
  23. *      - Translate the request data into EBCDIC.                                
  24. *      - Issue the FSWRITE macro to write the record.                           
  25. *      - If the transaction should be logged:                                   
  26. *          a. Issue the FSWRITE macro to output the log message.                
  27. * 8. Else set invalid function return code.                                     
  28. * 9. Return to the caller with return code.                                     
  29. ***********************************************************************         
  30. IBMABASE CSECT                                                                  
  31.          STM   R14,R12,R12(R13)      Save the caller's registers                
  32.          LR    R11,R15               Load base register                         
  33.          USING IBMABASE,R11,R12      Establish addressability                   
  34.          L     R12,BASE2                                                        
  35.          ST    R13,SAVEAREA+4        Save the callers savearea address          
  36.          LA    R9,SAVEAREA           Obtain our savearea address                
  37.          ST    R9,R8(,R13)           Chain it in the caller's savearea          
  38.          LR    R13,R9                Point register 13 to our savearea          
  39. ***********************************************************************         
  40. * GET THE SERVER PARAMETER LIST                                                 
  41. ***********************************************************************         
  42.          USING PARAMTR,R1            ADDRESSABILITY TO PARM LIST                
  43.          OI    STATUS,TERMIN8        Assume Termination (no CPRB)               
  44.          CLC   REQTYP,=2F'-1'        Test for no parameter                      
  45.          BNE   PROCPARM              YES, PROCESS THE PARAMETER                 
  46.          B     REQ                   Assume request, not from SENDREQ           
  47. BASE2    DC    A(IBMABASE+4096)                                                 
  48. PROCPARM MVC TYPE,REQTYP             SAVE NOTIFICATION TYPE                     
  49.          DROP  R1                                                               
  50.          CLC   TYPE,SENDREQ          Check for SENDREQ Notification             
  51.          BE    REQ                   YES-> Must be from SENDREQ                 
  52. ***********************************************************************         
  53. * IF THIS IS AN ENDCMD NOTIFICATION THEN ISSUE A MESSAGE STATING                
  54. * THIS AND RETURN.  CLOSE THE FILES AND CLEAN UP LOCKS HERE.                    
  55. ***********************************************************************         
  56.          CLC   TYPE,ENDCMD           Check for ENDCMD notification              
  57.          BNE   CHKWSC                If not ENDCMD go to next check             
  58.          MVC   REPMSG(30),MSGEND     Set message - this is ENDCMD               
  59.          B     CLOSELOG              Log the message and end                    
  60. ***********************************************************************         
  61. * IF THIS IS A WORK STATION COMMUNICATION TERMINATION NOTIFICATION              
  62. * THEN ISSUE A MESSAGE STATING THIS AND RETURN                                  
  63. ***********************************************************************         
  64. CHKWSC   CLC   TYPE,WSCOMM           Check for WSCOMM notification              
  65.          BNE   CHKPUR                If not WSCOMM go to next check             
  66.          MVC   REPMSG(30),MSGWSC     Set message - this is WSCOMM               
  67.          DELENTRY IBMABASE           Drop the notification entry                
  68.          LTR   R15,R15               Was it Successful?                         
  69.          BZ    CLOSELOG              Log the message and end                    
  70.          CH    R15,=H'4'             Reply sent not confirmed                   
  71.          BNE   CHKWSC01              NO-> Check other                           
  72.          LA    R9,MSGSNOC            Tell sent but not confirmed                
  73.          B     CHKWSC99              Update the error log                       
  74. CHKWSC01 CH    R15,=H'8'             NO Reply successfully sent                 
  75.          BNE   CHKWSC02              NO-> Check other                           
  76.          LA    R9,MSGNRSS            Tell no reply successfully sent            
  77.          B     CHKWSC99              Update the error log                       
  78. CHKWSC02 LA    R9,MSGEDEL            Tell DELENTRY other errors                 
  79. CHKWSC99 BAL   R10,LOGINFO           GO UPDATE LOG FILE                         
  80.          B     LOGMSG                LOG THE MESSAGE AND END                    
  81. ***********************************************************************         
  82. * IF THIS IS AN ABNORMAL TERMINATION (CMS ABEND) NOTIFICATION                   
  83. * THEN ISSUE A MESSAGE STATING THIS AND RETURN                                  
  84. ***********************************************************************         
  85. CHKPUR   CLC   TYPE,PURGE            Check for PURGE notification               
  86.          BNE   CHKRESET              If not PURGE go to next check              
  87.          MVC   REPMSG(30),MSGPUR     Set message - this is PURGE                
  88.          B     CLOSELOG              Log the message and end                    
  89. ***********************************************************************         
  90. * IF THIS IS AN EXPLICIT SERVER UNLOAD (NUCXDROP) NOTIFICATION                  
  91. * YOU NEED TO CLEAN UP STORAGE HERE IF ANY WAS OBTAINED                         
  92. * THEN ISSUE A MESSAGE STATING THIS AND RETURN                                  
  93. ***********************************************************************         
  94. CHKRESET CLC   TYPE,RESET            Check for RESET notification               
  95.          BNE   REQ                   If not RESET go it is a request            
  96.          MVC   REPMSG(30),MSGRES     Set message - this is RESET                
  97.          B     LOGMSG                Log the message and end                    
  98. ***********************************************************************         
  99. * WE HAVE A REQUEST.  GET ADDRESS OF EXTENDED PARAMETER LIST.  GET              
  100. * ADDRESS OF CPRB AND CHECK SELF IDENTIFIER FIELD TO VERIFY THAT IT             
  101. * IS A CPRB.                                                                    
  102. ***********************************************************************         
  103. REQ      LTR   R3,R0                 Load address of EPLIST                     
  104.          BZ    NOCPRBM               IF NO EPLIST SET MESSAGE                   
  105.          USING PTRS,R3               Addressability of eplist                   
  106.          ICM   R2,B'1111',CRBPTR     Get address of CPRB                        
  107.          BZ    NOCPRBM               If not CPRB  set message                   
  108.          DROP  R3                                                               
  109.          USING CPRB,R2               Addressability to CPRB                     
  110.          CLC   CRBCPRB,CPRBCHK       Check self identifier                      
  111.          BNE   NOCPRBM               Fail->  Send error codes                   
  112.          L     R4,CRBRPDAT           Get Reply Data pointer                     
  113.          L     R5,CRBRQDAT           Get Request Data pointer                   
  114.          L     R6,CRBRQPRM           Get Request Parm pointer                   
  115.          NI    STATUS,255-TERMIN8    Reset Termination entry                    
  116.          B     GETFILES              If OK continue                             
  117. NOCPRBM  MVC   REPMSG,MSGCPR         Else set message - no CPRB found           
  118.          B     NOCPRB                If not CPRB then return                    
  119. ***********************************************************************         
  120. * WE HAVE A SERVER REQUEST AND A CPRB.  NEXT PREPARE THE CMS FILES              
  121. ***********************************************************************         
  122. GETFILES TM    STATUS,OPENED         Are the files already opened?              
  123.          BO    OPEN                  Yes, then don't try to open them           
  124.          FSOPEN FSCB=INPUT,ERROR=OPENERR   Open the INPUT file                  
  125.          FSOPEN FSCB=OUTPUT          Open the OUTPUT file                       
  126.          FSOPEN FSCB=LOG             Open the LOG file                          
  127.          ADDENTRY IBMABASE           Add the notification entry                 
  128.          OI    STATUS,OPENED         Indicate that they are open                
  129. OPEN     CLC   CRBFID,=H'1'          Is function one requested?                 
  130.          BE    FUNCTN1               Yes, branch to the function.               
  131.          CLC   CRBFID,=H'2'          Is function two requested?                 
  132.          BE    FUNCTN2               Yes, branch to the function.               
  133.          LA    R9,MSGBAD             Invalid Request                            
  134.          BAL   R10,LOGINFO           Go Log the information message             
  135.          LA    R15,8                 Else, bad function id.                     
  136.          B     CLOSEXIT              Close and Exit the server.                 
  137. ***********************************************************************         
  138. * Process Requestors TYPE 1  function                                           
  139. ***********************************************************************         
  140. FUNCTN1  FSREAD FSCB=INPUT,BUFFER=REPLY   Get the record.                       
  141.          CH    R15,=H'12'            End of file?                               
  142.          BE    ENDOFILE              Go to end of file routine.                 
  143.          LTR   R15,R15               Any other errors?                          
  144.          BNZ   ERRORRC1              YES-> Tell requestor                       
  145.          CLI   0(R6),X'01'           Should we log the transaction?             
  146.          NOP   NOINLOG               No, branch around logging.                 
  147.          BAL   R10,LOGTRANS          Put data pass into Log file                
  148. NOINLOG  XC CRBSRTNC,CRBSRTNC        ZERO is a good return code                 
  149.          L     R7,INPUT+(FSCBSIZE-FSCBD)   Get the size                         
  150.          C     R7,CRBRPDLN           Will it fit in request area?               
  151.          BE    CPRBPDLN              YES-> Return data                          
  152.          LA    R9,MSGLEN             Set up log message                         
  153.          BAL   R10,LOGINFO           Go Log the information message             
  154.          MVC   CRBSRTNC,=AL4(CSMSREPD)   Tell data too big for buffer           
  155.          LA    R15,CSMSREPD          Set Reg return code also                   
  156. CPRBPDLN BCTR R7,0                   For execute                                
  157.          LR    R8,R7                 Exclude Balance field from the             
  158.          SH    R8,=H'4'                ASCII translation                        
  159.          EX    R8,ETOA               Translate the record to ASCII.             
  160.          EX    R7,TOCPRB             Set return data in CPRB                    
  161.          LA    R7,1(,R7)             Restore length of the reply,               
  162.          ST    R7,CRBRPDLN           and store it into the CPRB.                
  163.          LA    R7,0                  Set the reply parameter length,            
  164.          ST    R7,CRBRPPLN           and store it into the CPRB.                
  165.          LTR   R15,R15               Is there an error?                         
  166.          BNZ   CLOSEXIT              YES-> Close and Exit the server.           
  167.          TM    STATUS,TERMIN8        Is there a CPRB present?                   
  168.          BO    CLOSEXIT              NO-> Close and Exit the server.            
  169.          XC    CRBSRTNC(4),CRBSRTNC  Clear Return code for Requestor            
  170.          B     EXIT                  Exit the server.                           
  171.          SPACE 2                                                                
  172. ***********************************************************************         
  173. * Process Requestors TYPE 2  function                                           
  174. ***********************************************************************         
  175. FUNCTN2  L     R7,CRBRPDLN           Get the size                               
  176.          BCTR  R7,0                  Minus one for execute                      
  177.          L     R9,CRBRPDAT           Get data pointer                           
  178.          EX    R7,FROMCPRB           Move data from CPRB.                       
  179.          LR    R8,R7                 Exclude Balance field from the             
  180.          SH    R8,=H'4'                EBCDIC translation                       
  181.          EX    R8,ATOEDAT            Translate the record to EBCDIC.            
  182.          LA    R7,1(,R7)             Restore length of the reply,               
  183.          FSWRITE FSCB=OUTPUT,BUFFER=LOGBUFF,BSIZE=(R7)   Update Record          
  184.          CLI   0(R6),X'01'           Should we log the transaction?             
  185.          NOP   NOOUTLOG              No, branch around logging.                 
  186.          BAL   R10,LOGTRANS          Put data pass into Log file                
  187. NOOUTLOG LA R15,0                    Set the return code.                       
  188.          TM    STATUS,TERMIN8        Is there a CPRB present?                   
  189.          BO    EXIT                  NO-> Exit now                              
  190.          XC    CRBSRTNC,CRBSRTNC     ZERO is a good return code                 
  191.          B     EXIT                  Return to the Requestor                    
  192. ***********************************************************************         
  193. *                           ERROR processing                                    
  194. ***********************************************************************         
  195. OPENERR  ST    R15,SAVERC            Save the Return code                       
  196.          LA    R9,MSGFNF             Set up log message                         
  197.          CH    R15,=H'28'            Is the file missing?                       
  198.          BE    OPENERR1              Yes send error message                     
  199.          LA    R9,MSGOPN             Set up log message                         
  200. OPENERR1 ST    R15,SAVERC            Preserve requestors return code            
  201.          BAL   R10,LOGINFO           Go Log the information message             
  202.          L     R15,SAVERC            Preserve requestors return code            
  203. ERRORRC1 ST   R15,SAVERC             Save the Return code                       
  204.          DELENTRY IBMABASE           Drop the notification entry                
  205.          LTR   R15,R15               Was it Successful?                         
  206.          BZ    ERRORRC2              Nothing to add                             
  207.          A     R15,SAVERC            Include Close RC with Error RC             
  208. ERRORRC2 TM    STATUS,TERMIN8        Is there a CPRB present?                   
  209.          BO    CLOSEXIT              NO-> EXIT now                              
  210.          ST    R15,CRBSRTNC          Set RC in CPRB Requestor                   
  211.          B     CLOSEXIT                                                         
  212. ***********************************************************************         
  213. * End Of File processing from the INPUT FILE A                                  
  214. ***********************************************************************         
  215. ENDOFILE BAL   R10,CLOSE             Go Close all of the files                  
  216.          MVI   STATUS,CLOSED         Indicate that they are closed.             
  217.          LTR   R15,R15               Any Close errors?                          
  218.          BNZ   ERRORRC1              YES-> Send additional codes                
  219.          LA    R15,4                 Set end of file return code.               
  220.          MVC   CRBSRTNC,=A(4)        Set EOF in CPRB Requestor RC               
  221.          B     EXIT                                                             
  222. ***********************************************************************         
  223. * CLOSE all of the files                                                        
  224. ***********************************************************************         
  225. CLOSE    FSCLOSE FSCB=INPUT          Close the INPUT file.                      
  226.          ST    R15,CLOSERC           Save the return code                       
  227.          FSCLOSE FSCB=OUTPUT         Close the OUTPUT file.                     
  228.          A     R15,CLOSERC           Accumulate RC                              
  229.          ST    R15,CLOSERC           Save the return code                       
  230.          FSCLOSE FSCB=LOG            Close the LOG file.                        
  231.          A     R15,CLOSERC           Send any Errors back to caller             
  232.          BR    R10                   Return to the caller.                      
  233. ***********************************************************************         
  234. * Log informational message in LOG FILE A                                       
  235. ***********************************************************************         
  236. CLOSELOG ST    R15,SAVERC            Preserve requestors return code            
  237.          BAL   R10,CLOSE             Go Close all of the files                  
  238.          A     R15,SAVERC            Include Close RC with Error RC             
  239. LOGMSG   LA    R9,REPMSG             Set up log message                         
  240.          TM    STATUS,TERMIN8        Is there a CPRB present?                   
  241.          BO    LOGERR                NO-> Log it now                            
  242.          XC    CRBSRTNC,CRBSRTNC     ZERO is a good return code                 
  243.          B     LOGERR                Write message to log                       
  244. NOCPRB   LA    R9,REPMSG             CPRB not found message.                    
  245.          LA    R15,CSMLGENR          Tell No CPRB                               
  246.          TM    STATUS,TERMIN8        Is there a CPRB present?                   
  247.          BO    LOGERR                NO-> Log it now                            
  248.          MVC   CRBSRTNC,=AL4(CSMLGENR) No communications established            
  249. LOGERR   ST    R15,SAVERC            Preserve requestors return code            
  250.          BAL   R10,LOGINFO           Go Log the information message             
  251.          L     R15,SAVERC            Restore the saved return code              
  252. CLOSEXIT CLI   STATUS,CLOSED         Check if files are closed.                 
  253.          BE    EXIT                  BR-> FIles all closed                      
  254.          LTR   R15,R15               Did we have an error?                      
  255.          BZ    EXIT                  BR-> no error                              
  256.          ST    R15,SAVERC            Preserve requestors return code            
  257.          BAL   R10,CLOSE             Go Close all of the files                  
  258.          MVI   STATUS,CLOSED         Indicate that they are closed.             
  259.          A     R15,SAVERC            Include Close RC with Error RC             
  260. EXIT     L     R13,SAVEAREA+4        Restore caller's saveareas.                
  261.          L     R14,R12(,R13)         Restore the caller's registers             
  262.          LM    R0,R12,20(R13)        except for 15 (return code).               
  263.          BR    R14                   Return to caller with return code.         
  264. ***********************************************************************         
  265. * Log transaction of data to LOG FILE A                                         
  266. ***********************************************************************         
  267. LOGTRANS STM   R0,R15,SUBSAVE        Preserve all the callers regs              
  268.          CLC   CRBFID,=H'1'          Is function one requested?                 
  269.          BNE   LOGOUTFN              NO-> Check 2                               
  270.          LA    R9,INLOG              Point to heading                           
  271.          BAL   R10,LOGINFO           Log Transaction                            
  272.          OI    STATUS,LOGINP         Mark it written                            
  273.          L     R7,INPUT+(FSCBSIZE-FSCBD) Get the size                           
  274.          BCTR  R7,0                  Minus one for execute                      
  275.          LA    R9,REPLY              Get Record read                            
  276.          EX    R7,FROMCPRB           Move data from REPLY buffer                
  277.          LA    R7,1(,R7)             Restore length of the reply,               
  278.          BAL   R10,LOGBYSIZ          Log message by size                        
  279. LOGOUTFN CLC   CRBFID,=H'2'          Is function two requested?                 
  280.          BNE   LOGREST               NO-> Check for the rest to log             
  281.          LA    R9,OUTLOG             Point to heading                           
  282.          BAL   R10,LOGINFO           Log Transaction                            
  283.          OI    STATUS,LOGOUT         Mark it written                            
  284.          L     R7,CRBRPDLN           Get the size                               
  285.          BCTR  R7,0                  Minus one for execute                      
  286.          L     R9,CRBRPDAT           Get data pointer                           
  287.          EX    R7,FROMCPRB           Move data from CPRB.                       
  288.          LR    R8,R7                 Exclude Balance field from the             
  289.          SH    R8,=H'4'                EBCDIC translation                       
  290.          EX    R8,ATOEDAT            Translate the record to EBCDIC.            
  291.          LA    R7,1(,R7)             Restore length of the reply,               
  292.          BAL   R10,LOGBYSIZ          Log message by size                        
  293. LOGREST  ICM   R7,B'1111',CRBRQDLN   Get requester data length.                 
  294.          BZ    NOREQDAT              No request data.                           
  295.          BCTR  R7,0                  For execute                                
  296.          ICM   R9,B'1111',CRBRQDAT   Get data pointer                           
  297.          BZ    NOREQDAT              BR-> No data pointer                       
  298.          EX    R7,FROMCPRB           Move data from CPRB.                       
  299.          LR    R8,R7                 Exclude Balance field from the             
  300.          SH    R8,=H'4'                EBCDIC translation                       
  301.          EX    R8,ATOEDAT            Translate the record to EBCDIC.            
  302.          LA    R7,1(,R7)             Restore length of the reply,               
  303.          ST    R7,LOG+(FSCBSIZE-FSCBD) Set size.                                
  304.          BAL   R10,LOGBYSIZ          Log message by size                        
  305. NOREQDAT ICM   R7,B'1111',CRBRQPLN   Get requester parameter length.            
  306.          BZ    NOPARDAT              No request data.                           
  307.          BCTR  R7,0                  For execute                                
  308.          ICM   R9,B'1111',CRBRQPRM   Get parameter pointer                      
  309.          BZ    NOPARDAT              BR-> No parameter pointer                  
  310.          EX    R7,FROMCPRB           Move data from CPRB.                       
  311.          EX    R7,ATOEDAT            Translate the record to EBCDIC.            
  312.          LA    R7,1(,R7)             Restore length of the reply,               
  313.          ST    R7,LOG+(FSCBSIZE-FSCBD) Set size.                                
  314.          BAL   R10,LOGBYSIZ          Log message by size                        
  315. NOPARDAT LA    R9,BLANK              Set to write a blank line                  
  316.          BAL   R10,LOGINFO           Put in delimiter                           
  317.          LM    R0,R10,SUBSAVE        Restore callers regs                       
  318.          BR    R10                   Return to caller                           
  319. ***********************************************************************         
  320. * Common ERROR/INFORMATIONAL  message logging routines                          
  321. ***********************************************************************         
  322. LOGINFO  MVC   LOGBUFF,BLANK         Clear the buffer first                     
  323.          MVC   LOGBUFF(30),0(R9)     Move in the diagnostic message             
  324.          FSWRITE FSCB=LOG,BUFFER=LOGBUFF,BSIZE=109    Write a record            
  325.          BR    R10                   Return to caller. R15 = RETCODE            
  326. LOGBYSIZ FSWRITE FSCB=LOG,BUFFER=LOGBUFF,BSIZE=(R7)      Log input rcd          
  327.          BR    R10                   Return to caller. R15 = RETCODE            
  328.          EJECT                                                                  
  329. ***********************************************************************         
  330. * Execute Instructions                                                          
  331. ***********************************************************************         
  332. TOCPRB    MVC  0(0,R4),REPLY          For Execute to CPRB data                  
  333. FROMCPRB MVC   LOGBUFF(0),0(R9)       Move from CPRB to Log Buffer.             
  334. ETOA     TR    REPLY(0),TRASCII       Translate the record to ASCII.            
  335. ATOEDAT  TR    LOGBUFF(0),TREBCDIC    Translate the record to EBCDIC.           
  336. ***********************************************************************         
  337. * Data section.                                                                 
  338. ***********************************************************************         
  339. * EBCDIC to ASCII translate table.                                              
  340. ***********************************************************************         
  341.          SPACE                                                                  
  342. TRASCII  DS    0CL256                                                           
  343.          DC    X'00010203CF09D37FD4D5C30B0C0D0E0F'                              
  344.          DC    X'10111213C7B408C91819CCCD831DD21F'                              
  345.          DC    X'81821C84860A171B89919295A2050607'                              
  346.          DC    X'E0EE16E5D01EEA048AF6C6C21415C11A'                              
  347.          DC    X'20A6E180EB909FE2AB8B9B2E3C282B7C'                              
  348.          DC    X'26A9AA9CDBA599E3A89E21242A293B5E'                              
  349.          DC    X'2D2FDFDC9ADDDE989DACBA2C255F3E3F'                              
  350.          DC    X'D78894B0B1B2FCD6FB603A2340273D22'                              
  351.          DC    X'F861626364656667686996A4F3AFAEC5'                              
  352.          DC    X'8C6A6B6C6D6E6F7071729787CE93F1FE'                              
  353.          DC    X'C87E737475767778797AEFC0DA5BF2F9'                              
  354.          DC    X'B5B6FDB7B8B9E6BBBCBD8DD9BF5DD8C4'                              
  355.          DC    X'7B414243444546474849CBCABEE8ECED'                              
  356.          DC    X'7D4A4B4C4D4E4F505152A1ADF5F4A38F'                              
  357.          DC    X'5CE7535455565758595AA0858EE9E4D1'                              
  358.          DC    X'30313233343536373839B3F7F0FAA7FF'                              
  359. ***********************************************************************         
  360. * ASCII to EBCDIC translate table.                                              
  361. ***********************************************************************         
  362.          SPACE                                                                  
  363. TREBCDIC DS    0CL256                                                           
  364.          DC    X'00010203372D2E2F1605250B0C0D0E0F'                              
  365.          DC    X'101112133C3D322618193F27221D351F'                              
  366.          DC    X'405A7F7B5B6C507D4D5D5C4E6B604B61'                              
  367.          DC    X'F0F1F2F3F4F5F6F7F8F97A5E4C7E6E6F'                              
  368.          DC    X'7CC1C2C3C4C5C6C7C8C9D1D2D3D4D5D6'                              
  369.          DC    X'D7D8D9E2E3E4E5E6E7E8E9ADE0BD5F6D'                              
  370.          DC    X'79818283848586878889919293949596'                              
  371.          DC    X'979899A2A3A4A5A6A7A8A9C04FD0A107'                              
  372.          DC    X'4320211C23EB249B7128384990BAECDF'                              
  373.          DC    X'45292A9D722B8A9A6756644A53685946'                              
  374.          DC    X'EADA2CDE8B5541FE5851524869DB8E8D'                              
  375.          DC    X'737475FA15B0B1B3B4B56AB7B8B9CCBC'                              
  376.          DC    X'AB3E3B0ABF8F3A14A017CBCA1A1B9C04'                              
  377.          DC    X'34EF1E0608097770BEBBAC5463656662'                              
  378.          DC    X'30424757EE33B6E1CDED3644CECF31AA'                              
  379.          DC    X'FC9EAE8CDDDC39FB80AFFD7876B29FFF'                              
  380.          EJECT                                                                  
  381. SAVERC   DC    F'0'                  Save Requestors Return code.               
  382. CLOSERC  DC    F'0'                  Save Close Return codes.                   
  383. TYPE     DS    CL8                                                              
  384. SAVEAREA DC    18F'0'                IBMABASE's save area.                      
  385. SUBSAVE  DC    18F'0'                IBMABASE subroutine's save area.           
  386. STATUS   DC    X'00'                 Status word.                               
  387. TERMIN8  EQU   X'08'                 Termination processing (no CPRB)           
  388. LOGOUT   EQU   X'04'                 Output header info is written              
  389. LOGINP   EQU   X'02'                 Input header info is written               
  390. OPENED   EQU   X'01'                 Data sets are opened.                      
  391. CLOSED   EQU   X'00'                 Data sets are closed.                      
  392. CPRBCHK  DC    CL4'CPRB'             CPRB self identifier                       
  393. SENDREQ  DC    CL8'CPRB'             SENDREQ parameter identifier               
  394. ENDCMD   DC    CL8'ENDCMD'           End-of-command identifier                  
  395. WSCOMM   DC    CL8'WSCOMM'           Comm module termination identifier         
  396. PURGE    DC    CL8'PURGE'            Abnormal termination identifier            
  397. RESET    DC    CL8'RESET'            Server unload identifier                   
  398.          LTORG                                                                  
  399.          EJECT                                                                  
  400. ***********************************************************************         
  401. * FSCB mapping                                                                  
  402. ***********************************************************************         
  403.          SPACE                                                                  
  404. INPUT    FSCB 'INPUT FILE A',FORM=E                                             
  405. OUTPUT   FSCB 'OUTPUT FILE A',FORM=E                                            
  406. LOG      FSCB 'LOG FILE A',FORM=E,RECFM=V                                       
  407.          EJECT                                                                  
  408. ***********************************************************************         
  409. * CPRB reply buffer mapping.                                                    
  410. ***********************************************************************         
  411.              SPACE                                                              
  412. LOGBUFF      DC    CL109' '                                                     
  413. LOGLEN       EQU   *-LOGBUFF                                                    
  414. REPLY        DC    CL109' '                                                     
  415. REPLYLEN     EQU   *-REPLY                                                      
  416.              SPACE                                                              
  417. BLANK        DC    CL109' '                                                     
  418. ***********************************************************************         
  419. * MESSAGES TO BE ISSUED                                                         
  420. ***********************************************************************         
  421. REPMSG   DC    CL109' '              LOG_MSG Area                               
  422. MSGBAD   DC    CL30'INVALID SERVICE REQUEST'                                    
  423. MSGFNF   DC    CL30'INPUT FILE NOT FOUND'                                       
  424. MSGOPN   DC    CL30'INPUT FILE OPEN ERRORS'                                     
  425. MSGEND   DC    CL30'ENDCMD RECEIVED BY SERVER'                                  
  426. MSGPUR   DC    CL30'PURGE RECEIVED BY SERVER'                                   
  427. MSGRES   DC    CL30'RESET RECEIVED BY SERVER'                                   
  428. MSGWSC   DC    CL30'WSCOMM RECEIVED BY SERVER'                                  
  429. MSGLEN   DC    CL30'REPLY LENGTH TOO SMALL'                                     
  430. MSGCPR   DC    CL30'CPRB NOT FOUND'                                             
  431. MSGSNOC  DC    CL30'REPLY SENT BUT NOT CONFIRMED'                               
  432. MSGEDEL  DC    CL30'NO REPLY SENT FOR LAST REQUEST'                             
  433. MSGNRSS  DC    CL30'DELENTRY PROCESSING ERROR'                                  
  434. INLOG    DC    CL30'CUSTOMER RECORDS READ ***'                                  
  435. OUTLOG   DC    CL30'CUSTOMER RECORDS UPDATED'                                   
  436. ***********************************************************************         
  437. * Server parameter list mapping.                                                
  438. ***********************************************************************         
  439. PARAMTR    DSECT                                                                
  440.            DS   CL8                                                             
  441. REQTYP     DS   CL8                                                             
  442. PTRS       DSECT                                                                
  443.            DS   3F                                                              
  444. CRBPTR     DS   F                                                               
  445.          SPACE                                                                  
  446. ***********************************************************************         
  447. * CPRB mapping                                                                  
  448. ***********************************************************************         
  449.          CPRB DSECT=YES                                                         
  450.          CSMRETCD                                                               
  451. ***********************************************************************         
  452. * VM/SP DSECT Mappings                                                          
  453. ***********************************************************************         
  454.          SPACE                                                                  
  455.          REGEQU                                                                 
  456.          SPACE                                                                  
  457. FSCBD    FSCBD                                                                  
  458.          EJECT                                                                  
  459.          END   IBMABASE                                                         
  460.