Sunday, 12 May 2013

Process performed by BIND...

The BIND process establishes a relationship between an application program and its relational data. This step is necessary berfore a program can be executed. DB2 allows two basic ways of binding a program : to a package, or directly to an application plan.

Bind process performs:

* checks SQL synatx.
* checks security (validity & authorization)
* Compares column/table names against DB2 catalog
* Builds access path strategy for each SQL statement.

Some Commonly used EIB information.

EIBAID                           x(1) Attention Identifier.
EIBCALEN                     S9(4) COMP  Length of DFHCOMMAREA.
EIBCPOSN                     S9(4) COMP  Most recent cursor address, given as displacement value
EIBDATE                        S9(7) COMP-3 Date when the task started.
EIBTIME                        S9(7) COMP-3 Time when this task started.
EIBDS                             X(8)   Most recent data set name.
EIBFN                             X(2)   Function code of the last command.
EIBRCODE                     X(6)   Response code of the last command.
EIBRESP                         S9(8) COMP Exceptional condition code.
EIBRESP2                       S9(8) COMP Exceptional condition extended code.
EIBRSRCE                      X(8) Last resource (map name for SEND MAP or RECEIVE MAP
                                          command, program name for LINK or XCTL, file name for File control                                                 command etc.)
EIBTASKN                     S9(7) COMP-3 Task number of this task.
EIBTRMID                     X(4) Terminal Id.
EIBTRNID                      X(4) Transaction Id.   

CICS Control Programs.

IBM supplies programs.

* TCP - Terminal Control Program.
* SCP - Storage Control Program.
* KCP - Task Control Program.
* PCP - Program Control Program.
* FCP - File Control Program.
* TSP - Temporary Storage Program.
* TDP - Transient Data Program.
* JCP -  Journal Control Program.

 Associated User Specified Tables.

* TCT - Terminal Control Table.
* PCT -  Program Control Table.
* PPT -  Processing Program Table.
* FCT -  FIle Control Table.
* TST -  Temporary Storage Table.
* DCT - Destination Control Table.
* JCT -  Journal Control Table.

JCL to execute CICS program....

//CMAP054A JOB ,,NOTIFY=&SYSUID
//                    JCLLIB  ORDER=ZOS.PROC
//STEP1 EXEC PROC=DFHEITVL,MEM=EXP4
//TRN.SYSIN DD DISP=SHR,DSN=CMAP054.CICS.PROG(&MEM)
//LKED.SYSLMOD DD DISP=SHR,DSN=CICSTS13.MTRG.PRGLOAD(&MEM)
//LKED.SYSIN DD*
      NAME CMAP054(R)
/*
//

After the successful execution of this JCl go to CICS region then enter

CEMT SET PROG(CMAP054) NE

After typing this check weather the status is normal then type

CECI SEND MAP(<map name>) MAPSET(CMAP054)


Pseudo-Conversation:

A mode of dialogue between program and terminal which appears to the operator as a continuous conversation but which is actually carried by a serious of tasks.

IDENTIFICATION DIVISION.
PROGRAM-ID. PROG004.
ENVIRONMENT DIVISION.

DATA DIVISION.
WORKING-STORAGE SECTION.
01 WK-AREA.
      02 WK-TRANS         PIC X(4).

LINKAGE SECTION.
01 DFHCOMMAREA
      02 LK-TRANS          PIC X(4).

PROCEDURE DIVISION.
          IF EIBCALEN = 0
             GO TO TSK1-RTN.
          IF LK-TRANS = 'TSK2'
             GO TO TSK2-RTN.
           GO TO EXIT-PARA.
TSK1-RTN.
          EXEC CICS RECEIVE
                             INTO (WS-AREA)
                             LENGTH (MSG-LEN)
          END-EXEC.
                                   process


          EXEC CICS SEND
                             FROM (WS-AREA)
                             ERASE
          END-EXEC.
          MOVE 'TSK2' TO WK-TRANS.
          EXEC CICS RETURN
                              TRANSID ('TSK1')
                               COMMAREA (WK-AREA)
                               LENGTH (4)
          END-EXEC.
TSK2-RTN.
          EXEC CICS RECEIVE
                             INTO (WS-AREA)
                             LENGTH (MSG-LEN)
          END-EXEC.
                        process
             
          EXEC CICS SEND
                              FROM (WS-COMMAREA)                
                              ERASE
          END-EXEC.

          EXEC CICS RETURN
          END-EXEC.
 

Saturday, 11 May 2013

PRE-COMPILATION includes the following process......

The precompiler "prepares" the source program for compilation by replacing EXEC SQL by a CALL and by putting the SQL in comment. The precompiler performs the following:


* includes DCLGEN member

* includes SQLCA

* looks for SQL statements and for host variable definitions

* verifies the SQL syntax

* matches each column and table name in the SQL to the DECLARE TABLE statements.

* prepares the SQL for compilation or assembly in the host language

* produces a DBRM and stores it in PDS

* can be invoked in DB2l or in batch.

JCL to submit DB2 COBOL program.......

//CMAP054A JOB ,,NOTIFY=CMAP054
//              JCLLIB ORDER=CMAP054.DB2EX.PDS
//STEP01 EXEC PROC=DSNHCOB,WSPC=500,MEM=SINGSEL
//PC.SYSIN DD DISP=SHR,DSN=CMAP054.DB2EX.PDS(&MEM)
//PC.SYSLIB DD DISP=SHR,DSN=CMAP054.DB2DCL.PDS
//PC.DBRMLIB DD DISP=SHR,DSN=CMAP054.DB2DBRM.PDS(&MEM)
//LKED.SYSLMOD DD DISP=SHR,DSN=CMAP054.DB2LOAD.PDS(&MEM)
//*
//BIND EXEC PGM=IKJEFT01,DYNAMBR=20,COND=(4,LT)
//STEPLIB DD DISP=SHR,DSN=SYS1.DSN810.SDSNEXIT
//SYSTSIN DD*
      DSN SYSTEM(DSNZ)
      BIND PLAN(TEST11P)-
                 MEMBER(SINGSEL)-
                 ISOLATION(CS)-
                 RELEASE(C)     -
                 EXPLAIN(NO)  -
                 OWNER(CMAP054)-
                 LIB('CMAP054.DB2DBRM.PDS')
                 RUN PROGRAM(SIGNSEL) PLAN(CMAP054P)-
                 LIB('CMAP054.DB2LOAD.PDS')
/*
// 

Expense Handler Application with advance technologies

Budget Planner  One of the application developed with Ionic 4 and Python-Flask.  Ionic 4 code:  https://github.com/logeshbuiltin/Expense...