@echo OFF
set JOB_NAME=PUDA2EW2
rem * *******************************************************************
rem * This Job Script is provided by SimoTime Technologies *
rem * (C) Copyright 1987-2020 All Rights Reserved *
rem * Web Site URL: http://www.simotime.com *
rem * e-mail: helpdesk@simotime.com *
rem * *******************************************************************
rem *
rem * Text - Read ASC Record Sequential, write EBC Record Sequential.
rem * Author - SimoTime Technologies
rem * Date - January 24, 1996
rem *
rem * The job will read an ASCII-encoded Record Sequential file (RSEQ)
rem * containing fixed-length records of 1024 bytes. This job will create
rem * a new EBCDIC-encoded Record Sequential file (RSEQ) containing
rem * fixed-length records of 1024 bytes.
rem * Both files will maintain the numeric integrity for the packed
rem * decimal numeric formats.
rem *
rem * ************
rem * * PUDA2EW1 *
rem * ********cmd*
rem * *
rem * *
rem * ************
rem * * ENV1BASE *
rem * ********cmd*
rem * *
rem * *
rem * ************
rem * * SIMONOTE *
rem * ********cmd*
rem * *
rem * *
rem * ************
rem * * RUN *---------------------------*
rem * ********rts* *
rem * * ************ ************ ************
rem * * * SYSUT1 *-----* PUDA2EC1 *--*--* SYSUT2 *
rem * * * Note-1 * ********cbl* * * Note-2 *
rem * * *******rseq* * *******rseq*
rem * * *
rem * * * ************
rem * * *--* SYSOUT *
rem * * * Note-3 *
rem * * *******lseq*
rem * ************
rem * * EOJ *
rem * ************
rem *
rem * Note-1: SYSUT1 is an ASCII-encoded, record sequential (RSEQ)
rem * file.
rem *
rem * Note-2: SYSUT2 is an EBCDIC-encoded, record sequential (RSEQ)
rem * file.
rem *
rem * Note-3: SYSOUT is an ASCII-encoded, line sequential (LSEQ)
rem * file.
rem *
rem * *******************************************************************
rem * Step 1, Set Environment Variables
rem * Delete any previously created EBCDIC-encoded file...
rem *
call ..\ENV1BASE
rem *
call SIMONOTE "*******************************************************************************%JOB_NAME%"
call SIMONOTE "* Starting JobName %JOB_NAME%, User is %USERNAME% "
call SIMONOTE "* Job_Step 01 of 03, Preparing System and Job Environment"
set SYSOUT=%BaseLib1%\LOGS\SYSOUT_%JOB_NAME%.txt
set SYSUT1=%BaseLib1%\DATA\ASC1\NVPUDDD1.DAT
set SYSUT2=%BaseLib1%\DATA\EBC1\NVPUDDD2.DAT
if exist %SYSUT2% del %SYSUT2%
rem *
call SIMONOTE "* --------------------------------------------------------------------------- *"
call SIMONOTE "* Job_Step 02 of 03, Read ASC-encoded RSEQ, create a new EBC-encoded RSEQ"
call SIMONOTE "* DataTake SYSUT1=%SYSUT1% "
call SIMONOTE "* DataMake SYSUT2=%SYSUT2% "
run PUDA2EC1
if not "%ERRORLEVEL%" == "0" set JobStatus=0010
if not "%JobStatus%" == "0000" goto EOJTAG
if exist %SYSUT2% goto EOJTAG
set JobStatus=0020
goto EOJTAG
:EOJTAG
call SIMONOTE "* --------------------------------------------------------------------------- *"
call SIMONOTE "* Job_Step 03 of 03, End of Job Processing..."
if not "%JobStatus%" == "0000" goto EojNOK
:EojAOK
call SIMONOTE "* Produced %SYSUT2% "
call SIMONOTE "* Finished JOB_NAME %JOB_NAME%, Job Status is %JobStatus% "
goto :End
:EojNOK
call SIMONOTE "* ABENDING JOB_NAME %JOB_NAME%, Job Status is %JobStatus% "
goto :End
:End
call SIMONOTE "* Conclude SysOut is %SYSOUT% "
if not "%1" == "nopause" pause
exit /B %JobStatus%