Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: XML host file reference variable array support #2406

Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ result_set_locator_variable: dbs_level_01 entry_name host_variable_usage result_

tableLocators_variable: dbs_host_var_levels entry_name host_variable_usage tableLocators;

lob_xml_host_variables: dbs_host_var_levels entry_name host_variable_usage xml_as (lobWithSize | xml_lobNO_size);
lob_xml_host_variables: dbs_host_var_levels entry_name host_variable_usage xml_as (lobWithSize | xml_lobNO_size) host_variable_array_times?;
mm-broadcom marked this conversation as resolved.
Show resolved Hide resolved

lob_host_variables: dbs_integer entry_name host_variable_usage (lobWithSize | lobNoSize);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,16 @@ public class TestSqlHostVariable {
+ " 49 {$*VAR|1} USAGE IS SQL TYPE IS XML AS CHARACTER LARGE OBJECT (10).\n"
+ " PROCEDURE DIVISION.\n"
+ " DISPLAY {$var-name1}.";

public static final String LOB_XML_ARR_TEXT1 =
" Identification Division.\n"
+ " Program-Id. 'TEST1'.\n"
+ " Data Division.\n"
+ " Working-Storage Section.\n"
+ " 01 {$*VAR-NAME1}.\n"
+ " 04 {$*VAR} USAGE IS SQL TYPE IS XML AS CLOB (10) OCCURS 12345 TIMES.\n"
+ " PROCEDURE DIVISION.\n";

@Test
void testSupportForResultSetLocator() {
UseCaseEngine.runTest(TEXT, ImmutableList.of(), ImmutableMap.of());
Expand Down Expand Up @@ -350,4 +360,9 @@ void testBinaryHostVariableArray3() {
void testBinaryHostVariableArray4() {
UseCaseEngine.runTest(BINARY_ARR_TEXT4, ImmutableList.of(), ImmutableMap.of());
}

@Test
mm-broadcom marked this conversation as resolved.
Show resolved Hide resolved
void testLobXMLVariableArray1() {
UseCaseEngine.runTest(LOB_XML_ARR_TEXT1, ImmutableList.of(), ImmutableMap.of());
}
}
Loading