z/OS Communications Server: IP Programmer's Guide and Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Assembler language GETL example

z/OS Communications Server: IP Programmer's Guide and Reference
SC27-3659-02

Assume that an SCMD was issued with the subcommand LS a*. The following example shows the lines of output that are in the buffer at the end of the SCMD request. (The lines have been numbered for this example.)
 1   T 0026 CA0149 dirlist: entered for ls command
 2   T 0017 CA0798 getList: entered               
 3   M 0018 >>> PORT 9,42,105,93,4,8        
 4   R 0014 200 Port request OK.             
 5   M 000B >>> NLST a*                      
 6   R 0013 125 List started OK
 7   T CA1275 rcvListData: entered             
 8   L 0001 a
 9   L 0002 ab                              
10   R 0020 250 List completed successfully.
11   T 0022 CA1521 resetTS: value of rcode = 0
12   M 0018 Command(00-20-NLST-250):
13   Z 0000
The following fields are also defined in the user program:
GETL     DC    C'GETL'
FIND     DC    C'FIND'
COPY     DC    C'COPY'
FIRST    DC    C'F'
NEXT     DC    C'N'
LAST     DC    C'L'
*
MESSAGE  DC    C'M'
REPLY    DC    C'R'
LIST     DC    C'L'
ANY      DC    C'A'
*
         DS    0F

BUFFVEC  DS    0XL12
BUFFADDR DC    A(BUFFER)  THIS BUFFER IS LARGER THAN TOTAL OUTPUT RETURNED
         DC    F'0'
BUFFLENG DC    A(L'BUFFER)
BUFFER   DC    CL'4096'
These calls retrieve the following output lines:
CALL EZAFTPKS,(FCAI_Map,GETL,FIND,MESSAGE,FIRST,BUFFVEC)
  copies line  3:  M 0018 >>> PORT 9,42,105,93,4,8
CALL EZAFTPKS,(FCAI_Map,GETL,FIND,MESSAGE,NEXT,BUFFVEC)
  copies line  5:  M 000B >>> NLST a*
CALL EZAFTPKS,(FCAI_Map,GETL,FIND,MESSAGE,NEXT,BUFFVEC)
  copies line 12:  M 0018 Command(00-20-NLST-250):
CALL EZAFTPKS,(FCAI_Map,GETL,FIND,MESSAGE,NEXT,BUFFVEC)
  returns FCAI_Result_NoMatch
CALL EZAFTPKS,(FCAI_Map,GETL,FIND,REPLY,LAST,BUFFVEC)
  copies line 10:  R 0020 250 List completed successfully.
CALL EZAFTPKS,(FCAI_Map,GETL,FIND,LIST,FIRST,BUFFVEC)
  copies line  8:  L 0001 a
CALL EZAFTPKS,(FCAI_Map,GETL,COPY,LIST,BUFFVEC)
  copies line  8:  L 0001 a
  copies line  9:  L 0002 ab
  copies line 13:  Z 0000

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014