Integração com CICS
Denifição da CommonArea no Java
Tipo de Dado
Dados Nulos
Refatoração da classe CICS
Dismistificando tipo COMP e COMP3
Log da aplicação com dados do CICS
AUTO-TesteCics
Denifição da CommonArea no Java
000 00000000 ^k
000000000
0000000000000000000000000000000000000000000000000000000000
0000000000 00000000000000000
0000000000000000000000000000000000
000011 05 GCCS1150-CODIGO-RETORNO PIC 9(03).
000012 05 GCCS1150-SINAL-SQLCODE PIC X(01).
000013 05 GCCS1150-SQLCODE PIC 9(04).
000014 05 GCCS1150-SQLERRML PIC 9(04).
000015 05 GCCS1150-SQLERRMC PIC X(70).
000016 05 GCCS1150-TABELA-ERR PIC X(18).
000017 05 GCCS1150-DESCRICAO-ERR PIC X(30).
Denifição da CommonArea no Java
@CicsGateway
public class SIAW0550_1 extends CTGProgramImpl {
private static final String PGM_NAME = "SIAW0550";
private static final String TRAN_NAME = "SW55";
private static final CommonAreaMetaData COMM_AREA = new CommonAreaMetaData(
new FieldType[] {
new StringFieldType("AREA", 350)
});
Denifição da CommonArea no Java
private static final CommonAreaMetaData COMM_AREA_IN = new
CommonAreaMetaData(
new FieldType[] {
new IntegerFieldType("B1040-SUC", 4),
new IntegerFieldType("B1040-RMO", 4),
new IntegerFieldType("B1040-CIA", 4),
new IntegerFieldType("B1040-APO", 8),
new IntegerFieldType("B1040-ITEM", 4),
new IntegerFieldType("B1040-ENDOSSO", 8),
new IntegerFieldType("B1040-NR-PRESTACAO", 3),
new DoubleFieldType("B1040-VL-PARC", 15, 2),
new DoubleFieldType("B1040-PERC-FRACION", 7, 4),
new DoubleFieldType("B1040-VL-ADIC-FRACION ", 15, 2),
new DoubleFieldType("B1040-VL-IOF", 15, 2),
new DateFieldType("B1040-DT-VENC", 8, "ddMMyyyy"),
new DateFieldType("B1040-DT-PGTO", 8, "ddMMyyyy"),
new IntegerFieldType("B1040-TIPO-COBR", 2),
new StringFieldType("FILLER-OUT", 245)
});
Denifição da CommonArea no Java
private static final CommonAreaMetaData COMM_AREA_OUT = new
CommonAreaMetaData(
new FieldType[] {
new StringFieldType("FILLER_IN", 105),
new DoubleFieldType("B1040-VL-PARC-CALC", 15, 2),
new DoubleFieldType("B1040-VL-IOF-CALC", 15, 2),
new DateFieldType("B1040-DT-CALC-PARC", 8, "ddMMyyyy"),
new IntegerFieldType("B1040-ERRO", 1),
new StringFieldType("B1040-MSG-ERRO", 50),
new StringFieldType("FILLER", 156)
});
Denifição da CommonArea no Java
private static final CommonAreaMetaData COMM_AREA = new
CommonAreaMetaData(
new FieldType[] {
new IntegerFieldType("B1040-SUC", 4),
new IntegerFieldType("B1040-RMO", 4),
new IntegerFieldType("B1040-CIA", 4),
new IntegerFieldType("B1040-APO", 8),
new IntegerFieldType("B1040-ITEM", 4),
new IntegerFieldType("B1040-ENDOSSO", 8),
new IntegerFieldType("B1040-NR-PRESTACAO", 3),
new DoubleFieldType("B1040-VL-PARC", 15, 2),
new DoubleFieldType("B1040-VL-IOF-CALC", 15, 2),
new DateFieldType("B1040-DT-CALC-PARC", 8, "ddMMyyyy"),
new IntegerFieldType("B1040-ERRO", 1),
new StringFieldType("B1040-MSG-ERRO", 50),
new StringFieldType("FILLER", 156)
});
Denifição da CommonArea no Java
 private static final CommonAreaMetaData COMMON_AREA = new
CommonAreaMetaData(
 HEADER,
 new FieldType[] {
 new StringFieldType("DADO1",30),
 new StringFieldType("DADO2", 30)
 }
 );
 public static final FieldType[] HEADER = new FieldType[] {
 new StringFieldType("HEADER",10),
 new IntegerFieldType("FUNCAO",2)
 };
Tipo de Dado
IntegerFieldType
LongFieldType
DoubleFieldType
DateFieldType
StringFieldType
IndexedFieldType
TIPOS BÁSICOS
PIC 9(9)
PIC 9(17)
PIC 9(13)V99
PIC X(10) / PIC 9(10)
PIC X(200)
OCCURS 20
Tipo de Dado
CompFieldType
Comp3FieldType
SignedDoubleFieldType
SignedLongFieldType
TIPOS AVANÇADOS
PIC S9(4) COMP
PIC S9(5) COMP-3
Dados Nulos
03 B1040-SUC PIC X(04).
03 B1040-SUC-R REDEFINES B1040-SUC.
05 B1040-SUC-N PIC 9(04).
03 B1040-RMO-IND-NULL PIC X(1).
03 B1040-RMO PIC 9(04).
Dismistificando tipo COMP e COMP3
TIPO COMP
COBOL: 05 ECPO-COMP PIC S9(4) COMP.
JAVA: new CompFieldType(ECPO_COMP, 2),
Setando Valor: is.setInteger(ECPO_COMP, 1234);
Obtendo Valor: rs.getInteger(SCPO_COMP);
Dismistificando tipo COMP e COMP3
TIPO COMP3
COBOL: 05 ECPO-COMP-3 PIC S9(5) COMP-3.
JAVA: new Comp3FieldType(ECPO_COMP_3, 4),
Setando Valor: is.setDouble(ECPO_COMP_3, 1234);
Obtendo Valor: rs.getDouble(SCPO_COMP_3);
Refatoração da classe CICS
COMPARANDO COM O DAO
EXEMPLO DA CLASSE CICS
EXEMPLO DA CLASSE FACADE / BO
Log da aplicação com dados do CICS
<appender name="CONSOLE"
class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%-40(%d{ISO8601} [%thread])
${applicationName} %-5level %-60logger - %msg%n</pattern>
</encoder>
</appender>
Log da aplicação com dados do CICS
<logger name="br.com.bradseg.bsad.framework" level="TRACE" />
<logger name="br" level="TRACE" />
<root level="TRACE">
<appender-ref ref="CONSOLE" />
<appender-ref ref="FILE" />
</root>
AUTO-TesteCics
http://198.162.60.76:9080/AUTO-TesteCics/testaCics.do
http://provider-it.ddns.info:9080/AUTO-
TesteCics/testaCics.do

Integração com cics

  • 1.
  • 2.
    Denifição da CommonAreano Java Tipo de Dado Dados Nulos Refatoração da classe CICS Dismistificando tipo COMP e COMP3 Log da aplicação com dados do CICS AUTO-TesteCics
  • 3.
    Denifição da CommonAreano Java 000 00000000 ^k 000000000 0000000000000000000000000000000000000000000000000000000000 0000000000 00000000000000000 0000000000000000000000000000000000 000011 05 GCCS1150-CODIGO-RETORNO PIC 9(03). 000012 05 GCCS1150-SINAL-SQLCODE PIC X(01). 000013 05 GCCS1150-SQLCODE PIC 9(04). 000014 05 GCCS1150-SQLERRML PIC 9(04). 000015 05 GCCS1150-SQLERRMC PIC X(70). 000016 05 GCCS1150-TABELA-ERR PIC X(18). 000017 05 GCCS1150-DESCRICAO-ERR PIC X(30).
  • 4.
    Denifição da CommonAreano Java @CicsGateway public class SIAW0550_1 extends CTGProgramImpl { private static final String PGM_NAME = "SIAW0550"; private static final String TRAN_NAME = "SW55"; private static final CommonAreaMetaData COMM_AREA = new CommonAreaMetaData( new FieldType[] { new StringFieldType("AREA", 350) });
  • 5.
    Denifição da CommonAreano Java private static final CommonAreaMetaData COMM_AREA_IN = new CommonAreaMetaData( new FieldType[] { new IntegerFieldType("B1040-SUC", 4), new IntegerFieldType("B1040-RMO", 4), new IntegerFieldType("B1040-CIA", 4), new IntegerFieldType("B1040-APO", 8), new IntegerFieldType("B1040-ITEM", 4), new IntegerFieldType("B1040-ENDOSSO", 8), new IntegerFieldType("B1040-NR-PRESTACAO", 3), new DoubleFieldType("B1040-VL-PARC", 15, 2), new DoubleFieldType("B1040-PERC-FRACION", 7, 4), new DoubleFieldType("B1040-VL-ADIC-FRACION ", 15, 2), new DoubleFieldType("B1040-VL-IOF", 15, 2), new DateFieldType("B1040-DT-VENC", 8, "ddMMyyyy"), new DateFieldType("B1040-DT-PGTO", 8, "ddMMyyyy"), new IntegerFieldType("B1040-TIPO-COBR", 2), new StringFieldType("FILLER-OUT", 245) });
  • 6.
    Denifição da CommonAreano Java private static final CommonAreaMetaData COMM_AREA_OUT = new CommonAreaMetaData( new FieldType[] { new StringFieldType("FILLER_IN", 105), new DoubleFieldType("B1040-VL-PARC-CALC", 15, 2), new DoubleFieldType("B1040-VL-IOF-CALC", 15, 2), new DateFieldType("B1040-DT-CALC-PARC", 8, "ddMMyyyy"), new IntegerFieldType("B1040-ERRO", 1), new StringFieldType("B1040-MSG-ERRO", 50), new StringFieldType("FILLER", 156) });
  • 7.
    Denifição da CommonAreano Java private static final CommonAreaMetaData COMM_AREA = new CommonAreaMetaData( new FieldType[] { new IntegerFieldType("B1040-SUC", 4), new IntegerFieldType("B1040-RMO", 4), new IntegerFieldType("B1040-CIA", 4), new IntegerFieldType("B1040-APO", 8), new IntegerFieldType("B1040-ITEM", 4), new IntegerFieldType("B1040-ENDOSSO", 8), new IntegerFieldType("B1040-NR-PRESTACAO", 3), new DoubleFieldType("B1040-VL-PARC", 15, 2), new DoubleFieldType("B1040-VL-IOF-CALC", 15, 2), new DateFieldType("B1040-DT-CALC-PARC", 8, "ddMMyyyy"), new IntegerFieldType("B1040-ERRO", 1), new StringFieldType("B1040-MSG-ERRO", 50), new StringFieldType("FILLER", 156) });
  • 8.
    Denifição da CommonAreano Java  private static final CommonAreaMetaData COMMON_AREA = new CommonAreaMetaData(  HEADER,  new FieldType[] {  new StringFieldType("DADO1",30),  new StringFieldType("DADO2", 30)  }  );  public static final FieldType[] HEADER = new FieldType[] {  new StringFieldType("HEADER",10),  new IntegerFieldType("FUNCAO",2)  };
  • 9.
    Tipo de Dado IntegerFieldType LongFieldType DoubleFieldType DateFieldType StringFieldType IndexedFieldType TIPOSBÁSICOS PIC 9(9) PIC 9(17) PIC 9(13)V99 PIC X(10) / PIC 9(10) PIC X(200) OCCURS 20
  • 10.
  • 11.
    Dados Nulos 03 B1040-SUCPIC X(04). 03 B1040-SUC-R REDEFINES B1040-SUC. 05 B1040-SUC-N PIC 9(04). 03 B1040-RMO-IND-NULL PIC X(1). 03 B1040-RMO PIC 9(04).
  • 12.
    Dismistificando tipo COMPe COMP3 TIPO COMP COBOL: 05 ECPO-COMP PIC S9(4) COMP. JAVA: new CompFieldType(ECPO_COMP, 2), Setando Valor: is.setInteger(ECPO_COMP, 1234); Obtendo Valor: rs.getInteger(SCPO_COMP);
  • 13.
    Dismistificando tipo COMPe COMP3 TIPO COMP3 COBOL: 05 ECPO-COMP-3 PIC S9(5) COMP-3. JAVA: new Comp3FieldType(ECPO_COMP_3, 4), Setando Valor: is.setDouble(ECPO_COMP_3, 1234); Obtendo Valor: rs.getDouble(SCPO_COMP_3);
  • 14.
    Refatoração da classeCICS COMPARANDO COM O DAO EXEMPLO DA CLASSE CICS EXEMPLO DA CLASSE FACADE / BO
  • 15.
    Log da aplicaçãocom dados do CICS <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <pattern>%-40(%d{ISO8601} [%thread]) ${applicationName} %-5level %-60logger - %msg%n</pattern> </encoder> </appender>
  • 16.
    Log da aplicaçãocom dados do CICS <logger name="br.com.bradseg.bsad.framework" level="TRACE" /> <logger name="br" level="TRACE" /> <root level="TRACE"> <appender-ref ref="CONSOLE" /> <appender-ref ref="FILE" /> </root>
  • 17.