Skip to content

Commit

Permalink
Merge pull request #615 from smeup/bugfix/LS24004104/error-movel-for-…
Browse files Browse the repository at this point in the history
…input-string

Bugfix/LS24004104/error-movel-for-input-string
  • Loading branch information
lanarimarco authored Sep 26, 2024
2 parents af9c863 + 968242b commit 2a858da
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ private fun movel(
): String {
return if (valueToApplyMoveType is UnlimitedStringType) {
valueToMove
} else if (valueToMove.isBlank() && valueToApplyMoveType.isNumeric()) {
"0"
} else if (valueToMove.length <= valueToApplyMove.length) {
var result: String = valueToApplyMove
if (withClear) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -604,4 +604,10 @@ open class MULANGT02ConstAndDSpecTest : MULANGTTest() {
val expected = listOf("test", "te", "st")
assertEquals(expected, "smeup/MUDRNRAPU01102".outputOf(configuration = smeupConfig))
}

@Test
fun executeMUDRNRAPU01103() {
val expected = listOf("1", "0")
assertEquals(expected, "smeup/MUDRNRAPU01103".outputOf(configuration = smeupConfig))
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
V* ==============================================================
V* 19/09/2024 APU011 Creation
V* 25/09/2024 APU011 Edit
V* ==============================================================
O * PROGRAM GOAL
O * Verifies the conversion of values to a numeric data structure
O * when using a blank string and displays the results.
V* ==============================================================
O * JARIKO ANOMALY
O * Before the fix, the error occurred was:
O * Issue executing MoveLStmt at line 22. For
O * input string: " "
V* ==============================================================
D PER$DS DS 100
D T$PERI 19 26

DK§CF DS
D K$DE 8 0

C EVAL K$DE=1
C K$DE DSPLY
C MOVEL(P) T$PERI K$DE #MoveLStmt at line 22. For input string: " "
C K$DE DSPLY

C SETON LR

0 comments on commit 2a858da

Please sign in to comment.