CICS LOGIN MAP FILE
LOG17 DFHMSD TYPE=&SYSPARM,MODE=INOUT,LANG=COBOL,TIOAPFX=YES
LOG17 DFHMDI SIZE=(24,80),LINE=1,COLUMN=1
DFHMDF POS=(1,60),LENGTH=5,INITIAL='DATE:',ATTRB=(PROT)
DATE DFHMDF POS=(1,67),LENGTH=10,INITIAL='--/--/----',ATTRB=(PROT)
DFHMDF POS=(2,60),LENGTH=5,INITIAL='TIME:',ATTRB=(PROT)
TIME DFHMDF POS=(2,67),LENGTH=8,INITIAL='--:--:--',ATTRB=(PROT)
DFHMDF POS=(4,30),LENGTH=20,INITIAL='--------------------', X
ATTRB=(PROT)
DFHMDF POS=(5,30),LENGTH=20,INITIAL=' WELCOME TO LIBRARY ', X
ATTRB=(PROT)
DFHMDF POS=(6,30),LENGTH=20,INITIAL='--------------------', X
ATTRB=(PROT)
DFHMDF POS=(8,20),LENGTH=20,INITIAL=' LOGON SCREEN ', X
ATTRB=(PROT)
DFHMDF POS=(10,20),LENGTH=20,INITIAL=' MEMBER ID : ', X
ATTRB=(PROT)
MEMID DFHMDF POS=(10,42),LENGTH=5,INITIAL='_____', X
ATTRB=(UNPROT,IC,FSET)
DFHMDF POS=(10,49),LENGTH=1,INITIAL=' ',ATTRB=(ASKIP)
DFHMDF POS=(12,20),LENGTH=20,INITIAL=' PASSWORD :', X
ATTRB=(PROT)
PASS DFHMDF POS=(12,42),LENGTH=5,INITIAL='_____', X
ATTRB=(DRK,UNPROT,FSET)
DFHMDF POS=(12,49),LENGTH=1,INITIAL=' ',ATTRB=(PROT)
DFHMDF POS=(13,42),LENGTH=5,INITIAL='_____', X
ATTRB=(PROT)
DFHMDF POS=(15,20),LENGTH=9,INITIAL='MESSAGE :', X
ATTRB=(PROT)
MSG DFHMDF POS=(15,30),LENGTH=20,INITIAL='____________________', X
ATTRB=(PROT)
DFHMDF POS=(20,20),LENGTH=40,ATTRB=(PROT), X
INITIAL='NEW USER --> F2 LOGOFF --> F3'
DFHMDF POS=(22,20),LENGTH=40,ATTRB=(PROT), X
INITIAL='EXIT --> F2 REFRESH/CLEAR --> F3'
DFHMSD TYPE=FINAL
END
LOG17 DFHMDI SIZE=(24,80),LINE=1,COLUMN=1
DFHMDF POS=(1,60),LENGTH=5,INITIAL='DATE:',ATTRB=(PROT)
DATE DFHMDF POS=(1,67),LENGTH=10,INITIAL='--/--/----',ATTRB=(PROT)
DFHMDF POS=(2,60),LENGTH=5,INITIAL='TIME:',ATTRB=(PROT)
TIME DFHMDF POS=(2,67),LENGTH=8,INITIAL='--:--:--',ATTRB=(PROT)
DFHMDF POS=(4,30),LENGTH=20,INITIAL='--------------------', X
ATTRB=(PROT)
DFHMDF POS=(5,30),LENGTH=20,INITIAL=' WELCOME TO LIBRARY ', X
ATTRB=(PROT)
DFHMDF POS=(6,30),LENGTH=20,INITIAL='--------------------', X
ATTRB=(PROT)
DFHMDF POS=(8,20),LENGTH=20,INITIAL=' LOGON SCREEN ', X
ATTRB=(PROT)
DFHMDF POS=(10,20),LENGTH=20,INITIAL=' MEMBER ID : ', X
ATTRB=(PROT)
MEMID DFHMDF POS=(10,42),LENGTH=5,INITIAL='_____', X
ATTRB=(UNPROT,IC,FSET)
DFHMDF POS=(10,49),LENGTH=1,INITIAL=' ',ATTRB=(ASKIP)
DFHMDF POS=(12,20),LENGTH=20,INITIAL=' PASSWORD :', X
ATTRB=(PROT)
PASS DFHMDF POS=(12,42),LENGTH=5,INITIAL='_____', X
ATTRB=(DRK,UNPROT,FSET)
DFHMDF POS=(12,49),LENGTH=1,INITIAL=' ',ATTRB=(PROT)
DFHMDF POS=(13,42),LENGTH=5,INITIAL='_____', X
ATTRB=(PROT)
DFHMDF POS=(15,20),LENGTH=9,INITIAL='MESSAGE :', X
ATTRB=(PROT)
MSG DFHMDF POS=(15,30),LENGTH=20,INITIAL='____________________', X
ATTRB=(PROT)
DFHMDF POS=(20,20),LENGTH=40,ATTRB=(PROT), X
INITIAL='NEW USER --> F2 LOGOFF --> F3'
DFHMDF POS=(22,20),LENGTH=40,ATTRB=(PROT), X
INITIAL='EXIT --> F2 REFRESH/CLEAR --> F3'
DFHMSD TYPE=FINAL
END
COBOL CODE FOR LOGIN SCREEN IF LOGIN SUCCESSFULL SHOWS THE NAVIGATION SCREEN(MAP FILE MISSING HERE) IF LOGIN NOT SUCCESSFULL DISPLAYS THE LOGIN SCREEN WITH MESSAGE LOGIN FAILURE
IDENTIFICATION DIVISION.
PROGRAM-ID. LOGPROJ.
AUTHOR. KK.
DATA DIVISION.
WORKING-STORAGE SECTION.
COPY LOG17.
COPY NAV17.
COPY DFHAID.
EXEC SQL
INCLUDE SQLCA
END-EXEC.
EXEC SQL
INCLUDE OUTP
END-EXEC.
01 USERID PIC 9(5).
01 PASS PIC 9(5).
01 WS-N2 PIC X(2).
01 TSTAMP PIC X(26).
01 TIMEE PIC X(8).
PROCEDURE DIVISION.
**************************************************************
MAIN-PARA.
**************************************************************
IF EIBCALEN = 0
MOVE "ENTER LOGIN DETAILS" TO MSGO OF LOG17O
PERFORM SEND-MAP-PARA
ELSE
PERFORM RECV-MAP-PARA
PERFORM COMPUTE-PARA
END-IF
PERFORM CLOSE-PARA.
********************************************************
SEND-MAP-PARA.
********************************************************
EXEC CICS ASKTIME ABSTIME(TSTAMP) END-EXEC.
EXEC CICS
FORMATTIME
ABSTIME(TSTAMP)
DATESEP('/')
DDMMYYYY(DATEO)
TIMESEP(':')
TIME(TIMEO)
END-EXEC.
EXEC CICS
SEND MAP('LOG17') MAPSET('LOG17') FROM (LOG17O)
END-EXEC.
MOVE LOW-VALUES TO LOG17O.
MOVE 'AB' TO WS-N2
EXEC CICS
RETURN TRANSID('P517')
COMMAREA(WS-N2)
END-EXEC.
********************************************************
SEND-NAV-PARA.
********************************************************
MOVE LOW-VALUES TO NAV17O.
EXEC CICS SEND CONTROL CURSOR(1) ERASE END-EXEC.
EXEC CICS ASKTIME ABSTIME(TSTAMP) END-EXEC.
EXEC CICS
FORMATTIME
ABSTIME(TSTAMP)
DATESEP('/')
DDMMYYYY(DATE1O)
TIMESEP(':')
TIME(TIME1O)
END-EXEC.
EXEC CICS
SEND MAP('NAV17') MAPSET('NAV17') FROM (NAV17O)
END-EXEC.
MOVE 'AB' TO WS-N2
EXEC CICS
RETURN
END-EXEC.
********************************************************
RECV-MAP-PARA.
********************************************************
EXEC CICS
RECEIVE MAP('LOG17') MAPSET('LOG17') INTO (LOG17I)
END-EXEC.
********************************************************
COMPUTE-PARA.
********************************************************
EVALUATE EIBAID
* WHEN DFHPF2
* PERFORM NEWUSER-PARA
WHEN DFHPF3
PERFORM CLOSE-PARA
WHEN DFHENTER
PERFORM LOGIN-PARA
WHEN DFHPF4
MOVE LOW-VALUES TO LOG17O
PERFORM SEND-MAP-PARA
END-EVALUATE.
********************************************************
LOGIN-PARA.
********************************************************
MOVE MEMIDI TO HV-MEM-ID
MOVE PASSI TO HV-PASSWORD
EXEC SQL
SELECT PASSWORD INTO :HV-PASSWORD
FROM usermf.MEMTABLE
WHERE MEM_ID = :HV-MEM-ID AND
PASSWORD = :HV-PASSWORD
END-EXEC.
IF SQLCODE = ZERO
MOVE "LOGIN SUCCESSFUL" TO MSGO OF NAV17O
PERFORM SEND-NAV-PARA
ELSE
MOVE "LOGIN FAILURE " TO MSGO OF LOG17O
END-IF
PERFORM SEND-MAP-PARA.
********************************************************
RETURN-PARA.
********************************************************
* MOVE 'AB' TO WS-N2
* EXEC CICS
* RETURN TRANSID('P517')
* COMMAREA(WS-N2)
* END-EXEC.
********************************************************
CLOSE-PARA.
********************************************************
EXEC CICS
RETURN
END-EXEC.
PROGRAM-ID. LOGPROJ.
AUTHOR. KK.
DATA DIVISION.
WORKING-STORAGE SECTION.
COPY LOG17.
COPY NAV17.
COPY DFHAID.
EXEC SQL
INCLUDE SQLCA
END-EXEC.
EXEC SQL
INCLUDE OUTP
END-EXEC.
01 USERID PIC 9(5).
01 PASS PIC 9(5).
01 WS-N2 PIC X(2).
01 TSTAMP PIC X(26).
01 TIMEE PIC X(8).
PROCEDURE DIVISION.
**************************************************************
MAIN-PARA.
**************************************************************
IF EIBCALEN = 0
MOVE "ENTER LOGIN DETAILS" TO MSGO OF LOG17O
PERFORM SEND-MAP-PARA
ELSE
PERFORM RECV-MAP-PARA
PERFORM COMPUTE-PARA
END-IF
PERFORM CLOSE-PARA.
********************************************************
SEND-MAP-PARA.
********************************************************
EXEC CICS ASKTIME ABSTIME(TSTAMP) END-EXEC.
EXEC CICS
FORMATTIME
ABSTIME(TSTAMP)
DATESEP('/')
DDMMYYYY(DATEO)
TIMESEP(':')
TIME(TIMEO)
END-EXEC.
EXEC CICS
SEND MAP('LOG17') MAPSET('LOG17') FROM (LOG17O)
END-EXEC.
MOVE LOW-VALUES TO LOG17O.
MOVE 'AB' TO WS-N2
EXEC CICS
RETURN TRANSID('P517')
COMMAREA(WS-N2)
END-EXEC.
********************************************************
SEND-NAV-PARA.
********************************************************
MOVE LOW-VALUES TO NAV17O.
EXEC CICS SEND CONTROL CURSOR(1) ERASE END-EXEC.
EXEC CICS ASKTIME ABSTIME(TSTAMP) END-EXEC.
EXEC CICS
FORMATTIME
ABSTIME(TSTAMP)
DATESEP('/')
DDMMYYYY(DATE1O)
TIMESEP(':')
TIME(TIME1O)
END-EXEC.
EXEC CICS
SEND MAP('NAV17') MAPSET('NAV17') FROM (NAV17O)
END-EXEC.
MOVE 'AB' TO WS-N2
EXEC CICS
RETURN
END-EXEC.
********************************************************
RECV-MAP-PARA.
********************************************************
EXEC CICS
RECEIVE MAP('LOG17') MAPSET('LOG17') INTO (LOG17I)
END-EXEC.
********************************************************
COMPUTE-PARA.
********************************************************
EVALUATE EIBAID
* WHEN DFHPF2
* PERFORM NEWUSER-PARA
WHEN DFHPF3
PERFORM CLOSE-PARA
WHEN DFHENTER
PERFORM LOGIN-PARA
WHEN DFHPF4
MOVE LOW-VALUES TO LOG17O
PERFORM SEND-MAP-PARA
END-EVALUATE.
********************************************************
LOGIN-PARA.
********************************************************
MOVE MEMIDI TO HV-MEM-ID
MOVE PASSI TO HV-PASSWORD
EXEC SQL
SELECT PASSWORD INTO :HV-PASSWORD
FROM usermf.MEMTABLE
WHERE MEM_ID = :HV-MEM-ID AND
PASSWORD = :HV-PASSWORD
END-EXEC.
IF SQLCODE = ZERO
MOVE "LOGIN SUCCESSFUL" TO MSGO OF NAV17O
PERFORM SEND-NAV-PARA
ELSE
MOVE "LOGIN FAILURE " TO MSGO OF LOG17O
END-IF
PERFORM SEND-MAP-PARA.
********************************************************
RETURN-PARA.
********************************************************
* MOVE 'AB' TO WS-N2
* EXEC CICS
* RETURN TRANSID('P517')
* COMMAREA(WS-N2)
* END-EXEC.
********************************************************
CLOSE-PARA.
********************************************************
EXEC CICS
RETURN
END-EXEC.
PARTIAL CODE OF CICS DB2 JCL FOR PRECOMPILATION
//usermfJ JOB ,,NOTIFY=&SYSUID,CLASS=A,MSGLEVEL=(1,1),MSGCLASS=H
//DD1 SET SRCLIB=usermf.JAN30.KK.LMS2 --> SOURCE LIBRARY
//DD2 SET DBRMLIB=usermf.JAN30.COBOLPGM.DBRMLIB --> DBRM LIBRARY
//DD3 SET MEM=LOGPROJ --> MEMBER NAME
//DD4 SET DCLLIB=usermf.JAN30.COBOLPGM.DCLGEN --> DCLGEN LIBRARY
//DD5 SET COPYLIB=usermf.JAN30.COBOLPGM.BMS --> SYMBOLIC MAP
//DD6 SET LOADLIB=MTPLTRG.CICS.LOADLIB ** DO NOT CHANGE **
//DD7 SET BMSLIB=usermf.JAN30.COBOLPGM.BMS --> BMS MAP LIB
//DD8 SET WSPC=500
//DD9 SET REG=4096K
//DDA SET LNKPARM='XREF'
//DDB SET WORK=USER02
//*
//DD1 SET SRCLIB=usermf.JAN30.KK.LMS2 --> SOURCE LIBRARY
//DD2 SET DBRMLIB=usermf.JAN30.COBOLPGM.DBRMLIB --> DBRM LIBRARY
//DD3 SET MEM=LOGPROJ --> MEMBER NAME
//DD4 SET DCLLIB=usermf.JAN30.COBOLPGM.DCLGEN --> DCLGEN LIBRARY
//DD5 SET COPYLIB=usermf.JAN30.COBOLPGM.BMS --> SYMBOLIC MAP
//DD6 SET LOADLIB=MTPLTRG.CICS.LOADLIB ** DO NOT CHANGE **
//DD7 SET BMSLIB=usermf.JAN30.COBOLPGM.BMS --> BMS MAP LIB
//DD8 SET WSPC=500
//DD9 SET REG=4096K
//DDA SET LNKPARM='XREF'
//DDB SET WORK=USER02
//*
CICS BIND PROGRAM
//usermfB JOB ,,NOTIFY=&SYSUID,CLASS=A,MSGLEVEL=(1,1),MSGCLASS=H
//JOBLIB DD DISP=SHR,
// DSN=DSN710.SDSNEXIT
// DD DISP=SHR,
// DSN=DSN710.SDSNLOAD
//BIND EXEC PGM=IKJEFT01,DYNAMNBR=20
//DBRMLIB DD DISP=SHR,
// DSN=usermf.JAN30.COBOLPGM.DBRMLIB --> DBRM LIBRARY
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUMUMP DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//REPORT DD SYSOUT=*
//SYSTSIN DD *
DSN SYSTEM(DSN2)
BIND PLAN(LOGPROJ) MEMBER(LOGPROJ) ISOLATION(CS) ACTION(REP)
//*
//JOBLIB DD DISP=SHR,
// DSN=DSN710.SDSNEXIT
// DD DISP=SHR,
// DSN=DSN710.SDSNLOAD
//BIND EXEC PGM=IKJEFT01,DYNAMNBR=20
//DBRMLIB DD DISP=SHR,
// DSN=usermf.JAN30.COBOLPGM.DBRMLIB --> DBRM LIBRARY
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUMUMP DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//REPORT DD SYSOUT=*
//SYSTSIN DD *
DSN SYSTEM(DSN2)
BIND PLAN(LOGPROJ) MEMBER(LOGPROJ) ISOLATION(CS) ACTION(REP)
//*
No comments:
Post a Comment