Hello,
I noticed abnormal behavior when opening the DALYTRAN dataset in the POSTTRAN job.
In AWS Mainframe Modernization (BluAge 4.2.0), submitting POSTTRAN.groovy from the Batch Jobs tab fails at STEP15 with error code 35, as shown in the following log:
2025-04-24T16:45:05.680Z INFO ??? --- [ Thread-24] c.n.b.gapwalk.io.support.FileFactory : Created new file [/m2/mount/efs/files-directory/AWS.M2.CARDDEMO.DALYREJS.G0037V00]
2025-04-24T16:45:05.808Z
2025-04-24T16:45:05.681Z INFO ??? --- [ Thread-24] a.b.l.w.c.s.impl.Cbtrn02cProcessImpl : START OF EXECUTION OF PROGRAM CBTRN02C
2025-04-24T16:45:05.808Z
2025-04-24T16:45:05.704Z INFO ??? --- [ Thread-24] c.n.b.g.io.infrastructure.AbstractFile : BRSF [AWS.M2.CARDDEMO.DALYTRAN.PS]::SequentialFileDescription [, , seqAccessOption=record sequential, optional=false, accessMode=SEQUENTIAL, fileStatus=Group {
2025-04-24T16:45:05.808Z
* ElementaryRange [type=alphanumeric(1)];
2025-04-24T16:45:05.808Z
* ElementaryRange [type=alphanumeric(1)]}, dependingOnField = [NO DEPENDING ON FIELD] , isLF=, isCRLF=[N/A]]
2025-04-24T16:45:05.808Z
2025-04-24T16:45:05.713Z INFO ??? --- [ Thread-24] a.b.l.w.c.s.impl.Cbtrn02cProcessImpl : ERROR OPENING DALYTRAN
2025-04-24T16:45:05.809Z
2025-04-24T16:45:05.714Z INFO ??? --- [ Thread-24] a.b.l.w.c.s.impl.Cbtrn02cProcessImpl : FILE STATUS IS: 35
2025-04-24T16:45:05.809Z
2025-04-24T16:45:05.714Z INFO ??? --- [ Thread-24] a.b.l.w.c.s.impl.Cbtrn02cProcessImpl : ABENDING PROGRAM
2025-04-24T16:45:05.809Z
2025-04-24T16:45:05.714Z INFO ??? --- [ Thread-24] a.b.l3.workshop.core.impl.AbendImpl : ABEND WITH CODE 999
2025-04-24T16:45:05.809Z
When I run the same script from the S3 bucket as an "one-time script", everything works correctly:
2025-04-24T16:48:40.851Z
2025-04-24T16:48:40.701Z INFO ??? --- [ Thread-26] c.n.b.g.io.support.basic.BuilderHelper : Using path =[/m2/mount/efs/files-directory/AWS.M2.CARDDEMO.DALYREJS.G0038V00] for FileSystem GDG named AWS.M2.CARDDEMO.DALYREJS generation 38
2025-04-24T16:48:40.851Z
2025-04-24T16:48:40.701Z INFO ??? --- [ Thread-26] c.n.b.g.r.job.support.DefaultJobContext : Stored [/m2/mount/efs/files-directory/AWS.M2.CARDDEMO.DALYREJS.G0038V00] for key (AWS.M2.CARDDEMO.DALYREJS,1)
2025-04-24T16:48:40.851Z
2025-04-24T16:48:40.715Z INFO ??? --- [ Thread-26] c.n.b.gapwalk.io.support.FileFactory : Created new file [/m2/mount/efs/files-directory/AWS.M2.CARDDEMO.DALYREJS.G0038V00]
2025-04-24T16:48:40.851Z
2025-04-24T16:48:40.715Z INFO ??? --- [ Thread-26] a.b.l.w.c.s.impl.Cbtrn02cProcessImpl : START OF EXECUTION OF PROGRAM CBTRN02C
2025-04-24T16:48:40.851Z
2025-04-24T16:48:40.730Z INFO ??? --- [ Thread-26] c.n.b.g.io.infrastructure.AbstractFile : RS FILE[/m2/mount/efs/files-directory/AWS.M2.CARDDEMO.DALYTRAN.PS]::SequentialFileDescription [, , seqAccessOption=record sequential, optional=false, accessMode=SEQUENTIAL, fileStatus=Group {
2025-04-24T16:48:40.851Z
* ElementaryRange [type=alphanumeric(1)];
2025-04-24T16:48:40.851Z
* ElementaryRange [type=alphanumeric(1)]}, dependingOnField = [NO DEPENDING ON FIELD] , isLF=, isCRLF=[N/A]]
2025-04-24T16:48:40.851Z
2025-04-24T16:48:40.731Z INFO ??? --- [ Thread-26] c.n.b.g.i.i.AbstractSequentialFile : Trying to open sequential file [/m2/mount/efs/files-directory/AWS.M2.CARDDEMO.DALYTRAN.PS]
2025-04-24T16:48:40.851Z
2025-04-24T16:48:40.734Z INFO ??? --- [ Thread-26] c.n.b.g.i.i.AbstractSequentialFile : Sequential file [/m2/mount/efs/files-directory/AWS.M2.CARDDEMO.DALYTRAN.PS] successfully opened
2025-04-24T16:48:40.851Z
2025-04-24T16:48:40.750Z INFO ??? --- [ Thread-26] c.n.b.g.io.infrastructure.AbstractFile : BIF [AWS.M2.CARDDEMO.TRANSACT.VSAM.KSDS]::Using Indexed File [primaryKey=ElementaryRangeReference[start=0, length=16] = [
The behavior when executing the script from the S3 bucket is identical to running it from AppStream in a web browser (http://localhost:8080/gapwalk-application/script/POSTTRAN), where I receive the expected response:
{ "exitCode": 4, "stepName": "STEP15", "program": "CBTRN02C", "status": "Succeeded" }
In both the carddemo-service-1.0.0.war and the S3 bucket, I use the same POSTTRAN.groovy script (with adjusted parameters as described in the L3 Workshop):
// Import
import com.netfective.bluage.gapwalk.rt.provider.ScriptRegistry
import com.netfective.bluage.gapwalk.rt.call.MainProgramRunner
import com.netfective.bluage.gapwalk.io.support.FileConfigurationUtils
import com.netfective.bluage.gapwalk.rt.job.support.DefaultJobContext
import com.netfective.bluage.gapwalk.rt.utils.GroovyUtils
import com.netfective.bluage.gapwalk.rt.io.support.FileConfiguration
import com.netfective.bluage.gapwalk.rt.shared.AbendException
import com.netfective.bluage.gapwalk.rt.call.exception.GroovyExecutionException
// Variables
mpr = applicationContext.getBean("com.netfective.bluage.gapwalk.rt.call.ExecutionController", MainProgramRunner.class)
TreeMap mapTransfo = [:]
Map params = ["MapTransfo":mapTransfo]
// Execute job with utility functions
Binding binding = new Binding()
binding.setVariable("jobContext", jobContext)
def shell = new GroovyShell(binding).parse(ScriptRegistry.getScript("functions"))
//*********************************************************************
//* JOB *
//*********************************************************************
shell.with {
def jobName = "POSTTRAN"
mpr.setJobContext(jobContext)
displayStartJob(jobName)
Map programResults = jobContext.getProgramResults().clone()
def lastProgramResult
//*****************************************************************
// Copyright Amazon.com, Inc. or its affiliates.
// All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License").
// You may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
// either express or implied. See the License for the specific
// language governing permissions and limitations under the License
//*****************************************************************
// *******************************************************************
// Process and load daily transaction file and create transaction
// category balance and update transaction master vsam
// *******************************************************************
lastProgramResult = stepSTEP15(shell, params, programResults)
displayEndJob(jobName)
return programResults.get("GroovyExecutionResult")
}
//*********************************************************************
//* STEPS *
//*********************************************************************
// STEP STEP15 - PGM - CBTRN02C***************************************************
def stepSTEP15(Object shell, Map params, Map programResults){
shell.with {
if (checkValidProgramResults(programResults)) {
return execStep("STEP15", "CBTRN02C", programResults, {
mpr
.withFileConfigurations(new FileConfigurationUtils()
.withJobContext(jobContext)
.bluesam("STEPLIB")
.dataset("AWS.M2.CARDDEMO.LOADLIB")
.disposition("SHR")
.build()
.systemOut("SYSPRINT")
.output("*")
.build()
.systemOut("SYSOUT")
.output("*")
.build()
.bluesam("TRANFILE")
.dataset("AWS.M2.CARDDEMO.TRANSACT.VSAM.KSDS")
.disposition("SHR")
.build()
.fileSystem("DALYTRAN")
.path("AWS.M2.CARDDEMO.DALYTRAN.PS")
.disposition("SHR")
.build()
.bluesam("XREFFILE")
.dataset("AWS.M2.CARDDEMO.CARDXREF.VSAM.KSDS")
.disposition("SHR")
.build()
.gdgSupport("DALYREJS")
.name("AWS.M2.CARDDEMO.DALYREJS").ownerPath(".").relativeGeneration(1).storageProvider("filesystem").recordSize(430)
.disposition("NEW")
.normalTermination("CATLG")
.abnormalTermination("DELETE")
.build()
.bluesam("ACCTFILE")
.dataset("AWS.M2.CARDDEMO.ACCTDATA.VSAM.KSDS")
.disposition("SHR")
.build()
.bluesam("TCATBALF")
.dataset("AWS.M2.CARDDEMO.TCATBALF.VSAM.KSDS")
.disposition("SHR")
.build()
.getFileConfigurations())
.withParameters(params)
.runProgram("CBTRN02C")
})
}
}
}
The remaining jobs, such as TRANBKP, INTCALC, COMBTRAN, and CREASTMT, work correctly without any issues.
Output from /efs/files-directory/ just for confirmation that AWS.M2.CARDDEMO.DALYTRAN.PS exists:
sh-5.2$ cd /efs/files-directory/
sh-5.2$ ls -la
total 488
drwxr-xr-x. 3 myuser mygroup 6144 Apr 24 17:34 .
drwxr-xr-x. 3 root root 6144 Apr 24 09:19 ..
drwxr-xr-x. 2 myuser mygroup 6144 Apr 23 15:39 AWS.M2.CARDDEMO.CNTL
-rw-r--r--. 1 myuser mygroup 16340 Apr 24 09:05 AWS.M2.CARDDEMO.DALYREJS.G0034V00
-rw-r--r--. 1 myuser mygroup 0 Apr 24 09:06 AWS.M2.CARDDEMO.DALYREJS.G0035V00
-rw-r--r--. 1 myuser mygroup 48590 Apr 24 09:25 AWS.M2.CARDDEMO.DALYREJS.G0036V00
-rw-r--r--. 1 myuser mygroup 0 Apr 24 16:45 AWS.M2.CARDDEMO.DALYREJS.G0037V00
-rw-r--r--. 1 myuser mygroup 86430 Apr 24 16:48 AWS.M2.CARDDEMO.DALYREJS.G0038V00
-rw-r--r--. 1 myuser mygroup 151 Apr 24 16:48 AWS.M2.CARDDEMO.DALYREJS.json
-rw-r--r--. 1 myuser mygroup 105000 Apr 22 15:21 AWS.M2.CARDDEMO.DALYTRAN.PS
-rw-r--r--. 1 myuser mygroup 17500 Apr 24 17:33 AWS.M2.CARDDEMO.SYSTRAN.G0023V00
-rw-r--r--. 1 myuser mygroup 150 Apr 24 17:33 AWS.M2.CARDDEMO.SYSTRAN.json
-rw-r--r--. 1 myuser mygroup 168 Apr 22 15:21 AWS.M2.CARDDEMO.TCATBALF.BKUP.json
-rw-r--r--. 1 myuser mygroup 164 Apr 22 15:21 AWS.M2.CARDDEMO.TRANREPT.json
-rw-r--r--. 1 myuser mygroup 0 Apr 23 16:45 AWS.M2.CARDDEMO.TRANSACT.BKUP.G0078V00
-rw-r--r--. 1 myuser mygroup 0 Apr 23 17:36 AWS.M2.CARDDEMO.TRANSACT.BKUP.G0079V00
-rw-r--r--. 1 myuser mygroup 0 Apr 23 18:13 AWS.M2.CARDDEMO.TRANSACT.BKUP.G0080V00
-rw-r--r--. 1 myuser mygroup 65450 Apr 24 16:42 AWS.M2.CARDDEMO.TRANSACT.BKUP.G0081V00
-rw-r--r--. 1 myuser mygroup 34650 Apr 24 17:33 AWS.M2.CARDDEMO.TRANSACT.BKUP.G0082V00
-rw-r--r--. 1 myuser mygroup 156 Apr 24 17:33 AWS.M2.CARDDEMO.TRANSACT.BKUP.json
-rw-r--r--. 1 myuser mygroup 52152 Apr 24 17:34 AWS.M2.CARDDEMO.TRANSACT.COMBINED.G0020V00
-rw-r--r--. 1 myuser mygroup 160 Apr 24 17:34 AWS.M2.CARDDEMO.TRANSACT.COMBINED.json
-rw-r--r--. 1 myuser mygroup 169 Apr 22 15:21 AWS.M2.CARDDEMO.TRANSACT.DALY.json
Do you have any idea what is the reason of above issue?
Thanks in advance and best regards,
Dawid