Hi,
In L3 workshop, Online testing where in we generate transaction report thru JOB - TRANREPT which is triggered from online screen (Transaction CC00 - option 09). One of the steps in the JOB has SORT with INCLUDE COND in it. This particular step is returning with 0 SORT output records.
The step statements are as follows:
def stepSTEP05R(Object shell, Map params, Map programResults){
shell.with {
if (checkValidProgramResults(programResults)) {
return execStep("STEP05R", "SORT", programResults, {
mpr
.withFileConfigurations(new FileConfigurationUtils()
.withJobContext(jobContext)
.gdgSupport("SORTIN")
.name("AWS.M2.CARDDEMO.TRANSACT.BKUP").ownerPath(".").relativeGeneration(1).storageProvider("filesystem")
.disposition("SHR")
.build()
.fileSystem("SYMNAMES")
.stream("", getEncoding())
.build()
.fileSystem("SYSIN")
.stream(""" SORT FIELDS=(263,16,ZD,A)
** INCLUDE COND=(305,10,CH,GE,C'${startDate}',AND,
305,10,CH,LE,C'${endDate}')""", getEncoding())**
.build()
.systemOut("SYSOUT")
.output("")
.build()
.gdgSupport("SORTOUT")
.name("AWS.M2.CARDDEMO.TRANSACT.DALY").ownerPath(".").relativeGeneration(1).storageProvider("filesystem")
.disposition("NEW")
.normalTermination("CATLG")
.abnormalTermination("DELETE")
.dcbParameters(".SORTIN")
.recordSize(350)
.build()
.getFileConfigurations())
.withParameters(params)
.runProgram("SORT")
})
}
}
}
Output of the Step is as follows:
2024-11-25_16-02-38-358 | [STEP] STEP05R - Started
2024-11-25T15:02:38.367Z WARN 2940 --- [ Thread-16] c.n.b.g.i.s.c.b.FileConfigurationBuilder : Update of GDGSUpportConfiguration from catalog is not implemented.
2024-11-25T15:02:38.418Z INFO 2940 --- [ Thread-16] c.n.b.g.r.c.i.ExecutionControllerImpl : Executing program: SORT
2024-11-25T15:02:38.418Z INFO 2940 --- [ Thread-16] c.n.b.g.rt.db.stats.DatabaseStatistics : DATABASE STATISTIC DISABLED
2024-11-25T15:02:38.428Z INFO 2940 --- [ Thread-16] c.n.b.g.io.support.basic.BuilderHelper : Using path =[.\AWS.M2.CARDDEMO.TRANSACT.DALY.G0047V00] for FileSystem GDG named AWS.M2.CARDDEMO.TRANSACT.DALY generation 47
2024-11-25T15:02:38.428Z INFO 2940 --- [ Thread-16] c.n.b.g.r.job.support.DefaultJobContext : Stored [.\AWS.M2.CARDDEMO.TRANSACT.DALY.G0047V00] for key (AWS.M2.CARDDEMO.TRANSACT.DALY,1)
2024-11-25T15:02:38.429Z INFO 2940 --- [ Thread-16] c.n.b.gapwalk.io.support.FileFactory : Created new file [D:\PhotonUser\Workshop\working-directory..\AWS.M2.CARDDEMO.TRANSACT.DALY.G0047V00]
2024-11-25T15:02:38.433Z INFO 2940 --- [ Thread-16] c.n.b.g.r.job.support.DefaultJobContext : Returning stored dataset path from job context for key (AWS.M2.CARDDEMO.TRANSACT.BKUP,1)
2024-11-25T15:02:38.433Z INFO 2940 --- [ Thread-16] c.n.b.g.io.support.basic.BuilderHelper : Retrieved path from jobContext : .\AWS.M2.CARDDEMO.TRANSACT.BKUP.G0109V00
2024-11-25T15:02:38.939Z INFO 2940 --- [ Thread-16] c.n.b.g.r.sort.service.AdaptableSort : External sort threshold is 2071130352 bytes
2024-11-25T15:02:38.946Z INFO 2940 --- [ Thread-16] c.n.b.g.r.job.support.DefaultJobContext : Returning stored dataset path from job context for key (AWS.M2.CARDDEMO.TRANSACT.BKUP,1)
2024-11-25T15:02:38.946Z INFO 2940 --- [ Thread-16] c.n.b.g.io.support.basic.BuilderHelper : Retrieved path from jobContext : .\AWS.M2.CARDDEMO.TRANSACT.BKUP.G0109V00
2024-11-25T15:02:38.948Z INFO 2940 --- [ Thread-16] c.n.b.gapwalk.io.utils.CommonDDUtils : Record length read from the catalog for GDG dataset AWS.M2.CARDDEMO.TRANSACT.BKUP Generation 109 : 350
2024-11-25T15:02:38.953Z INFO 2940 --- [ Thread-16] c.n.b.g.r.job.support.DefaultJobContext : Returning stored dataset path from job context for key (AWS.M2.CARDDEMO.TRANSACT.BKUP,1)
2024-11-25T15:02:38.953Z INFO 2940 --- [ Thread-16] c.n.b.g.io.support.basic.BuilderHelper : Retrieved path from jobContext : .\AWS.M2.CARDDEMO.TRANSACT.BKUP.G0109V00
2024-11-25T15:02:38.953Z INFO 2940 --- [ Thread-16] c.n.b.gapwalk.utility.common.FileUtils : .\AWS.M2.CARDDEMO.TRANSACT.BKUP.G0109V00 - Existing file! - no file creation.
2024-11-25T15:02:39.531Z INFO 2940 --- [ Thread-16] c.n.b.g.u.s.s.e.ExternalSortTasklet : fcOut:GDGSupportConfiguration [relativeGeneration=1, name=AWS.M2.CARDDEMO.TRANSACT.DALY, ownerPath=., cacheCompression=false, warmUp=true, storageProvider=filesystem, recordSize=350, jobContext=com.netfective.bluage.gapwalk.rt.job.support.DefaultJobContext@6c00f8b8, rdw=false, bdw=false, isFixed=false, isLF=false, isCRLF=false, isMicroFocusCompatible=false, order=LIFO]
2024-11-25T15:02:39.540Z INFO 2940 --- [ Thread-16] c.n.b.g.r.job.support.DefaultJobContext : Returning stored dataset path from job context for key (AWS.M2.CARDDEMO.TRANSACT.DALY,1)
2024-11-25T15:02:39.540Z INFO 2940 --- [ Thread-16] c.n.b.g.io.support.basic.BuilderHelper : Retrieved path from jobContext : .\AWS.M2.CARDDEMO.TRANSACT.DALY.G0047V00
2024-11-25T15:02:39.541Z INFO 2940 --- [ Thread-16] c.n.b.gapwalk.utility.common.FileUtils : .\AWS.M2.CARDDEMO.TRANSACT.DALY.G0047V00 - Existing file! - no file creation.
2024-11-25T15:02:39.543Z INFO 2940 --- [ Thread-16] c.n.b.g.r.job.support.DefaultJobContext : Returning stored dataset path from job context for key (AWS.M2.CARDDEMO.TRANSACT.DALY,1)
2024-11-25T15:02:39.543Z INFO 2940 --- [ Thread-16] c.n.b.g.io.support.basic.BuilderHelper : Retrieved path from jobContext : .\AWS.M2.CARDDEMO.TRANSACT.DALY.G0047V00
2024-11-25T15:02:39.543Z INFO 2940 --- [ Thread-16] c.n.b.gapwalk.utility.common.FileUtils : .\AWS.M2.CARDDEMO.TRANSACT.DALY.G0047V00 - Existing file! - no file creation.
**2024-11-25T15:02:39.544Z INFO 2940 --- [ Thread-16] c.n.b.g.u.s.s.e.ExternalSortTasklet : Sort output file length = 0 bytes **
2024-11-25T15:02:39.549Z INFO 2940 --- [ Thread-16] c.n.b.g.r.job.support.DefaultJobContext : Returning stored dataset path from job context for key (AWS.M2.CARDDEMO.TRANSACT.DALY,1)
2024-11-25T15:02:39.549Z INFO 2940 --- [ Thread-16] c.n.b.g.io.support.basic.BuilderHelper : Retrieved path from jobContext : .\AWS.M2.CARDDEMO.TRANSACT.DALY.G0047V00
2024-11-25T15:02:39.549Z INFO 2940 --- [ Thread-16] c.n.b.g.i.c.i.AbstractDatasetCatalogImpl : Register Dataset - GDG computed absolute generation 47
2024-11-25T15:02:39.549Z INFO 2940 --- [ Thread-16] c.n.b.g.i.c.i.AbstractDatasetCatalogImpl : Registering a new dataset file AWS.M2.CARDDEMO.TRANSACT.DALY
2024-11-25T15:02:39.552Z INFO 2940 --- [ Thread-16] c.n.b.g.r.job.support.DefaultJobContext : Returning stored dataset path from job context for key (AWS.M2.CARDDEMO.TRANSACT.DALY,1)
2024-11-25T15:02:39.552Z INFO 2940 --- [ Thread-16] c.n.b.g.io.support.basic.BuilderHelper : Retrieved path from jobContext : .\AWS.M2.CARDDEMO.TRANSACT.DALY.G0047V00
2024-11-25T15:02:39.556Z INFO 2940 --- [ Thread-16] c.n.b.g.r.job.support.DefaultJobContext : Returning stored dataset path from job context for key (AWS.M2.CARDDEMO.TRANSACT.DALY,1)
2024-11-25T15:02:39.556Z INFO 2940 --- [ Thread-16] c.n.b.g.io.support.basic.BuilderHelper : Retrieved path from jobContext : .\AWS.M2.CARDDEMO.TRANSACT.DALY.G0047V00
2024-11-25T15:02:39.556Z INFO 2940 --- [ Thread-16] b.g.r.i.s.i.DefaultGDGEventsQueueHandler : [309564935] - Stacked GDG Event :GDGEvent [provider=filesystem, fsPath=./.\AWS.M2.CARDDEMO.TRANSACT.DALY.G0047V00, gdgName=AWS.M2.CARDDEMO.TRANSACT.DALY, type=NEW_GENERATION, relativeGeneration=1, absoluteGeneration=47, ] for [Thread-16]
2024-11-25T15:02:39.556Z INFO 2940 --- [ Thread-16] c.n.b.gapwalk.io.support.FileFactory : FileUtils : stack new generation event
2024-11-25_16-02-39-560 | Program return code is 0
2024-11-25_16-02-39-562 | [STEP] STEP05R - Ended
If we look at the above output - **2024-11-25T15:02:39.544Z INFO 2940 --- [ Thread-16] c.n.b.g.u.s.s.e.ExternalSortTasklet : Sort output file length = 0 bytes **
The SORTOUT is empty. I tried SORT FIELDS=COPY without INCLUDE COND and it worked fine with sort output having records in it but when we use INCLUDE COND, the output file is empty.
I looked in here to see if anyone else is facing the same issue but I could not find any. Not sure what is missing or going wrong but the behavior of this sort step in not as expected. Could any please help me out in resolving this.
Thanks.
Response to potential reasons: