Skip to content

Commit

Permalink
Moved and renamed SETGT_READ02 to MUDRNRAPU001103
Browse files Browse the repository at this point in the history
  • Loading branch information
davidepalladino-apuliasoft committed Feb 19, 2025
1 parent f404c5f commit 05714dc
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,28 +69,6 @@ open class ReadTest : AbstractTest() {
)
}

// /**
// * Using `SETGT` and `READ` in a cycle.
// * @see #LS25000910
// */
// @Test
// fun afterSetgtInCycle() {
// assertEquals(
// listOf("A003", "A547", "A634"),
// outputOfDBPgm(
// "db/SETGT_READ02",
// listOf(ST02DbMock().metadata, ST02DDbMock().metadata),
// listOf(
// ST02DbMock().createTable(), ST02DbMock().populateTable(listOf(
// mapOf("ST02F1" to "CNFOR", "ST02F2" to "A003"),
// mapOf("ST02F1" to "CNFOR", "ST02F2" to "A547"),
// mapOf("ST02F1" to "CNFOR", "ST02F2" to "A634")
// ))
// )
// )
// )
// }

@Test
@Ignore
fun findsExistingRecords2() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ open class MULANGT50FileAccess1Test : MULANGTTest() {
})
}



/**
* Writing on a field of DS which use `EXTNAME` of a file. In this case the file in `EXTNAME` is different
* from `F` spec but shares same fields.
Expand All @@ -99,4 +97,22 @@ open class MULANGT50FileAccess1Test : MULANGTTest() {
)
)
}

/**
* Using `SETGT` and `READ` in a cycle.
* @see #LS25000910
*/
@Test
fun executeMUDRNRAPU001103() {
ST02DbMock().usePopulated({
val expected = listOf("A003", "A547", "A634")
assertEquals(expected, "smeup/MUDRNRAPU001103".outputOf(configuration = smeupConfig))
},
listOf(
mapOf("ST02F1" to "CNFOR", "ST02F2" to "A003"),
mapOf("ST02F1" to "CNFOR", "ST02F2" to "A547"),
mapOf("ST02F1" to "CNFOR", "ST02F2" to "A634")
)
)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
V* ==============================================================
V* 18/02/2025 APU001 Creation
V* ==============================================================
O * PROGRAM GOAL
O * Using `SETGT` and `READ` in a cycle.
V* ==============================================================
FST02 IF E K DISK RENAME(ST02:ST02R)
D KST02F1 S LIKE(ST02F1)
D KST02F2 S LIKE(ST02F2)
D I S 1 0

C KRIS12 KLIST
C KFLD KST02F1
C KFLD KST02F2

C EVAL KST02F1='CN'

C FOR I=1 TO 3
C KRIS12 SETGT ST02
C READ ST02 35
C ST02F2 DSPLY
C EVAL KST02F1=ST02F1
C EVAL KST02F2=ST02F2
C ENDFOR

C SETON LR

0 comments on commit 05714dc

Please sign in to comment.