* *================================================================* * FUTURE SCHOOL * *----------------------------------------------------------------* * * * PROGRAMA......: PGMENU1 - LINGUAGEM ASSEMBLY (ON-LINE) * * MAPA..........: MAPASM - LINGUAGEM ASSEMBLY * * TRANSACAO.....: MEN1 * * DATA..........: 02/2023 * * AUTOR.........: LESSA * * * * OBJETIVO...: MENU DE OPCOES * * * *----------------------------------------------------------------* * PRINT NOGEN DFHEISTG DSECT * R0 EQU 0 R1 EQU 1 R2 EQU 2 R3 EQU 3 R4 EQU 4 R5 EQU 5 R6 EQU 6 R7 EQU 7 R8 EQU 8 R9 EQU 9 R10 EQU 10 R11 EQU 11 R12 EQU 12 R13 EQU 13 R14 EQU 14 R15 EQU 15 * DOUBLE DS D PARA DESCOMPACTAR EIBTIME * WS_OPCAO DS CL1 MENSA DS CL20 TRANS DS CL4 AUXCICS DS CL8 AUXTIME DS PL8 DDMMAAAA DS CL10 AADDD DS CL6 DATAJUL DS PL3 AUXHORA DS CL8 * COMAREA DS CL1 OPCAO DS CL1 * COPY DFHBMSCA COPY DFHAID COPY MAPASM SPACE *-------------------------------------- * INICIO DO PROGRAMA *-------------------------------------- PGMENU1 DFHEIENT CODEREG=R3,DATAREG=R13,EIBREG=R11 PGMENU1 AMODE 31 PGMENU1 RMODE ANY * MAPASMI MAPASMO INICIO EQU * MVC TRANS,=C'MEN1' MVI OPCAOO,C'0' MVC MENS2O(60),=CL60' ' PREENCHE COM BRANCOS MVC MENSAO(60),=CL60' ' CLC EIBCALEN,=H'0' PRIMEIRA VEZ. BNE RETORNO BAL R7,PEGDATA BAL R7,ENVTELA B RETRAN * *-------------------------------------- * ROTINA PARA PEGAR DATA E HORA *-------------------------------------- PEGDATA EQU * EXEC CICS ASKTIME ABSTIME(AUXTIME) NOHANDLE * EXEC CICS FORMATTIME X ABSTIME (AUXTIME) X DDMMYYYY (DDMMAAAA) X NOHANDLE * MVI DATA1A,X'61' DFHBMPRF MVI TRANSA,X'61' MVI HORAA,X'61' MVI TERMA,X'61' MVI PROGMA,X'61' * MVC DATA1O(2),DDMMAAAA MVI DATA1O+2,C'/' MVC DATA1O+3(2),DDMMAAAA+2 MVI DATA1O+5,C'/' MVC DATA1O+6(4),DDMMAAAA+4 UNPK DOUBLE,EIBTIME HORA MVC HORAO(2),DOUBLE+2 MVI HORAO+2,C':' MVC HORAO+3(2),DOUBLE+4 MVC PROGMO,=C'PGMENU1 ' CODIGO DO PROGRAMA MVC TRANSO,=C'MEN1' CODIGO DA TRANSACAO MVC TERMO,EIBTRMID TERMINAL BR R7 * *-------------------------------------- * ROTINA PARA ENVIAR TELA *-------------------------------------- ENVTELA EQU * MVC MENSAO(60),=CL60' ' BRANCOS MVC MENSAO(31),=C'ESCOLHA UMA OPCAO E TECLE ENTER' EXEC CICS SEND X MAPSET ('MAPASM') X MAP ('MAPASM') X FROM (MAPASMO) X ERASE BR R7 *-------------------------------------- * ROTINA DE RETORNO *-------------------------------------- RETORNO EQU * * EXEC CICS HANDLE AID X PF3(RETRAN) X CLEAR(RETRAN) * * L R6,DFHEICAP CARREGA COMMAREA * MVC COMAREA,0(R6) * BAL R7,RECTELA B TRATOPC * *-------------------------------------- * ROTINA RECEBE TELA *-------------------------------------- RECTELA EQU * * CLC EIBAID,DFHCLEAR BE ENCERRA * EXEC CICS RECEIVE X MAP('MAPASM') X MAPSET('MAPASM') X INTO (MAPASMI) X NOHANDLE * BR R7 * ENCERRA EQU * MVC MENSAO(60),=CL60' ' MVC MENSAO(20),=C'PROGRAMA ENCERRADO ' EXEC CICS SEND FROM (MENSAO) EXEC CICS RETURN * *-------------------------------------- * TRATA OPCAO *-------------------------------------- TRATOPC EQU * CLC OPCAOI,C'0' * CLI OPCAOI,X'F0' BH VEROPC B RETRAN * *-------------------------------------- * VEREFICA OPCAO *-------------------------------------- VEROPC EQU * MVC COMAREA,OPCAOI * CLI OPCAOI,X'F1' INCLUSAO BE VAIOPC1 CLI OPCAOI,X'F2' ALTERACAO BE VAIOPC2 CLI OPCAOI,X'F3' CONSULTA BE VAIOPC3 CLI OPCAOI,X'F4' EXCLUSAO BE VAIOPC4 CLI OPCAOI,X'F5' RELATORIO TELA BE VAIOPC5 CLI OPCAOI,X'F6' ENCERRA PGM BE VAIOPC6 BNE OPCINVL OPCAO INVALIDA VAIOPC1 EQU * EXEC CICS XCTL PROGRAM('PGINCL1') * VAIOPC2 EQU * EXEC CICS XCTL PROGRAM('PGALTE1') * VAIOPC3 EQU * EXEC CICS XCTL PROGRAM('PGCONS1') * VAIOPC4 EQU * EXEC CICS XCTL PROGRAM('PGEXCL1') * VAIOPC5 EQU * B OPCINVL * EXEC CICS XCTL PROGRAM('PGRELA1') * VAIOPC6 EQU * MVC MENSA(20),=CL20'PROGAMA ENCERRADO ' EXEC CICS SEND X FROM(MENSA) X ERASE EXEC CICS RETURN *-------------------------------------- * OPCAO INVALIDA (RETORNA) *-------------------------------------- OPCINVL EQU * BAL R7,PEGDATA BAL R7,ENVTELA MVC MENS2O(60),=CL60' ' MVC MENS2O(14),=C'OPCAO INVALIDA' EXEC CICS SEND X MAPSET ('MAPASM') X MAP ('MAPASM') X FROM (MAPASMO) X ERASE B RETRAN * *-------------------------------------- * ROTINA DE RETORNO TRANSACAO *-------------------------------------- RETRAN EQU * EXEC CICS RETURN X TRANSID('MEN1') X LENGTH (L'COMAREA) X COMMAREA(COMAREA) NOHANDLE * END PGMENU1