I receive data from a table with USAGE National. I need to move this into a pic x field.
When i code: move ObjectProperties-Identifier to alp-field
the Errormessage: Wrong combination of data-types.
How can i solve this problem.
Copy created by SQL Wizard:
EXEC SQL DECLARE
"ObjectProperties" TABLE
( "ObjectPropertyGuid" uniqueidentifier(36)
NOT NULL
,"ContainerGuid" uniqueidentifier(36)
NOT NULL
,"Identifier" ntext(41823)
,"Value" ntext(41823)
,"GroupGuid" uniqueidentifier(36)
) END-EXEC.
*> --------------------------------------------------------------
*> COBOL DECLARATION FOR TABLE ObjectProperties
*> --------------------------------------------------------------
01 DCLObjectProperties.
03 ObjectProperties-001 PIC X(36).
03 ObjectProperties-ContainerGuid PIC X(36).
03 ObjectProperties-Identifier PIC N(32000)
USAGE NATIONAL.
03 ObjectProperties-Value PIC N(32000)
USAGE NATIONAL.
03 ObjectProperties-GroupGuid PIC X(36).
*> --------------------------------------------------------------
*> COBOL INDICATOR VARIABLES FOR TABLE
*> --------------------------------------------------------------
01 DCLObjectProperties-NULL.
03 ObjectProperties-003-NULL PIC S9(04) COMP-5.
03 ObjectProperties-Value-NULL PIC S9(04) COMP-5.
03 ObjectProperties-005-NULL PIC S9(04) COMP-5
Alphanumeric field:
01 alp-field pic x(100).
I receive data from a table with USAGE National. I need to move this into a pic x field.
When i code: move ObjectProperties-Identifier to alp-field
the Errormessage: Wrong combination of data-types.
How can i solve this problem.
Copy created by SQL Wizard:
EXEC SQL DECLARE
"ObjectProperties" TABLE
( "ObjectPropertyGuid" uniqueidentifier(36)
NOT NULL
,"ContainerGuid" uniqueidentifier(36)
NOT NULL
,"Identifier" ntext(41823)
,"Value" ntext(41823)
,"GroupGuid" uniqueidentifier(36)
) END-EXEC.
*> --------------------------------------------------------------
*> COBOL DECLARATION FOR TABLE ObjectProperties
*> --------------------------------------------------------------
01 DCLObjectProperties.
03 ObjectProperties-001 PIC X(36).
03 ObjectProperties-ContainerGuid PIC X(36).
03 ObjectProperties-Identifier PIC N(32000)
USAGE NATIONAL.
03 ObjectProperties-Value PIC N(32000)
USAGE NATIONAL.
03 ObjectProperties-GroupGuid PIC X(36).
*> --------------------------------------------------------------
*> COBOL INDICATOR VARIABLES FOR TABLE
*> --------------------------------------------------------------
01 DCLObjectProperties-NULL.
03 ObjectProperties-003-NULL PIC S9(04) COMP-5.
03 ObjectProperties-Value-NULL PIC S9(04) COMP-5.
03 ObjectProperties-005-NULL PIC S9(04) COMP-5
Alphanumeric field:
01 alp-field pic x(100).
You can use the intrinsic function display-of to convert between national characters and pic x fields. Going in the other direction you can use the national-of function.
move function display-of(ObjectProperties-Identifier) to alp-field
move function national-of(alp-field) to ObjectProperties-Identifier
Thanks
I receive data from a table with USAGE National. I need to move this into a pic x field.
When i code: move ObjectProperties-Identifier to alp-field
the Errormessage: Wrong combination of data-types.
How can i solve this problem.
Copy created by SQL Wizard:
EXEC SQL DECLARE
"ObjectProperties" TABLE
( "ObjectPropertyGuid" uniqueidentifier(36)
NOT NULL
,"ContainerGuid" uniqueidentifier(36)
NOT NULL
,"Identifier" ntext(41823)
,"Value" ntext(41823)
,"GroupGuid" uniqueidentifier(36)
) END-EXEC.
*> --------------------------------------------------------------
*> COBOL DECLARATION FOR TABLE ObjectProperties
*> --------------------------------------------------------------
01 DCLObjectProperties.
03 ObjectProperties-001 PIC X(36).
03 ObjectProperties-ContainerGuid PIC X(36).
03 ObjectProperties-Identifier PIC N(32000)
USAGE NATIONAL.
03 ObjectProperties-Value PIC N(32000)
USAGE NATIONAL.
03 ObjectProperties-GroupGuid PIC X(36).
*> --------------------------------------------------------------
*> COBOL INDICATOR VARIABLES FOR TABLE
*> --------------------------------------------------------------
01 DCLObjectProperties-NULL.
03 ObjectProperties-003-NULL PIC S9(04) COMP-5.
03 ObjectProperties-Value-NULL PIC S9(04) COMP-5.
03 ObjectProperties-005-NULL PIC S9(04) COMP-5
Alphanumeric field:
01 alp-field pic x(100).
Thank You very much!!
I receive data from a table with USAGE National. I need to move this into a pic x field.
When i code: move ObjectProperties-Identifier to alp-field
the Errormessage: Wrong combination of data-types.
How can i solve this problem.
Copy created by SQL Wizard:
EXEC SQL DECLARE
"ObjectProperties" TABLE
( "ObjectPropertyGuid" uniqueidentifier(36)
NOT NULL
,"ContainerGuid" uniqueidentifier(36)
NOT NULL
,"Identifier" ntext(41823)
,"Value" ntext(41823)
,"GroupGuid" uniqueidentifier(36)
) END-EXEC.
*> --------------------------------------------------------------
*> COBOL DECLARATION FOR TABLE ObjectProperties
*> --------------------------------------------------------------
01 DCLObjectProperties.
03 ObjectProperties-001 PIC X(36).
03 ObjectProperties-ContainerGuid PIC X(36).
03 ObjectProperties-Identifier PIC N(32000)
USAGE NATIONAL.
03 ObjectProperties-Value PIC N(32000)
USAGE NATIONAL.
03 ObjectProperties-GroupGuid PIC X(36).
*> --------------------------------------------------------------
*> COBOL INDICATOR VARIABLES FOR TABLE
*> --------------------------------------------------------------
01 DCLObjectProperties-NULL.
03 ObjectProperties-003-NULL PIC S9(04) COMP-5.
03 ObjectProperties-Value-NULL PIC S9(04) COMP-5.
03 ObjectProperties-005-NULL PIC S9(04) COMP-5
Alphanumeric field:
01 alp-field pic x(100).
Hallo Chris,
i have tried to compile my programm and got the error:
COBOP0039R Errors detected during creation of intermediate code
Rebuild complete with errors
I receive data from a table with USAGE National. I need to move this into a pic x field.
When i code: move ObjectProperties-Identifier to alp-field
the Errormessage: Wrong combination of data-types.
How can i solve this problem.
Copy created by SQL Wizard:
EXEC SQL DECLARE
"ObjectProperties" TABLE
( "ObjectPropertyGuid" uniqueidentifier(36)
NOT NULL
,"ContainerGuid" uniqueidentifier(36)
NOT NULL
,"Identifier" ntext(41823)
,"Value" ntext(41823)
,"GroupGuid" uniqueidentifier(36)
) END-EXEC.
*> --------------------------------------------------------------
*> COBOL DECLARATION FOR TABLE ObjectProperties
*> --------------------------------------------------------------
01 DCLObjectProperties.
03 ObjectProperties-001 PIC X(36).
03 ObjectProperties-ContainerGuid PIC X(36).
03 ObjectProperties-Identifier PIC N(32000)
USAGE NATIONAL.
03 ObjectProperties-Value PIC N(32000)
USAGE NATIONAL.
03 ObjectProperties-GroupGuid PIC X(36).
*> --------------------------------------------------------------
*> COBOL INDICATOR VARIABLES FOR TABLE
*> --------------------------------------------------------------
01 DCLObjectProperties-NULL.
03 ObjectProperties-003-NULL PIC S9(04) COMP-5.
03 ObjectProperties-Value-NULL PIC S9(04) COMP-5.
03 ObjectProperties-005-NULL PIC S9(04) COMP-5
Alphanumeric field:
01 alp-field pic x(100).
What version and wrappack level of Net Express are you using?
I receive data from a table with USAGE National. I need to move this into a pic x field.
When i code: move ObjectProperties-Identifier to alp-field
the Errormessage: Wrong combination of data-types.
How can i solve this problem.
Copy created by SQL Wizard:
EXEC SQL DECLARE
"ObjectProperties" TABLE
( "ObjectPropertyGuid" uniqueidentifier(36)
NOT NULL
,"ContainerGuid" uniqueidentifier(36)
NOT NULL
,"Identifier" ntext(41823)
,"Value" ntext(41823)
,"GroupGuid" uniqueidentifier(36)
) END-EXEC.
*> --------------------------------------------------------------
*> COBOL DECLARATION FOR TABLE ObjectProperties
*> --------------------------------------------------------------
01 DCLObjectProperties.
03 ObjectProperties-001 PIC X(36).
03 ObjectProperties-ContainerGuid PIC X(36).
03 ObjectProperties-Identifier PIC N(32000)
USAGE NATIONAL.
03 ObjectProperties-Value PIC N(32000)
USAGE NATIONAL.
03 ObjectProperties-GroupGuid PIC X(36).
*> --------------------------------------------------------------
*> COBOL INDICATOR VARIABLES FOR TABLE
*> --------------------------------------------------------------
01 DCLObjectProperties-NULL.
03 ObjectProperties-003-NULL PIC S9(04) COMP-5.
03 ObjectProperties-Value-NULL PIC S9(04) COMP-5.
03 ObjectProperties-005-NULL PIC S9(04) COMP-5
Alphanumeric field:
01 alp-field pic x(100).
Net Express 5.1 - Version 5.110.0022
I receive data from a table with USAGE National. I need to move this into a pic x field.
When i code: move ObjectProperties-Identifier to alp-field
the Errormessage: Wrong combination of data-types.
How can i solve this problem.
Copy created by SQL Wizard:
EXEC SQL DECLARE
"ObjectProperties" TABLE
( "ObjectPropertyGuid" uniqueidentifier(36)
NOT NULL
,"ContainerGuid" uniqueidentifier(36)
NOT NULL
,"Identifier" ntext(41823)
,"Value" ntext(41823)
,"GroupGuid" uniqueidentifier(36)
) END-EXEC.
*> --------------------------------------------------------------
*> COBOL DECLARATION FOR TABLE ObjectProperties
*> --------------------------------------------------------------
01 DCLObjectProperties.
03 ObjectProperties-001 PIC X(36).
03 ObjectProperties-ContainerGuid PIC X(36).
03 ObjectProperties-Identifier PIC N(32000)
USAGE NATIONAL.
03 ObjectProperties-Value PIC N(32000)
USAGE NATIONAL.
03 ObjectProperties-GroupGuid PIC X(36).
*> --------------------------------------------------------------
*> COBOL INDICATOR VARIABLES FOR TABLE
*> --------------------------------------------------------------
01 DCLObjectProperties-NULL.
03 ObjectProperties-003-NULL PIC S9(04) COMP-5.
03 ObjectProperties-Value-NULL PIC S9(04) COMP-5.
03 ObjectProperties-005-NULL PIC S9(04) COMP-5
Alphanumeric field:
01 alp-field pic x(100).
Hallo Chris,
i have the following problem.
- i connect to a database
- then i insert a row into a table
- then i select the inserted row
(the row is in the table and can be selected)
- then i disconnect and the inserted row does no longer exist.
The same problem occurs on creating a table.
I can create the table, and insert or delete rows, but if i disconnect the table does no longer exit.
What can be the reason.
Thanks in advance.
I receive data from a table with USAGE National. I need to move this into a pic x field.
When i code: move ObjectProperties-Identifier to alp-field
the Errormessage: Wrong combination of data-types.
How can i solve this problem.
Copy created by SQL Wizard:
EXEC SQL DECLARE
"ObjectProperties" TABLE
( "ObjectPropertyGuid" uniqueidentifier(36)
NOT NULL
,"ContainerGuid" uniqueidentifier(36)
NOT NULL
,"Identifier" ntext(41823)
,"Value" ntext(41823)
,"GroupGuid" uniqueidentifier(36)
) END-EXEC.
*> --------------------------------------------------------------
*> COBOL DECLARATION FOR TABLE ObjectProperties
*> --------------------------------------------------------------
01 DCLObjectProperties.
03 ObjectProperties-001 PIC X(36).
03 ObjectProperties-ContainerGuid PIC X(36).
03 ObjectProperties-Identifier PIC N(32000)
USAGE NATIONAL.
03 ObjectProperties-Value PIC N(32000)
USAGE NATIONAL.
03 ObjectProperties-GroupGuid PIC X(36).
*> --------------------------------------------------------------
*> COBOL INDICATOR VARIABLES FOR TABLE
*> --------------------------------------------------------------
01 DCLObjectProperties-NULL.
03 ObjectProperties-003-NULL PIC S9(04) COMP-5.
03 ObjectProperties-Value-NULL PIC S9(04) COMP-5.
03 ObjectProperties-005-NULL PIC S9(04) COMP-5
Alphanumeric field:
01 alp-field pic x(100).
Are you doing a EXEC SQL COMMIT after you insert the row? This will make the insert permanent or otherwise the change will be rolled back when you disconnect..
I receive data from a table with USAGE National. I need to move this into a pic x field.
When i code: move ObjectProperties-Identifier to alp-field
the Errormessage: Wrong combination of data-types.
How can i solve this problem.
Copy created by SQL Wizard:
EXEC SQL DECLARE
"ObjectProperties" TABLE
( "ObjectPropertyGuid" uniqueidentifier(36)
NOT NULL
,"ContainerGuid" uniqueidentifier(36)
NOT NULL
,"Identifier" ntext(41823)
,"Value" ntext(41823)
,"GroupGuid" uniqueidentifier(36)
) END-EXEC.
*> --------------------------------------------------------------
*> COBOL DECLARATION FOR TABLE ObjectProperties
*> --------------------------------------------------------------
01 DCLObjectProperties.
03 ObjectProperties-001 PIC X(36).
03 ObjectProperties-ContainerGuid PIC X(36).
03 ObjectProperties-Identifier PIC N(32000)
USAGE NATIONAL.
03 ObjectProperties-Value PIC N(32000)
USAGE NATIONAL.
03 ObjectProperties-GroupGuid PIC X(36).
*> --------------------------------------------------------------
*> COBOL INDICATOR VARIABLES FOR TABLE
*> --------------------------------------------------------------
01 DCLObjectProperties-NULL.
03 ObjectProperties-003-NULL PIC S9(04) COMP-5.
03 ObjectProperties-Value-NULL PIC S9(04) COMP-5.
03 ObjectProperties-005-NULL PIC S9(04) COMP-5
Alphanumeric field:
01 alp-field pic x(100).
You are great. Thank you very much, Chris - now it works.
Do you know something knew about my compiling error.
COBOP0039R Errors detected during creation of intermediate code
Rebuild complete with errors
Net Express 5.1 - Version 5.110.0022
I receive data from a table with USAGE National. I need to move this into a pic x field.
When i code: move ObjectProperties-Identifier to alp-field
the Errormessage: Wrong combination of data-types.
How can i solve this problem.
Copy created by SQL Wizard:
EXEC SQL DECLARE
"ObjectProperties" TABLE
( "ObjectPropertyGuid" uniqueidentifier(36)
NOT NULL
,"ContainerGuid" uniqueidentifier(36)
NOT NULL
,"Identifier" ntext(41823)
,"Value" ntext(41823)
,"GroupGuid" uniqueidentifier(36)
) END-EXEC.
*> --------------------------------------------------------------
*> COBOL DECLARATION FOR TABLE ObjectProperties
*> --------------------------------------------------------------
01 DCLObjectProperties.
03 ObjectProperties-001 PIC X(36).
03 ObjectProperties-ContainerGuid PIC X(36).
03 ObjectProperties-Identifier PIC N(32000)
USAGE NATIONAL.
03 ObjectProperties-Value PIC N(32000)
USAGE NATIONAL.
03 ObjectProperties-GroupGuid PIC X(36).
*> --------------------------------------------------------------
*> COBOL INDICATOR VARIABLES FOR TABLE
*> --------------------------------------------------------------
01 DCLObjectProperties-NULL.
03 ObjectProperties-003-NULL PIC S9(04) COMP-5.
03 ObjectProperties-Value-NULL PIC S9(04) COMP-5.
03 ObjectProperties-005-NULL PIC S9(04) COMP-5
Alphanumeric field:
01 alp-field pic x(100).
That error points to the compiler having an issue with a particular program. We would need a copy of the program here in order to reproduce the problem so we could investigate.
I would recommend that you open up a support incident with Customer Care and attach your program so that we can look into this further.
If the program is small and has no copybooks, etc then you could also post it here.
Thanks
I receive data from a table with USAGE National. I need to move this into a pic x field.
When i code: move ObjectProperties-Identifier to alp-field
the Errormessage: Wrong combination of data-types.
How can i solve this problem.
Copy created by SQL Wizard:
EXEC SQL DECLARE
"ObjectProperties" TABLE
( "ObjectPropertyGuid" uniqueidentifier(36)
NOT NULL
,"ContainerGuid" uniqueidentifier(36)
NOT NULL
,"Identifier" ntext(41823)
,"Value" ntext(41823)
,"GroupGuid" uniqueidentifier(36)
) END-EXEC.
*> --------------------------------------------------------------
*> COBOL DECLARATION FOR TABLE ObjectProperties
*> --------------------------------------------------------------
01 DCLObjectProperties.
03 ObjectProperties-001 PIC X(36).
03 ObjectProperties-ContainerGuid PIC X(36).
03 ObjectProperties-Identifier PIC N(32000)
USAGE NATIONAL.
03 ObjectProperties-Value PIC N(32000)
USAGE NATIONAL.
03 ObjectProperties-GroupGuid PIC X(36).
*> --------------------------------------------------------------
*> COBOL INDICATOR VARIABLES FOR TABLE
*> --------------------------------------------------------------
01 DCLObjectProperties-NULL.
03 ObjectProperties-003-NULL PIC S9(04) COMP-5.
03 ObjectProperties-Value-NULL PIC S9(04) COMP-5.
03 ObjectProperties-005-NULL PIC S9(04) COMP-5
Alphanumeric field:
01 alp-field pic x(100).
Hallo Chris,
The Program is very small.
In this case it works - clients-rechnername pic N(21845)
working-storage section.
01 clients-rechnername pic N(21845)
usage national.
01 rechnername pic x(200).
procedure division.
move function display-of(clients-rechnername)
to rechnername
stop run.
Rebuilding C:\\app\\gem\\usageNational.cbl
Rebuild complete
In this case it fails - clients-rechnername pic N(21846)
working-storage section.
01 clients-rechnername pic N(21846)
usage national.
01 rechnername pic x(200).
procedure division.
move function display-of(clients-rechnername)
to rechnername
stop run.
Rebuilding C:\\app\\gem\\usageNational.cbl
COBOP0039R Errors detected during creation of intermediate code
Rebuild complete with errors
I receive data from a table with USAGE National. I need to move this into a pic x field.
When i code: move ObjectProperties-Identifier to alp-field
the Errormessage: Wrong combination of data-types.
How can i solve this problem.
Copy created by SQL Wizard:
EXEC SQL DECLARE
"ObjectProperties" TABLE
( "ObjectPropertyGuid" uniqueidentifier(36)
NOT NULL
,"ContainerGuid" uniqueidentifier(36)
NOT NULL
,"Identifier" ntext(41823)
,"Value" ntext(41823)
,"GroupGuid" uniqueidentifier(36)
) END-EXEC.
*> --------------------------------------------------------------
*> COBOL DECLARATION FOR TABLE ObjectProperties
*> --------------------------------------------------------------
01 DCLObjectProperties.
03 ObjectProperties-001 PIC X(36).
03 ObjectProperties-ContainerGuid PIC X(36).
03 ObjectProperties-Identifier PIC N(32000)
USAGE NATIONAL.
03 ObjectProperties-Value PIC N(32000)
USAGE NATIONAL.
03 ObjectProperties-GroupGuid PIC X(36).
*> --------------------------------------------------------------
*> COBOL INDICATOR VARIABLES FOR TABLE
*> --------------------------------------------------------------
01 DCLObjectProperties-NULL.
03 ObjectProperties-003-NULL PIC S9(04) COMP-5.
03 ObjectProperties-Value-NULL PIC S9(04) COMP-5.
03 ObjectProperties-005-NULL PIC S9(04) COMP-5
Alphanumeric field:
01 alp-field pic x(100).
Hello,
Based on your example, the only difference is the size of the data item defined as usage national. I compiled it with Net Express 5.1 WrapPack 10, and I couldn't reproduce the problem. I even increased it to PIC N(30000), and it still compiles fine.
What other directives are you using?
Regards,
I receive data from a table with USAGE National. I need to move this into a pic x field.
When i code: move ObjectProperties-Identifier to alp-field
the Errormessage: Wrong combination of data-types.
How can i solve this problem.
Copy created by SQL Wizard:
EXEC SQL DECLARE
"ObjectProperties" TABLE
( "ObjectPropertyGuid" uniqueidentifier(36)
NOT NULL
,"ContainerGuid" uniqueidentifier(36)
NOT NULL
,"Identifier" ntext(41823)
,"Value" ntext(41823)
,"GroupGuid" uniqueidentifier(36)
) END-EXEC.
*> --------------------------------------------------------------
*> COBOL DECLARATION FOR TABLE ObjectProperties
*> --------------------------------------------------------------
01 DCLObjectProperties.
03 ObjectProperties-001 PIC X(36).
03 ObjectProperties-ContainerGuid PIC X(36).
03 ObjectProperties-Identifier PIC N(32000)
USAGE NATIONAL.
03 ObjectProperties-Value PIC N(32000)
USAGE NATIONAL.
03 ObjectProperties-GroupGuid PIC X(36).
*> --------------------------------------------------------------
*> COBOL INDICATOR VARIABLES FOR TABLE
*> --------------------------------------------------------------
01 DCLObjectProperties-NULL.
03 ObjectProperties-003-NULL PIC S9(04) COMP-5.
03 ObjectProperties-Value-NULL PIC S9(04) COMP-5.
03 ObjectProperties-005-NULL PIC S9(04) COMP-5
Alphanumeric field:
01 alp-field pic x(100).
Hello,
I believe you opened a support incident about this issue, and it was determined that the issue occurs when generating the sample program as .gnt.
When I ran my tests, I was generating the same program as .int, and that is why it worked for me.
Please follow up on the support incident to obtain the fix.
Regards,
I receive data from a table with USAGE National. I need to move this into a pic x field.
When i code: move ObjectProperties-Identifier to alp-field
the Errormessage: Wrong combination of data-types.
How can i solve this problem.
Copy created by SQL Wizard:
EXEC SQL DECLARE
"ObjectProperties" TABLE
( "ObjectPropertyGuid" uniqueidentifier(36)
NOT NULL
,"ContainerGuid" uniqueidentifier(36)
NOT NULL
,"Identifier" ntext(41823)
,"Value" ntext(41823)
,"GroupGuid" uniqueidentifier(36)
) END-EXEC.
*> --------------------------------------------------------------
*> COBOL DECLARATION FOR TABLE ObjectProperties
*> --------------------------------------------------------------
01 DCLObjectProperties.
03 ObjectProperties-001 PIC X(36).
03 ObjectProperties-ContainerGuid PIC X(36).
03 ObjectProperties-Identifier PIC N(32000)
USAGE NATIONAL.
03 ObjectProperties-Value PIC N(32000)
USAGE NATIONAL.
03 ObjectProperties-GroupGuid PIC X(36).
*> --------------------------------------------------------------
*> COBOL INDICATOR VARIABLES FOR TABLE
*> --------------------------------------------------------------
01 DCLObjectProperties-NULL.
03 ObjectProperties-003-NULL PIC S9(04) COMP-5.
03 ObjectProperties-Value-NULL PIC S9(04) COMP-5.
03 ObjectProperties-005-NULL PIC S9(04) COMP-5
Alphanumeric field:
01 alp-field pic x(100).
Thank you!