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

Bugfix/LS24004081/Z-ADD with Scalar to Array #613

Merged
merged 9 commits into from
Sep 20, 2024

Conversation

davidepalladino-apuliasoft
Copy link
Collaborator

@davidepalladino-apuliasoft davidepalladino-apuliasoft commented Sep 17, 2024

Description

This work resolves an assignment of a scalar value to an array defined as Data Struct's field. For example:

     D D5COSO        E DS                  EXTNAME(D5COSO0F)
     D  D50                                DIM(99) LIKE(D$C001) INZ
     D                                             OVERLAY(D5COSO:88)

     C                   Z-ADD     1             D50

In addition, was analyzed and fixed an assignment of a scalar value to an array defined as Standalone. For example:

     D  D50            S              5  0 DIM(99) INZ

     C                   Z-ADD     1             D50

Technical notes

To achieve the goal, I improved InternalInterpreter.set when value (which the source) is a scalar instead an array, under FieldDefinition's branch.

Related to #LS24004081

Checklist:

  • If this feature involves RPGLE fixes or improvements, they are well-described in the summary.
  • There are tests for this feature.
  • RPGLE code used for tests is easily understandable and includes comments that clarify the purpose of this feature.
  • The code follows Kotlin conventions (run ./gradlew ktlintCheck).
  • The code passes all tests (run ./gradlew check).
  • Relevant documentation is included in the docs directory.

@davidepalladino-apuliasoft davidepalladino-apuliasoft marked this pull request as draft September 17, 2024 13:40
@davidepalladino-apuliasoft davidepalladino-apuliasoft changed the title Bugfix/ls24004081/zadd get null Bugfix/LS24004081/Z-ADD between Scalar and Array Sep 17, 2024
@davidepalladino-apuliasoft davidepalladino-apuliasoft changed the title Bugfix/LS24004081/Z-ADD between Scalar and Array Bugfix/LS24004081/Z-ADD with Scalar to Array Sep 17, 2024
@davidepalladino-apuliasoft davidepalladino-apuliasoft marked this pull request as ready for review September 17, 2024 13:53
Copy link
Collaborator

@lanarimarco lanarimarco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was the issue related only to when an array is defined in a data structure field, or was the issue more general?
I’m not sure, maybe it's a silly question, but let me know.

@davidepalladino-apuliasoft
Copy link
Collaborator Author

Was the issue related only to when an array is defined in a data structure field, or was the issue more general? I’m not sure, maybe it's a silly question, but let me know.

The issue was related only for this case. If you want, I can check the existence on Jariko where the array is a Standalone field. In case it miss, I can create a test from AS400 and run it on Jariko. What do you think?

@lanarimarco
Copy link
Collaborator

Was the issue related only to when an array is defined in a data structure field, or was the issue more general? I’m not sure, maybe it's a silly question, but let me know.

The issue was related only for this case. If you want, I can check the existence on Jariko where the array is a Standalone field. In case it miss, I can create a test from AS400 and run it on Jariko. What do you think?

I would try, thank you.

@davidepalladino-apuliasoft
Copy link
Collaborator Author

Was the issue related only to when an array is defined in a data structure field, or was the issue more general? I’m not sure, maybe it's a silly question, but let me know.

The issue was related only for this case. If you want, I can check the existence on Jariko where the array is a Standalone field. In case it miss, I can create a test from AS400 and run it on Jariko. What do you think?

I would try, thank you.

You're welcome! I'm going to try after a little analysis of another task.

@davidepalladino-apuliasoft davidepalladino-apuliasoft marked this pull request as draft September 19, 2024 15:13
@davidepalladino-apuliasoft
Copy link
Collaborator Author

Made draft for a new error after test case where the array is a Standalone field.

@davidepalladino-apuliasoft davidepalladino-apuliasoft marked this pull request as ready for review September 20, 2024 07:06
@lanarimarco lanarimarco merged commit 81c22c9 into develop Sep 20, 2024
1 check passed
@lanarimarco lanarimarco deleted the bugfix/LS24004081/zadd-get-null branch September 20, 2024 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants