Highlighted
Absent Member.
Absent Member.
2939 views

PL-SQL TYPE HEADER

Dear Chris,

Could you please say to me how I can put a PL-SQL TYPE HEADER into a Visual Cobol Program ???

Many Thanks,

PJM

Pedro Juan Montero Bernales

PJM Informatica Soluciones Globales

Santiago - Chile

0 Likes
7 Replies
Highlighted
Absent Member.
Absent Member.

RE: PL-SQL TYPE HEADER

Chris ,

We have the fooling in PL-SQL :

CREATE OR REPLACE TYPE HEADER AS OBJECT
(
 COMPANIA               NUMBER(2),
 SUCURSAL               NUMBER(4),
 OFICINA                NUMBER(4),
 DEPARTAMENTO           NUMBER(4),
 TERMINAL               VARCHAR2(30),
 USUARIO                NUMBER(4),
 CANAL                  NUMBER(4),
 MODULO                 NUMBER(2),
 TRANSACCION            NUMBER(4),
 IDMENSAJE              VARCHAR2(30)
);
PROCEDURE BOGEN_PRC_OBT_COD_CLI
  ( token_encript     IN  VARCHAR2,
    pior_header       IN  OUT header,
    pic_rut           IN  varchar2,
    pon_cod_cli       OUT number,
    pon_errornum      OUT varchar2,
    poc_errortxt      OUT varchar2
     );
With this   ...
 
ENTRADA
token_encript   IN   VARCHAR2     Siempre debe ser NULL
HEADER          IN/OUT Estructura TYPE (Ver definición anterior)
pic_rut         IN   VARCHAR2(19) RUT del cliente.
SALIDA
PON_CODCLI      OUT NUMBER(8)     Código de cliente
pon_errornum    OUT NUMBER(10)    Código de error ORACLE en el caso que se genere. Exitoso es el valor cero(0)
poc_errortxt    OUT VARCHAR2(255) Descripción error ORACLE en el caso que se genere. Sin mensajes de Error.
We Need to PUT all this in a Cobol Program with SQL embedded.
                       

Pedro Juan Montero Bernales

PJM Informatica Soluciones Globales

Santiago - Chile

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: PL-SQL TYPE HEADER

I found the following in the Oracle Pro*COBOL documentation about embedded PL/SQL in embedded SQL programs:

Embedding PL/SQL

Pro*COBOL treats a PL/SQL block like a single embedded SQL statement. So, you can place a PL/SQL block anywhere in a host program that you can place a SQL statement.

To embed a PL/SQL block in your host program, declare the variables to be shared with PL/SQL and bracket the PL/SQL block with the EXEC SQL EXECUTE and END-EXEC keywords.

0 Likes
Highlighted
Absent Member.
Absent Member.

RE: PL-SQL TYPE HEADER

Dear Chris,

We did all of this in the enclosed Cobol Program and ALWAYS we get the same ERROR  on the same line :

Dear Chris,

We did all of this in the enclosed Cobol Program and ALWAYS we get the same ERROR  on the same line :

01  COD_CLI.
           05  ENTRADA-COD-CLI.
               10 token_encript PIC X(50).
               10 pior_header   HEADER.
               10 pic_rut       PIC X(19).
               10 pon_cod_cli   PIC 9(08).
               10 pon_errornum  PIC 9(10).
               10 poc_errortxt  PIC X(255).

Pedro Juan Montero Bernales

PJM Informatica Soluciones Globales

Santiago - Chile

0 Likes
Highlighted
Absent Member.
Absent Member.

RE: PL-SQL TYPE HEADER

Dear Chris,

How I didn´t  find a solution for this problema I want to test another approuch. I want to build a JVM Cobol program that read the HEADER Object and then Call a Cobol program with SQL Embedded to do the Data Base Access.

Please say to me if this if posible and what I need to Licensed from Micro Focus  to do this.

Many thanks in advanced for your Help.

PJM

Pedro Juan Montero Bernales

PJM Informatica Soluciones Globales

Santiago - Chile

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: PL-SQL TYPE HEADER

Hi Pedro,

Have you talked to Oracle about the correct way to handle this in Pro*COBOL? Pro*COBOL is an Oracle product and not a Micro Focus one.

If you have to execute some PL/SQL that is not supported in Pro*COBOL then it might be best to create a stored procedure for this and then execute this from within COBOL.

0 Likes
Highlighted
Absent Member.
Absent Member.

RE: PL-SQL TYPE HEADER

Dear Chris,

WE did that. But how PRO*Cobol don´t accept Type Object we get always the same error on Type Header.

 For that we are trying to do an JVM Cobol program to read the Object Header and then Call a Native Cobol program Using this header translated.

Thanks,

PJM

Pedro Juan Montero Bernales

PJM Informatica Soluciones Globales

Santiago - Chile

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: PL-SQL TYPE HEADER

You can call a native COBOL program from a JVM COBOL program. Look in the Samples Browser under COBOL for JVM and then select the JVM COBOL to Native COBOL example.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.