(1) This is the source code for the new API access program AM352C7.

Copy it into the source file in your auxiliary library and compile it.

             PGM        PARM(&TRPID &TRSID &WRK440 &TRDAT &TRTIM + 
                          &TRSUF &TRRGRP &TRCGRP +                 
                          &TRTYP &TRMET &TRDIR &TRSTAT +           
                          &TRTU &TRRU)                             
             DCL        VAR(&WRK440) TYPE(*CHAR) LEN(1)            
             DCLF       FILE(TRAN)                                 
             CALL       PGM(AM352) PARM( +                         
                                        &TRPID  +                  
                                        &TRSID  +                  
                                        &WRK440 +                  
                                        &TRDAT  +                  
                                        &TRTIM  +                  
                                        &TRSUF  +                  
                                        &TRTU   +                  
                                        &TRRU   +                  
                                        &TRPTY  +                  
                                        &TRURG  +                  
                                        &TRTE   +                  
                                        &TRMET  +                  
                                        &TRDIR  +                  
                                        &TRDES  +                 
                                        &TRTYP  +                 
                                        &TRRSP  +                 
                                        &TRDUR  +                 
                                        &TROWT  +                 
                                        &TRRWT  +                 
                                        &TRIU   +                 
                                        &TRMSF  +                 
                                        &TRMSA  +                 
                                        &TRMST  +                 
                                        &TRMSL  +                 
                                        &TRSTAT +                 
                                        &TRRMD  +                 
                                        &TRRMT  +                 
                                        &TRCGRP +                 
                                        &TRRGRP +                 
                                        &TRLTYP +                 
                                        &TRLGRP +                 
                                        &TRLID  +                 
                                        &TRLST  +                 
                                                )                 
             ENDPGM  

(2) Sample code to add an activity then attach notes to it.

     C*                                                
     C*  CREATE AN ACTIVITY                            
     C*                                                
     C                     CALL 'AM352C7'              
     C                     PARM MYPID     TRPID  10       Primary Id
     C                     PARM MYSID     TRSID  10       Secondary Id                    
     C                     PARM           WRK440  1       Not Used
     C                     PARM DVDATE    TRDAT  10       *ISO Date
     C                     PARM DVTIME    TRTIM   8       *ISO TIME
     C                     PARM           TRSUF   50      Internal Use
     C                     PARM 0         TRRGRP 110      Related Group
     C                     PARM 0         TRCGRP 110      Comment Group
     C                     PARM 'A'       TRTYP   1       Type
     C                     PARM 'I'       TRMET   1       Method
     C                     PARM 'N'       TRDIR   1       Direction
     C                     PARM 'C'       TRSTAT  1       Status 
     C                     PARM 'FRED'    TRTU   10       Target User
     C                     PARM 'ETHEL'   TRRU   10       Author
     C*                                                
     C*  PREPARE TO ADD NOTES                          
     C*                                                
     C                     Z-ADDTRCGRP    ACCID
     C                     Z-ADD0         ACSUF         
     C                     EXSR GETTXT
     C*                                                 
     C*  ADD NOTES
     C*
     C            ACTXT    DOWNE*BLANK 
     C                     ADD  1         ACSUF 
     C                     WRITEACTCR           
     C                     EXSR GETTXT
     C                     ENDDO
     C*
     C*  ADD/SYNCHRONIZE NOTE HEADER IN ACTB FILE WITH THE ACTIVITY
     C*
     C                     CALL 'AM360'
     C                     PARM           TRCGRP
     C*
     C* ===============================================================
     C*
     C*  SUBROUTINE TO GET A LINE OF TEXT
     C*
     C           GETTXT    BEGSR
     C                     MOVE *BLANK    ACTXT 
     C*
     C*  retrieve one line of text from other application and store in field ACTXT. 
     C*   (leave ACTXT blank when no more lines remain)
     C*
     C                      ENDSR
 

 

Home Page

Last Updated May, 2005