-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #591 from smeup/bugfix/LS24003755/ds-to-string-whe…
…n-ds-is-greater-than-string
- Loading branch information
Showing
4 changed files
with
122 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00106.rpgle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
V* ============================================================== | ||
V* 08/08/2024 APU001 Creation | ||
V* 20/08/2024 APU001 Simplification by removing several | ||
V* fields of DS. | ||
V* ============================================================== | ||
O * PROGRAM GOAL | ||
O * Assignment the content of DS to an element of array that is | ||
O * String type (not varying) with size smaller than DS. | ||
O * After declaration of variable there is the assignment of | ||
O * specific substring of "Lorem ipsum" to every field of DS. | ||
O * Then, there is the assignment of DS content to an element | ||
O * of array. In AS400 there is a truncate of content for adapting | ||
O * to destination, smaller than DS. | ||
O * The implementation is like the original source, by changing | ||
O * only the name of variables and by adding the assignment | ||
O * of substring to undestand about the behavior. | ||
V* ============================================================== | ||
O * JARIKO ANOMALY | ||
O * Before the fix, the error occurred was | ||
O * `Cannot assign DataStructValue to StringType`. | ||
V* ============================================================== | ||
D A40_A50 S 50 DIM(300) | ||
D A40_DS DS | ||
D A40_DS_F1 20 | ||
D A40_DS_F2 20 | ||
D A40_DS_F3 35 | ||
D A40_A5 S 5 0 | ||
|
||
D OUTPUT S 50 | ||
|
||
C EVAL A40_DS_F1='Lorem ipsum dolor si' | ||
C EVAL A40_DS_F2='t amet, consectetuer' | ||
C EVAL A40_DS_F3=' adipiscing elit. Aeean' | ||
C + ' commodo lig' | ||
|
||
C EVAL A40_A5=1 | ||
C EVAL A40_A50(A40_A5)=A40_DS Jariko Runtime Error: `Cannot assign DataStructValue to StringType` | ||
C EVAL OUTPUT=A40_A50(A40_A5) | ||
C OUTPUT DSPLY |
39 changes: 39 additions & 0 deletions
39
rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00107.rpgle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
V* ============================================================== | ||
V* 08/08/2024 APU001 Creation | ||
V* 20/08/2024 APU001 Simplification by removing several | ||
V* fields of DS. | ||
V* ============================================================== | ||
O * PROGRAM GOAL | ||
O * Assignment the content of DS to an element of array that is | ||
O * String type (varying) with size smaller than DS. | ||
O * After declaration of variable there is the assignment of | ||
O * specific substring of "Lorem ipsum" to every field of DS. | ||
O * Then, there is the assignment of DS content to an element | ||
O * of array. In AS400 there is a truncate of content for adapting | ||
O * to destination, smaller than DS. | ||
O * The implementation is like the original source, by changing | ||
O * only the name of variables and by adding the assignment | ||
O * of substring to undestand about the behavior. | ||
V* ============================================================== | ||
O * JARIKO ANOMALY | ||
O * Before the fix, the error occurred was | ||
O * `Cannot assign DataStructValue to StringType`. | ||
V* ============================================================== | ||
D A40_A50 S 50 DIM(300) VARYING | ||
D A40_DS DS | ||
D A40_DS_F1 20 | ||
D A40_DS_F2 20 | ||
D A40_DS_F3 35 | ||
D A40_A5 S 5 0 | ||
|
||
D OUTPUT S 50 | ||
|
||
C EVAL A40_DS_F1='Lorem ipsum dolor si' | ||
C EVAL A40_DS_F2='t amet, consectetuer' | ||
C EVAL A40_DS_F3=' adipiscing elit. Aeean' | ||
C + ' commodo lig' | ||
|
||
C EVAL A40_A5=1 | ||
C EVAL A40_A50(A40_A5)=A40_DS Jariko Runtime Error: `Cannot assign DataStructValue to StringType` | ||
C EVAL OUTPUT=A40_A50(A40_A5) | ||
C OUTPUT DSPLY |