Tuesday, December 6, 2011

LINK & XCTL

LINK:-

  • Which can be used to transfer the control from one prog to another prog
  • Control is expected back to original prog.(no need of explicit CICS command to transfer back)
  • Ef:- Validations

Socket programming
Complex business functionalities

XCTL:-


  • Which can be used to transfer the control from one prog. To another Prog.
  • Control is not expected back to original prog
  • To get the control back to main prog XCITL command must be used in sub program

Eg:- Transfering the control from main menu (prog) to sub prog or subprog to main menu(Prog)


            Link  --- to lower level
            XCTL  --- to same level
            Return --- to Higher level


MOVE  30 TO WS_TSO_LEN

Exec  CICS                                                      Ws - Section
                                                                        01 Ws -TSQ - AREA
                  Write Ts                                         02 Ws –TSQ-CusfNo  Pic  59(5)
                  QUEUE(“TS001”)                           02 Ws- TSQ – CustName  Pic X(10)
                  From (Ws-TSQ-AREA)                    02 Ws-TSQ – CustLoc    Pic X(10)
                  LENGTH (Ws-TSQ-LEN)                01 Ws-TSQ-LEN  Pic  59(4) comp
                  ITEM(Ws-TSQ-Item)
                  Main/Aux                                     
If we want to define that Quene auxiliary memory.We have to define Quene id TST table it is CICS supplied table.


End-Exec

Add + 1 to Ws-TSQ-Item

To define queid in TST exate member &write the following assembler maoro.

USEID SOURCE DFHTST (TS0001)

DFHTST Type  = “Queue”                                TST = Temporary Storage Table

QueID  =  “TS001”

TO Retrieve the data from queue to structure:-

Move +1 to Ws-TSQ-ITEM
                  Perform until Qzero  (End of Queue)

Exec CICS

                  ReadQ TS
                  QUEUE (“TS001”)
                  Into(Ws-TSQ-AREA)
                  Length(Ws-TSQ-LEN)
                  Item(Ws-TSQ-Item)

End – Exec

                  Add +1 to Ws – TSQ – Item
End – Perform

Response Code:- To find the end of the queue

Deleting the Queue:

Exec CICS
                  DeleteQTS                           We cannot delete single row in queue
                  QUEUE(“TS001”)                 When we apply delete command the queue
End - Exec                                             becomes empty
                                                              Queue is global

Up dating The Queue:-

Exec CICS

                  RewriteQts
                  From (Ws-TSQ-Area)
                  Queue(“TS001”)
                  Length(Ws-TSQ-Len)
                  Item(Ws-TSQ-Item)

End – Exec

1 comment:

  1. Link --- to lower level
    XCTL --- to same level
    Return --- to Higher level


    what is the meaning of same level & lower / higher level?

    ReplyDelete