I have created a test View database and encrypted all the reports.
I then ran a SARPAC to encrypt ALL the tapes.
How can I check to see if the tapes are now really encrypted?
Release : 14.0
Here is a REXX program to map a View tape and will tell whether the reports on it are encrypted:
/* REXX */
ip_count = 0
hdg = 0
Call READ_TAPE
Do While rc = 0
if substr(input_rec,1,8) = '0E0800000E040000'x then
call PRINT_GCR
if substr(input_rec,5,12) = '030800000000000000000000'x then
call PRINT_INDEX
Call READ_TAPE
End
Exit
PRINT_GCR:
Parse Var input_rec,
9 gcr_id +32,
41 gcr_gen +2,
43 gcr_seq +2,
50 gcr_jnam +8,
58 gcr_jid +8,
221 gcr_adtm +8,
226 gcr_atime +3,
281 gcr_tsq +2,
285 gcr_ltm +4,
3321 gcr_enc +1
gcr_gen = RIGHT(C2D(gcr_gen),5)
gcr_seq = RIGHT(C2D(gcr_seq),5)
gcr_adtm = C2X(gcr_adtm)
parse var gcr_adtm,
1 yyyy +4,
5 mm +2,
7 dd +2,
11 hh +2,
13 mn +2,
15 ss +2
gcr_adate = mm'/'dd'/'yyyy
gcr_atime = hh':'mn':'ss
gcr_tsq = RIGHT(C2D(gcr_tsq),5)
gcr_ltm = RIGHT(c2d(gcr_ltm)+1,7)
encrypt = 'NO'
if gcr_enc = '01'x | gcr_enc = '04'x then
encrypt='YES'
call PRINT_HDG
say gcr_tsq gcr_ltm gcr_id gcr_jnam gcr_jid gcr_gen gcr_seq,
gcr_adate gcr_atime encrypt
return
PRINT_INDEX:
Parse Var input_rec,
45 idx_gen +2,
57 idx_tsq +2,
61 idx_ltm +4
idx_gen = RIGHT(C2D(idx_gen),5)
idx_tsq = RIGHT(C2D(idx_tsq),5)
idx_ltm = RIGHT(c2d(idx_ltm)+1,7)
idx_id = LEFT('*** INDX ***',32)
idx_jnam = ' '
idx_jid = ' '
call PRINT_HDG
say idx_tsq idx_ltm idx_id idx_jnam idx_jid idx_gen
return
PRINT_HDG:
if hdg <> 0 then return
hdg = 1
say ' Tape Rec Pos ID Jobname ',
'Jobid Gen Seq Arch Date Time Encrypted'
Say '----- ------- -------------------------------- --------',
'-------- ----- ----- ---------- -------- ---------'
return
READ_TAPE:
"EXECIO 1 DISKR SARTAPE"
If rc = 0 Then do
ip_count = ip_count + 1
Parse Pull input_rec
end
return
---------------------------------------------------------------------------------------------------------
The REXX program should be copied to a CLIST or REXX library and can be run with the below JCL.
Note: The REXX program will receive a S237-04 abend at end-of-tape, which is expected, and be ignored.
//VIEWTMAP JOB ...
//IRXJCL01 EXEC PGM=IRXJCL,PARM='VIEWTMAP'
//STEPLIB DD DISP=SHR,DSN=VIEW.CVDELOAD
//SYSEXEC DD DISP=SHR,DSN=REXX.LIBRARY
//SYSTSPRT DD SYSOUT=*,DCB=(RECFM=FB,LRECL=133,BLKSIZE=1330)
//SYSTSIN DD DUMMY
//SYSUDUMP DD SYSOUT=*
//SARTAPE DD DISP=SHR,DSN=VIEW.SYSTEM1.SARTAPE.T0000???
//
Please do the following:
. Provide a valid JOB card
. Change or remove STEPLIB
. Change SYSEXEC to reference the data set containing the VIEWTMAP REXX EXEC
. Change SARTAPE to the tape that was consolidated tape, or you want to map.
--------------------------------------------------------------------------------------------------
The report has a column, at the far right, to indicate if the report is encrypted.
Sample report:
Tape Rec Pos ID Jobname Jobid Gen Seq Arch Date Time Encrypted
----- ------- -------------------------------- ------------- -------- ----- ----- ---------- ------- ---------
76 1 JOBTST JOBTST JOB23087 159 1 05/28/2021 18:33:50 YES