Skip to content

Commit

Permalink
Issue z390development#243 two versions of SORT program
Browse files Browse the repository at this point in the history
  • Loading branch information
abekornelis committed Sep 15, 2024
1 parent d530e8a commit a42ad1c
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 411 deletions.
1 change: 1 addition & 0 deletions bash/bldlib
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ bash/asm linklib/CVTTOHEX bal notiming stats
bash/asm linklib/SQXTR bal notiming stats
bash/asm linklib/DAT bal notiming stats

bash/asml linklib/SORT notiming stats
bash/asmlg linklib/IEFBR14 "sysobj(+linklib)"

bash/asm linklib/RTGENDIR noasm bal notiming stats "sysparm(RTGENDIR)"
Expand Down
3 changes: 2 additions & 1 deletion bat/BLDLIB.BAT
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ call bat\asm %z_TraceMode% linklib\FPCONMFC bal notiming stats || goto e
call bat\asm %z_TraceMode% linklib\CVTTOHEX bal notiming stats || goto error
call bat\asm %z_TraceMode% linklib\SQXTR bal notiming stats || goto error
call bat\asm %z_TraceMode% linklib\DAT bal notiming stats || goto error
call bat\asmlg %z_TraceMode% linklib\IEFBR14 sysobj(+linklib) || goto error
call bat\asml %z_TraceMode% linklib\SORT notiming stats || goto error
call bat\asmlg %z_TraceMode% linklib\IEFBR14 notiming stats sysobj(+linklib) || goto error

rem call bat\asm %z_TraceMode% linklib\RTGENDIR noasm bal notiming stats sysparm(RTGENDIR) || goto error
rem call bat\asm %z_TraceMode% linklib\RTGENCMP noasm bal notiming stats sysparm(RTGENCMP) || goto error
Expand Down
2 changes: 1 addition & 1 deletion linklib/SORT.MLC
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.*********************************************************************
*********************************************************************
* z390 - Mainframe assembler emulator and run-time engine
* Copyright (C) 2021 z390 Assembler LLC
*
Expand Down
93 changes: 65 additions & 28 deletions sort/RUNSORT.BAT
Original file line number Diff line number Diff line change
@@ -1,42 +1,79 @@
cd..
REM REBUILD sort\SORT
CALL bat\ASML sort\SORT %1 %2 %3 %4 %5
REM TESTSORT = SORT ASCII 21 RECORD SIMPLE SORT
@if /I "%1" == "tron" (echo on) else (echo off)
rem asm run macro assembly to generate relocatable obj from mlc source

setlocal
if /I "%1" == "tron" (set z_TraceMode=tron
shift /1
) else (if /I "%1" == "troff" (set z_TraceMode=troff
shift /1
) else (set z_TraceMode=)
)
set /A z_NestLevel=%z_NestLevel%+1
rem ----- Lvl(%z_NestLevel%) Start %0 %1 %2 %3 %4 %5 %6 %7 %8 %9

rem
rem TESTSORT = SORT ASCII 21 RECORD SIMPLE SORT
SET z_ReturnCode=0
SET SORTIN=sort\TESTSORT.IN[RECFM=FT,LRECL=80]
SET SORTOUT=sort\TESTSORT.OUT[RECMF=FT]
SET SYSIN=sort\TESTSORT.INI
erase sort\TESTSORT.OUT
CALL bat\EXEC sort\SORT STATS %1 %2 %3 %4 %5
IF ERRORLEVEL 1 PAUSE ERROR IN SORT1 FOR TESTSORT.OUT
copy sort\SORT.STA sort\SORT1.STA
REM TESTSRT1/2 TEST ALL KEY TYPES WITH 21 20 byte records
if exist sort\TESTSORT.OUT erase sort\TESTSORT.OUT
if exist linklib\SORT.STA erase linklib\SORT.STA
CALL bat\EXEC %z_TraceMode% linklib\SORT NOTIMING STATS %1 %2 %3 %4 %5
IF ERRORLEVEL 0 (echo **** No errors in SORT1 for TESTSORT.OUT
) ELSE (echo **** ++ Error! in SORT1 for TESTSORT.OUT
set z_ReturnCode=8)
move linklib\SORT.STA sort\SORT1.STA >NUL
rem
rem TESTSRT1/2 TEST ALL KEY TYPES WITH 21 20 byte records
SET SYSUT2=sort\TESTSRT1.IN
CALL bat\ASMLG sort\TESTSRT1 %1 %2 %3 %4 %5
IF ERRORLEVEL 1 PAUSE ERROR IN TESTSRT1 21 RECORD GEN
CALL bat\ASMLG %z_TraceMode% sort\TESTSRT1 %1 %2 %3 %4 %5
IF ERRORLEVEL 0 (echo **** No errors in TESTSRT1 21 RECORD GEN
) ELSE (echo **** ++ Error! in TESTSRT1 21 RECORD GEN
set z_ReturnCode=8)
rem
SET SORTIN=sort\TESTSRT1.IN[RECFM=F,LRECL=20]
SET SORTOUT=sort\TESTSRT1.OUT
SET SYSIN=sort\TESTSRT1.INI
erase sort\TESTSRT1.OUT
CALL bat\EXEC sort\SORT STATS %1 %2 %3 %4 %5
IF ERRORLEVEL 1 PAUSE ERROR IN SORT2 FOR TESTSRT1.OUT
copy sort\SORT.STA sort\SORT2.STA
if exist sort\TESTSRT1.OUT erase sort\TESTSRT1.OUT
CALL bat\EXEC %z_TraceMode% linklib\SORT STATS %1 %2 %3 %4 %5
IF ERRORLEVEL 0 (echo **** No errors in SORT2 for TESTSRT1.OUT
) ELSE (echo **** ++ Error! in SORT2 for TESTSRT1.OUT
set z_ReturnCode=8)
move linklib\SORT.STA sort\SORT2.STA >NUL
rem
SET SYSUT1=sort\TESTSRT1.OUT
CALL bat\ASMLG sort\TESTSRT2 %1 %2 %3 %4 %5
IF ERRORLEVEL 1 PAUSE ERROR IN TESTSRT2 VERIFY TESTSRT1.OUT
REM TESTSRT3/4 TEST SORTING 100000 USING 1000 REC TABLE
CALL bat\ASMLG %z_TraceMode% sort\TESTSRT2 %1 %2 %3 %4 %5
IF ERRORLEVEL 0 (echo **** No errors in TESTSRT2 verify TESTSRT1.OUT
) ELSE (echo **** ++ Error! in TESTSRT2 verify TESTSRT1.OUT
set z_ReturnCode=8)
rem
rem TESTSRT3/4 TEST SORTING 100000 USING 1000 REC TABLE
SET SYSUT2=sort\TESTSRT3.IN
CALL bat\ASMLG sort\TESTSRT3 PARM(100000) %1 %2 %3 %4 %5
IF ERRORLEVEL 1 PAUSE ERROR IN TESTSRT3 100000 RECORD GEN
CALL bat\ASMLG %z_TraceMode% sort\TESTSRT3 PARM(100000) %1 %2 %3 %4 %5
IF ERRORLEVEL 0 (echo **** No errors in TESTSRT3 100000 record gen
) ELSE (echo **** ++ Error! in TESTSRT3 100000 record gen
set z_ReturnCode=8)
rem
SET SORTIN=sort\TESTSRT3.IN[RECFM=F,LRECL=4]
SET SORTOUT=sort\TESTSRT3.OUT
SET SYSIN=sort\TESTSRT3.INI
erase sort\TESTSRT3.OUT
CALL bat\EXEC sort\SORT STATS PARM(1000) %1 %2 %3 %4 %5
IF ERRORLEVEL 1 PAUSE ERROR IN SORT FOR TESTSRT3.OUT
copy sort\SORT.STA sort\SORT3.STA
if exist sort\TESTSRT3.OUT erase sort\TESTSRT3.OUT
CALL bat\EXEC %z_TraceMode% linklib\SORT STATS PARM(1000) %1 %2 %3 %4 %5
IF ERRORLEVEL 0 (echo **** No errors in SORT for TESTSRT3.OUT
) ELSE (echo **** ++ Error! in SORT for TESTSRT3.OUT
set z_ReturnCode=8)
move linklib\SORT.STA sort\SORT3.STA >NUL
rem
SET SYSUT1=sort\TESTSRT3.OUT
CALL bat\ASMLG sort\TESTSRT4 PARM(100000) %1 %2 %3 %4 %5
IF ERRORLEVEL 1 PAUSE ERROR IN TESTSRT4 VERIFY TESTSRT3.OUT
PAUSE VERIFY ALL SORT TESTS OK

CALL bat\ASMLG %z_TraceMode% sort\TESTSRT4 PARM(100000) %1 %2 %3 %4 %5
IF ERRORLEVEL 0 (echo **** No errors in TESTSRT4 verify TESTSRT3.OUT
) ELSE (echo **** ++ Error! in TESTSRT4 verify TESTSRT3.OUT
set z_ReturnCode=8)
rem
if exist SORTWK*.TMP erase SORTWK*.TMP
if %z_ReturnCode% == 0 echo **** All SORT tests completed okay

:return
rem ----- Lvl(%z_NestLevel%) End %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
exit /b %z_ReturnCode%
Loading

0 comments on commit a42ad1c

Please sign in to comment.