C   23/03/97 703231322  MEMBER NAME  JEOSUM1  (JADESR)      FORTRAN
$   13/09/84 509150240  MEMBER NAME  ˘COPYLB  (JADESR)      CLIST
$
$---------------------------------------------------
$
$        COPY RUTH TAPES TO DESY AND ARCHIVE
$             (FOR REDUC1 NUMBERS > 1000)
$
$---------------------------------------------------
$
FULL OFF
V OFF OFF
SET ESCAPE='˘'
ON ERROR GOTO END
ON ATTENTION GOTO END
$
SHOW ' '
SHOW ' '
SHOW ' '
SHOW '        C-LIST TO COPY RUTH TAPES TO DESY AND ARCHIVE'
SHOW '        ============================================='
SHOW ' '
SHOW ' '
READ INTO S23 PROMPT 'IS THE MEMBER COPYMEM UPDATED ? (Y OR N) '
SHOW ' '
SET S23=SUBSTR(S23,1,1)
IF S23^='Y' GOTO END
$
READ INTO S23 PROMPT 'START SUBMISSION OF JOBS ?????  (Y OR N) '
SHOW ' '
SET S23=SUBSTR(S23,1,1)
IF S23^='Y' GOTO END
$----------------------------------
$ CREATE/CLEAR DUMMY MEMBER FOR JCL
$----------------------------------
$
SC ###JUNK
IF DIR('###JUNK') = 'T'  GOTO SKIP1
./ ADD ###JUNK
./ LABEL NOMACRO
LABEL SKIP1
$
$RINT COPYMEM DEST LOCAL
$
$-------------------
$  NEXT TAPE NUMBERS
$-------------------
$
LABEL AGAIN
READ INTO S7 PROMPT ' ' MEMBER COPYMEM USING
READ INTO S7 PROMPT ' ' MEMBER COPYMEM POINT
READ INTO S7 PROMPT ' ' MEMBER COPYMEM POINT
SET S17=SUBSTR(S7,1,3)
IF S17='END' GOTO END
SET S2=SUBSTR(S7,7,6)
SET S1=SUBSTR(S7,15,4)
SET S40='JADE˘(S1)'
$
$--------------
$ CONSTRUCT JCL
$--------------
$
C ###JUNK
D 0 900000
$
./ INSERT 1 1
//˘(S40) JOB 10622622,REDUCONE,CLASS=A,MSGLEVEL=(1,0),TIME=(01,00)
//*MAIN RELPRI=MED,LINES=(2),ORG=LOCAL
//*
//*---------------------------------------------------------------------
//*
//* JOB TO COPY REDUC1 MERGE DATA FROM A RUTHERFORD TAPE TO A DESY TAPE
//*
//* SYSUT1 = (INPUT) RUTHERFORD TAPE CONTAINING REDUC1 MERGE DATA
//*        = EPR.REDUC1.G0˘(S1)    TAPE=˘(S2)    LABEL=1
//*
//* SYSUT2 = (OUTPUT) DESY MACHINE ROOM TAPE
//*        = JADEPR.REDUCONE.G˘(S1)V00
//*
//*---------------------------------------------------------------------
//*
//* STEP 1 - THE COPY
//* =================
//*
//RUTHCOPY EXEC PGM=IEBGENER,REGION=165K
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD UNIT=TAPE,DISP=(OLD,KEEP),
//       DSN=EPR.REDUC1.G0˘(S1),
//       VOL=SER=(˘(S2)),
//       LABEL=(1,SL,,IN)
//SYSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//      DSN=JADEPR.REDUCONE.G˘(S1)V00
//*
//* STEP 2 - THE EVENT CHECK
//* ========================
//*
//LISTRUNS EXEC PGM=LISTRUNS,REGION=300K
//STEPLIB DD DSN=F11PEA.GENERAL.LOAD,DISP=SHR
//FT06F001 DD SYSOUT=*
//FT02F001 DD DISP=SHR,DSN=JADEPR.REDUCONE.G˘(S1)V00
//*
//* STEP 3 - ARCHIVE
//* ========================
//*
//ARCHIVE EXEC PGM=IEBGENER,REGION=165K
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//*
//*-----------------------------------------------------------
//*
//* JOB TO MAKE A BACKUP-ARCHIVE COPY OF A REDUC1 TAPE AT DESY
//*
//* SYSUT1 = INPUT REDUC1 TAPE TO BE COPIED
//*        = JADEPR.REDUCONE.G˘(S1)V00
//*
//* SYSUT2 = OUTPUT ARCHIVE COPY TAPE
//*        = JADEPR.ARCHIVE.REDU˘(S1)
//*
//*-----------------------------------------------------------
//*
//SYSUT1 DD UNIT=TAPE,DISP=SHR,
//       DSN=JADEPR.REDUCONE.G˘(S1)V00
//SYSUT2 DD UNIT=ARCHIV,DISP=(NEW,CATLG,DELETE),
//      DSN=JADEPR.ARCHIVE.REDU˘(S1)
//
./ LABEL NOMACRO
SUB ###JUNK
SHOW '         *****   JOB ˘(S40) SUBMITTED   *****'
C COPYMEM
RENUM
DEL 200
$EAD INTO S27 PROMPT 'PRESS ENTER TO CONT.'
GOTO AGAIN
$
LABEL END
C COPYMEM
SAVE COPYMEM
SET ESCAPE=''
V ON
FULL ON
SHOW ' '
SHOW '--- END OF CLIST'
RETURN
$
$   13/09/84 507131145  MEMBER NAME  ˘COPYL-1 (JADESR)      CLIST
$
$---------------------------------------------------
$
$        COPY RUTH TAPES TO DESY AND ARCHIVE
$
$---------------------------------------------------
$
FULL OFF
V OFF OFF
SET ESCAPE='˘'
ON ERROR GOTO END
ON ATTENTION GOTO END
$
SHOW ' '
SHOW ' '
SHOW ' '
SHOW '        C-LIST TO COPY RUTH TAPES TO DESY AND ARCHIVE'
SHOW '        ============================================='
SHOW ' '
SHOW ' '
READ INTO S23 PROMPT 'IS THE MEMBER COPYMEM UPDATED ? (Y OR N) '
SHOW ' '
SET S23=SUBSTR(S23,1,1)
IF S23^='Y' GOTO END
$
READ INTO S23 PROMPT 'START SUBMISSION OF JOBS ?????  (Y OR N) '
SHOW ' '
SET S23=SUBSTR(S23,1,1)
IF S23^='Y' GOTO END
$----------------------------------
$ CREATE/CLEAR DUMMY MEMBER FOR JCL
$----------------------------------
$
SC ###JUNK
IF DIR('###JUNK') = 'T'  GOTO SKIP1
./ ADD ###JUNK
./ LABEL NOMACRO
LABEL SKIP1
$
PRINT COPYMEM DEST LOCAL
$
$-------------------
$  NEXT TAPE NUMBERS
$-------------------
$
LABEL AGAIN
READ INTO S7 PROMPT ' ' MEMBER COPYMEM USING
READ INTO S7 PROMPT ' ' MEMBER COPYMEM POINT
READ INTO S7 PROMPT ' ' MEMBER COPYMEM POINT
SET S17=SUBSTR(S7,1,3)
IF S17='END' GOTO END
SET S2=SUBSTR(S7,7,6)
SET S1=SUBSTR(S7,16,3)
SET S40='JADEC˘(S1)'
$
$--------------
$ CONSTRUCT JCL
$--------------
$
C ###JUNK
D 0 900000
$
./ INSERT 1 1
//˘(S40) JOB 10622622,REDUCONE,CLASS=A,MSGLEVEL=(1,0),TIME=(01,00)
//*MAIN RELPRI=MED,LINES=(2),ORG=LOCAL
//*
//*---------------------------------------------------------------------
//*
//* JOB TO COPY REDUC1 MERGE DATA FROM A RUTHERFORD TAPE TO A DESY TAPE
//*
//* SYSUT1 = (INPUT) RUTHERFORD TAPE CONTAINING REDUC1 MERGE DATA
//*        = JADEPR.REDUC1.G0˘(S1)    TAPE=˘(S2)    LABEL=1
//*
//* SYSUT2 = (OUTPUT) DESY MACHINE ROOM TAPE
//*        = JADEPR.REDUCONE.G0˘(S1)V00
//*
//*---------------------------------------------------------------------
//*
//* STEP 1 - THE COPY
//* =================
//*
//RUTHCOPY EXEC PGM=IEBGENER,REGION=165K
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD UNIT=TAPE,DISP=(OLD,KEEP),
//       DSN=JADEPR.REDUC1.G0˘(S1),
//       VOL=SER=(˘(S2)),
//       LABEL=(1,SL,,IN)
//SYSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//      DSN=JADEPR.REDUCONE.G0˘(S1)V00
//*
//* STEP 2 - THE EVENT CHECK
//* ========================
//*
//LISTRUNS EXEC PGM=LISTRUNS,REGION=300K
//STEPLIB DD DSN=F11PEA.GENERAL.LOAD,DISP=SHR
//FT06F001 DD SYSOUT=*
//FT02F001 DD DISP=SHR,DSN=JADEPR.REDUCONE.G0˘(S1)V00
//*
//* STEP 3 - ARCHIVE
//* ========================
//*
//ARCHIVE EXEC PGM=IEBGENER,REGION=165K
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//*
//*-----------------------------------------------------------
//*
//* JOB TO MAKE A BACKUP-ARCHIVE COPY OF A REDUC1 TAPE AT DESY
//*
//* SYSUT1 = INPUT REDUC1 TAPE TO BE COPIED
//*        = JADEPR.REDUCONE.G0˘(S1)V00
//*
//* SYSUT2 = OUTPUT ARCHIVE COPY TAPE
//*        = JADEPR.ARCHIVE.REDUC˘(S1)
//*
//*-----------------------------------------------------------
//*
//SYSUT1 DD UNIT=TAPE,DISP=SHR,
//       DSN=JADEPR.REDUCONE.G0˘(S1)V00
//SYSUT2 DD UNIT=ARCHIV,DISP=(NEW,CATLG,DELETE),
//      DSN=JADEPR.ARCHIVE.REDUC˘(S1)
//
./ LABEL NOMACRO
SUB ###JUNK
SHOW '         *****   JOB ˘(S40) SUBMITTED   *****'
C COPYMEM
RENUM
DEL 200
$EAD INTO S27 PROMPT 'PRESS ENTER TO CONT.'
GOTO AGAIN
$
LABEL END
SC ###JUNK
C COPYMEM
SAVE COPYMEM
SET ESCAPE=''
V ON
FULL ON
SHOW ' '
SHOW '--- END OF CLIST'
RETURN
$
$   28/05/84 508061722 MEMBER NAME  ˘SEARCH  (BIBLS)       NEWLIB
$
$    This CLIST searches for a string in the current PS
$
$    COMMAND=> (CLSEARCH)      ( copied from F22BOW and changed )
$
$    where 'string' can be anything acceptable to the FIND command
$
$    SEARCH in other libraries:
$
$    E.g.   N 'F22PET.LUND52.S'
$           GET BIBLS(˘SEARCH)
$           (˘SEARCH)
$
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
  FULL OFF
  VERIFY OFF OFF
  SET ESCAPE='%'
  ON ERROR GOTO END
  ON ATTENTION GOTO END
  SHOW ' '
  SHOW '                        SEARCH C-LIST'
  SHOW '                        ============= '
  SHOW ' '
  SHOW '(Search for different strings:  string1 | string2 ... )'
  SHOW ' '
  READ INTO S0 PROMPT 'Enter string(s) to be searched for: '
  SHOW ' '
  SHOW 'Searching for string: ' || S0
  SHOW ' '
  READ INTO S5 PROMPT 'Scip members (blank: start at the beginning):'
  SHOW ' '
  SET N1=S5+1
  SET S2=MEMBER
  SET S13=0
$
  LABEL TOP
  SET S1=MEMBER(N1)
  IF S1 = '  ' GOTO END
  FULL ON
  CHANGE %S1
  FULL OFF
  SHOW '                         ---->  ' || S1
  FIND %S0
  IF SYSRC = 0
    THEN
     VERIFY ON
     SHOW '          *******   String found in member: ' || S1
     FIND %S0
     VERIFY OFF OFF
     SHOW ' '
  ENDIF
  SET N1=N1+1
  GOTO TOP
$
  LABEL END
  SET S0 = ''
  FULL ON
  VERIFY  ON
  CHANGE %S2
  SHOW ' '
  SHOW 'SEARCH clist ended normally'
$   28/05/84 508061722: MEMBER NAME  ####JUNK (BIBLS)       NEWLIB
//JADED001 JOB '10622622',REDUCONE,CLASS=D,MSGLEVEL=(1,0),TIME=25
//*MAIN RELPRI=MED,LINES=(20)
//JOBLIB DD DSN=JADEPR.JADELD,DISP=SHR
//*
//*-----------------------------------------------------------
//*
//* JCL TO RUN THE JADE REDUCONE PROGRAM
//*
//* FT02F001 = INPUT REFORMAT TAPE (IE DATA TO BE REDUCED)
//*          = F11LHO.JDATA15.REFORM.G0001V00
//*
//* SYSUT2   = OUTPUT FILE FOR REDUCED EVENTS
//*          = JADEPR.RED1HH.ST001
//*
//*-----------------------------------------------------------
//*
//REDUCING EXEC PGM=REDUC1LD,REGION=960K
//FT06F001 DD SYSOUT=*
//FT07F001 DD DUMMY
//FT03F001 DD UNIT=DISK,DISP=(NEW,PASS),DSN=&&DATAOUT,
//         DCB=(RECFM=VBS,LRECL=6236,BLKSIZE=6240),
//         SPACE=(CYL,(200,50))
//FT21F001 DD DISP=SHR,DSN=F11LHO.AUPDAT0
//FT22F001 DD DISP=SHR,DSN=F11LHO.BUPDAT1
//*
//*        INPUT FILE OF EVENTS
//*
//FT02F001 DD DISP=SHR,DSN=F11LHO.JDATA15.REFORM.G0001V00
//*
//*        USER CONTROL FILE
//*
//FT05F001 DD *
STARTRUN 00000000 00000000
NOTRUNS  00000 00000 00000 00000 00000 00000 00000 00000 00000 00000
/*
//SPOOLING EXEC PGM=IEBGENER,REGION=220K
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD UNIT=DISK,DISP=(OLD,DELETE),DSN=&&DATAOUT
//*
//*        FINAL OUTPUT FILE
//*
//SYSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG,CATLG),
//       DCB=(RECFM=VBS,LRECL=6236,BLKSIZE=24948),
//       DSN=JADEPR.RED1HH.ST001
//
$   28/05/84 508061722: MEMBER NAME  ###JUNK  (BIBLS)       NEWLIB
//JADE1525 JOB 10622622,REDUCONE,CLASS=A,MSGLEVEL=(1,0),TIME=(01,00)
//*MAIN RELPRI=HIG,LINES=(2),ORG=LOCAL
//*
//*---------------------------------------------------------------------
//*
//* JOB TO COPY REDUC1 MERGE DATA FROM A RUTHERFORD TAPE TO A DESY TAPE
//*
//* SYSUT1 = (INPUT) RUTHERFORD TAPE CONTAINING REDUC1 MERGE DATA
//*        = EPR.REDUC1.G01525    TAPE=939562    LABEL=1
//*
//* SYSUT2 = (OUTPUT) DESY MACHINE ROOM TAPE
//*        = JADEPR.REDUCONE.G1525V00
//*
//*---------------------------------------------------------------------
//*
//* STEP 1 - THE COPY
//* =================
//*
//RUTHCOPY EXEC PGM=IEBGENER,REGION=165K
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD UNIT=TAPE,DISP=(OLD,KEEP),
//       DSN=EPR.REDUC1.G01525,
//       VOL=SER=(939562),
//       LABEL=(1,SL,,IN)
//SYSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//      DSN=JADEPR.REDUCONE.G1525V00
//*
//* STEP 2 - THE EVENT CHECK
//* ========================
//*
//LISTRUNS EXEC PGM=LISTRUNS,REGION=300K
//STEPLIB DD DSN=F11PEA.GENERAL.LOAD,DISP=SHR
//FT06F001 DD SYSOUT=*
//FT02F001 DD DISP=SHR,DSN=JADEPR.REDUCONE.G1525V00
//*
$   28/05/84 508061722: MEMBER NAME  #ARCHLB  (BIBLS)       NEWLIB
//JADEARCH JOB 10622622,REDUCONE,CLASS=A,MSGLEVEL=(1,0),TIME=(00,30)
//*MAIN RELPRI=MED,LINES=(2),ORG=LOCAL
//*
//*---------------------------------------------------------------------
//*
//* JOB TO COPY REDUC1 MERGE DATA TO ARCHIVE
//*
//*
//*          ARCHIVE
//*          =======
//*
//ARCHIVE EXEC PGM=IEBGENER,REGION=165K
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//*
//*-----------------------------------------------------------
//*
//* JOB TO MAKE A BACKUP-ARCHIVE COPY OF A REDUC1 TAPE AT DESY
//*
//* SYSUT1 = INPUT REDUC1 TAPE TO BE COPIED
//*        = JADEPR.REDUCONE.G1338V00
//*
//* SYSUT2 = OUTPUT ARCHIVE COPY TAPE
//*        = JADEPR.ARCHIVE.REDU1338
//*
//*-----------------------------------------------------------
//*
//SYSUT1 DD UNIT=TAPE,DISP=SHR,
//       DSN=JADEPR.REDUCONE.G1338V00
//SYSUT2 DD UNIT=ARCHIV,DISP=(NEW,CATLG,DELETE),
//      DSN=JADEPR.ARCHIVE.REDU1338
//
$   19/09/84 411090927  MEMBER NAME  #ARCH1   (JADESR)      CLIST
$
$---------------------------------------------------
$
$ #ARCH1 - TO ARCHIVE REDUCONE TAPE
$ ======                          ====
$
$
FULL OFF
V OFF OFF
SET ESCAPE='˘'
SET S7 ' '
SET S8 ' '
$
$----------------------------------
$ CREATE/CLEAR DUMMY MEMBER FOR JCL
$----------------------------------
$
SC ##JUNK
IF DIR('##JUNK') = 'T'  GOTO SKIP1
./ ADD ##JUNK
./ LABEL NOMACRO
LABEL SKIP1
C ##JUNK
D 0 900000
$
$-------------------------------
$ BRANCH TO REQUIRED REDUC1 TASK
$-------------------------------
$
IF N0^=0 GOTO NOTASK
CLEAR
SHOW '      COPY OF A REDUCONE TAPE TO AN ARCHIVE TAPE'
SHOW '      =========================================='
SHOW ' '
$
$----------------------------------------------------------------------
$    COPY A RUTHERFORD WRITTEN MERGE TAPE TO A DESY M/ROOM TAPE
$----------------------------------------------------------------------
$
$-------------------------
$ REDUC1 GENERATION NUMBER
$-------------------------
$
IF S7 = ' ' GOTO OLD
SHOW ' '
SHOW '--- REDUC1 GENERATION NUMBER IS:˘(S7)'
SHOW '--- IF THIS IS THE GENERATION NUMBER, YOU WANT PRESS ENTER'
SHOW '--- ELSE GIVE A NEW NUMBER '
READ INTO S1 PROMPT '-->'
IF LENGTH(S1)=0 GOTO NOCHANG
GOTO RUTH
LABEL NOCHANG
SET S1 = S7
GOTO RUTH
LABEL OLD
SHOW ' '
SHOW '--- ENTER THE REDUC1 GENERATION NUMBER TO BE COPIED (EG 470)'
READ INTO S1 PROMPT '-->'
IF LENGTH(S1)=0 GOTO NODEFLT
$
$---------------------------------
$ RUTHERFORD TAPE SERIAL NUMBER(S)
$---------------------------------
$
LABEL RUTH
$
$-----------
$ TIME LIMIT
$-----------
$
SET S11='(1,00)'
SET S12='A'
IF LENGTH(S2)<9 GOTO CLASSA
SET S11='(2,00)'
SET S12='K'
LABEL CLASSA
$
$--------------
$ CONSTRUCT JCL
$--------------
$
SET S7=S1+1
SET S40='JADEA˘(S1)'
./ INSERT 1 1
//˘(S40) JOB 10622622,REDUCONE,CLASS=˘(S12),MSGLEVEL=(1,0),TIME=˘(S11)
//*MAIN RELPRI=MED,LINES=(2)
//ARCHIVE EXEC PGM=IEBGENER,REGION=165K
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//*
//*-----------------------------------------------------------
//*
//* JOB TO MAKE A BACKUP-ARCHIVE COPY OF A REDUC1 TAPE AT DESY
//*
//* SYSUT1 = INPUT REDUC1 TAPE TO BE COPIED
//*        = JADEPR.REDUCONE.G0˘(S1)V00
//*
//* SYSUT2 = OUTPUT ARCHIVE COPY TAPE
//*        = JADEPR.ARCHIVE.REDUC˘(S1)
//*
//*-----------------------------------------------------------
//*
//SYSUT1 DD UNIT=TAPE,DISP=SHR,
//       DSN=JADEPR.REDUCONE.G0˘(S1)V00
//SYSUT2 DD UNIT=ARCHIV,DISP=(NEW,CATLG,DELETE),
//      DSN=JADEPR.ARCHIVE.REDUC˘(S1)
//
./ LABEL NOMACRO
GOTO SUBMIT
$
$-------------
$ SUBMIT JOB ?
$-------------
$
LABEL SUBMIT
RENUM ##JUNK 1 1
SHOW ' '
SHOW '--- JCL CREATED'
SHOW '--- PRESS RETURN/ENTER TO SUBMIT, ANYTHING ELSE TO TERMINATE :'
READ INTO S1 PROMPT '--> '
IF S1=' ' GOTO RUN
SHOW '--- SUBMIT TERMINATED'
SHOW '--- JCL MAY BE INSPECTED IN MEMBER ##JUNK'
GOTO KEEPJCL
LABEL RUN
SUBH ##JUNK
SHOW '--- JOB ˘(S40) SUBMITTED '
READ INTO S1 PROMPT '--- ANOTHER ONE ? ( Y(ES) OR N(O) )'
IF SUBSTR(S1,1,1)^='N' GOTO SKIP1
GOTO STOP
$
$----------------
$ TERMINATE CLIST
$----------------
$
LABEL NODEFLT
SHOW ' '
SHOW '--- THERE IS NO DEFAULT FOR THIS PARAMETER'
LABEL STOP
SC ##JUNK
LABEL KEEPJCL
SHOW ' '
SHOW '--- END OF CLIST'
SET ESCAPE=''
V ON
FULL ON
RETURN
$   28/05/84 508061722: MEMBER NAME  #ATOMLB  (BIBLS)       NEWLIB
//JADEATOM JOB 10622622,REDUCONE,CLASS=A,MSGLEVEL=(1,0),TIME=(00,20)
//*MAIN RELPRI=HIG,LINES=(2),ORG=LOCAL
//*
//*---------------------------------------------------------------------
//*
//*          ARCHIVE  TO  REDUCONE
//*          =====================
//*
//*   ---->  VORHER:  RETRA   !!!!!!
//*
//COP EXEC PGM=IEBGENER,REGION=165K
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//*
//SYSUT1 DD UNIT=TAPE,DISP=SHR,
//       DSN=JADEPR.ARCHIVE.REDU1200
//SYSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//       DSN=JADEPR.REDUCONE.G1200V00
//
$   28/05/84 508061722: MEMBER NAME  #COPYBAR (BIBLS)       NEWLIB
//F11BAR   JOB '10622622',CLASS=K,TIME=(02,00),MSGLEVEL=(1,1)
//*MAIN RELPRI=HIG
// EXEC FCLG,REGION.GO=800K
C
C           COPY MULTIHADRON EVENTS
C             IN BOS FORMAT
C
#include "bdata.for"
C
      DATA   IUNIT   /11/
      DATA   IUNOUT  / 4/
      DATA   NFILE   / 4/
      DATA   NEVT    / 1000000 /
C
C
      CALL BINT(40000,20000,500,500)
      CALL BWRO(IUNOUT,1558,2)
C
    1 NEVT = NEVT - 1
      IF(NEVT.LT.0) GO TO 2
      CALL BSLT
      CALL BDLG
      CALL BREAD(IUNIT,&1001,&1002)
      CALL BSLW
      CALL BWRITE( IUNOUT )
C
      GOTO 1
C
 1001 WRITE(6,104)
  104 FORMAT(X,'****** EVENT READ ERROR ******')
      GOTO 1
C
 1002 WRITE(6,105) IUNIT
  105 FORMAT(X,'***  END OF FILE ON UNIT ',I3)
      NFILE = NFILE -1
      IF( NFILE.EQ.0) GO TO 2
      GOTO 1
C
    2 CONTINUE
      CALL BMLT(0,DUMMY)
      CALL BWRITE(IUNOUT)
      CALL BSTA
      CALL PALL
      STOP
      END
//LKED.SYSLIB DD
//            DD
//            DD DSN=F11MEI.DEVL,DISP=SHR,UNIT=FAST
//            DD DSN=F11LHO.JADEGL,DISP=SHR,UNIT=FAST
//            DD DSN=F11GOD.PATRECLD,DISP=SHR,UNIT=FAST
//            DD DSN=F1EBLO.BOSLIB.L,DISP=SHR,UNIT=FAST
//            DD DSN=R01UTL.CERN.GENLIB4,DISP=SHR
//            DD DSN=R01UTL.CERN.PACKLIB4,DISP=SHR
//LKED.SYSIN DD *
//*---------------- INPUT ----------------------------------------------
//GO.FT11F001 DD DSN=JADEPR.RED1HH.ST161,DISP=OLD,UNIT=TAPE
//GO.FT11F002 DD DSN=JADEPR.RED1HH.ST161A,
//    UNIT=AFF=FT11F001,DISP=SHR
//GO.FT11F003 DD DSN=JADEPR.RED1HH.ST162,
//    UNIT=AFF=FT11F001,DISP=SHR
//GO.FT11F004 DD DSN=JADEPR.RED1HH.ST163,
//    UNIT=AFF=FT11F001,DISP=SHR
//*
//*---------------- OUTPUT ---------------------------------------------
//GO.FT04F001 DD DSN=JADEPR.REDUC1HH.G0074V00,DISP=(NEW,CATLG,CATLG),
//    UNIT=TAPE
//*O.FT04F001 DD DUMMY
$   28/05/84 508061722: MEMBER NAME  #COPYLB  (BIBLS)       NEWLIB
//JADEPRCP JOB CLASS=A,MSGLEVEL=(2,0),TIME=(00,20)
//*MAIN RELPRI=HIG,LINES=2
//*MAIN ORG=EXT
// EXEC GEP,PARM.LKED='SIZE=(600K,60K)',REGION.LKED=800K,
//  REGION.GO=1100K
//COMP.SYSIN  DD *
#include "copylb.for"
//*
//*
//*       ***************   COPY  JOB    *********************
//*
//LKED.SYSLIB DD
//            DD
//            DD
//            DD
//            DD
//            DD DISP=SHR,UNIT=FAST,DSN=F11BEK.USER.L
//            DD DISP=SHR,UNIT=FAST,DSN=F11LHO.JADEGL
//            DD DISP=SHR,UNIT=FAST,DSN=F11GOD.PATRECLD
//            DD DISP=SHR,UNIT=FAST,DSN=JADELG.LOAD
//            DD DISP=SHR,UNIT=FAST,DSN=F22ALL.JADEMUL
//            DD DISP=SHR,UNIT=FAST,DSN=R01UTL.HBOOK321.L
//            DD DISP=SHR,UNIT=FAST,DSN=R01UTL.CERN.KERNLIB4
//            DD DISP=SHR,UNIT=FAST,DSN=F1EBLO.BOSLIB.L
//            DD DISP=SHR,UNIT=FAST,DSN=F11BEK.BIBLL
//LKED.SYSIN DD *
 INCLUDE SYSLIB(JDMAIN0)
//GO.FT22F001 DD UNIT=FAST,DISP=SHR,DSN=F11LHO.AUPDAT1
//*
//*         -------   INPUT   -------
//*
//GO.FT02F001 DD DISP=SHR,DSN=JADEPR.RED1HH.ST068
//*
//*         -------   OUTPUT  -------
//*
//*O.FT03F001 DD  DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*    MSVGP=VTMP,UNIT=3330V,
//*    DSN=JADEPR.TMP.RED1HELP.R124T
//*
//GO.FT03F001 DD UNIT=FAST,DISP=(NEW,CATLG,DELETE),
//    DCB=(R01DCB.VBS,LRECL=6236),SPACE=(TRK,(300,50),RLSE),
//    DSN=JADEPR.TMP.RED1HH.ST068
//*
//*O.FT03F001 DD DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,UNIT=TAPE,
//*   DSN=F11BEK.WAT.Z84B
//*
//*
//GO.FT03F001 DD DUMMY
//GO.FT04F001 DD DUMMY
//*            -------- GEP ---------
//GO.SYSIN DD *
PRINT
DST 10  '      RUN - NUMBER  OF  WRITTEN  EVENTS
ENDQ
$   13/09/84 411090926  MEMBER NAME  #COPYR   (JADESR)      CLIST
$
$---------------------------------------------------
$
$ #COPYR - TO COPY RUTH TAPES TO DESY AND ARCHIVE
$ ======                          ====
$
$
FULL OFF
V OFF OFF
SET ESCAPE='˘'
ON ERROR GOTO END
ON ATTENTION GOTO END
SET S7 ' '
SET S8 ' '
$
$----------------------------------
$ CREATE/CLEAR DUMMY MEMBER FOR JCL
$----------------------------------
$
SC ###JUNK
IF DIR('###JUNK') = 'T'  GOTO SKIP1
./ ADD ###JUNK
./ LABEL NOMACRO
LABEL SKIP1
C ###JUNK
D 0 900000
$
$-------------------------------
$ BRANCH TO REQUIRED REDUC1 TASK
$-------------------------------
$
IF N0^=0 GOTO NOTASK
CLEAR
SHOW '      COPY OF A RUTH TAPE TO A DESY TAPE AND ADDITIOAL ARCHIVE'
SHOW '      ============================================'
SHOW ' '
$
$----------------------------------------------------------------------
$    COPY A RUTHERFORD WRITTEN MERGE TAPE TO A DESY M/ROOM TAPE
$----------------------------------------------------------------------
$
$-------------------------
$ REDUC1 GENERATION NUMBER
$-------------------------
$
IF S7 = ' ' GOTO OLD
SHOW ' '
SHOW '--- REDUC1 GENERATION NUMBER IS:˘(S7)'
SHOW '--- IF THIS IS THE GENERATION NUMBER, YOU WANT PRESS ENTER'
SHOW '--- ELSE GIVE A NEW NUMBER ("E" RETURNS)
READ INTO S1 PROMPT '-->'
SET S29=SUBSTR(S1,1,5)
IF S29='E' GOTO STOP
IF LENGTH(S1)=0 GOTO NOCHANG
GOTO RUTH
LABEL NOCHANG
SET S1 = S7
GOTO RUTH
LABEL OLD
SHOW ' '
SHOW '--- ENTER THE REDUC1 GENERATION NUMBER TO BE COPIED (EG 470)'
READ INTO S1 PROMPT '-->'
IF LENGTH(S1)=0 GOTO NODEFLT
$
$---------------------------------
$ RUTHERFORD TAPE SERIAL NUMBER(S)
$---------------------------------
$
LABEL RUTH
IF S8 =' ' GOTO OLDR
SHOW ' '
SHOW '--- RUTHERFORD TAPE NUMBER IS:˘(S8)'
SHOW '--- IF THIS IS THE TAPE NUMBER, YOU WANT PRESS ENTER'
SHOW '--- ELSE GIVE A NEW NUMBER '
READ INTO S2 PROMPT '-->'
IF LENGTH(S2)=0 GOTO NORUT
GOTO JOB
LABEL NORUT
SET S2 = S8
GOTO JOB
LABEL OLDR
SHOW ' '
SHOW '--- ENTER THE RUTHERFORD TAPE SERIAL NUMBER(S) (EG 939454,...)'
READ INTO S2 PROMPT '-->'
IF S2=' ' GOTO NODEFLT
IF LENGTH(S2)=0 GOTO NODEFLT
$
$--------------------------------------
$ RUTHERFORD TAPE LABEL SEQUENCE NUMBER
$--------------------------------------
$
LABEL JOB
SHOW ' '
SHOW '--- ENTER THE TAPE VOLUME LABEL NUMBER (DEFAULT = 1)'
READ INTO S3 PROMPT '-->'
IF S3=' ' SET S3='1'
IF LENGTH(S3)=0 SET S3='1'
$
$-----------
$ TIME LIMIT
$-----------
$
SET S11='(1,30)'
SET S12='K'
IF LENGTH(S2)<9 GOTO CLASSA
SET S11='(2,00)'
SET S12='K'
LABEL CLASSA
$
$--------------
$ CONSTRUCT JCL
$--------------
$
SET S7=S1+1
SET S8=S2+1
SET S40='JADEC˘(S1)'
./ INSERT 1 1
//˘(S40) JOB 10622622,REDUCONE,CLASS=˘(S12),MSGLEVEL=(1,0),TIME=˘(S11)
//*MAIN RELPRI=MED,LINES=(2)
//*
//*---------------------------------------------------------------------
//*
//* JOB TO COPY REDUC1 MERGE DATA FROM A RUTHERFORD TAPE TO A DESY TAPE
//*
//* SYSUT1 = (INPUT) RUTHERFORD TAPE CONTAINING REDUC1 MERGE DATA
//*        = JADEPR.REDUC1.G0˘(S1)    TAPE=˘(S2)    LABEL=˘(S3)
//*
//* SYSUT2 = (OUTPUT) DESY MACHINE ROOM TAPE
//*        = JADEPR.REDUCONE.G0˘(S1)V00
//*
//*---------------------------------------------------------------------
//*
//* STEP 1 - THE COPY
//* =================
//*
//RUTHCOPY EXEC PGM=IEBGENER,REGION=165K
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD UNIT=TAPE,DISP=(OLD,KEEP),
//       DSN=JADEPR.REDUC1.G0˘(S1),
//       VOL=SER=(˘(S2)),
//       LABEL=(˘(S3),SL,,IN)
//SYSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//      DSN=JADEPR.REDUCONE.G0˘(S1)V00
//*
//* STEP 2 - THE EVENT CHECK
//* ========================
//*
//LISTRUNS EXEC PGM=LISTRUNS,REGION=300K
//STEPLIB DD DSN=F11PEA.GENERAL.LOAD,DISP=SHR
//FT06F001 DD SYSOUT=*
//FT02F001 DD DISP=SHR,DSN=JADEPR.REDUCONE.G0˘(S1)V00
//*
//* STEP 3 - ARCHIVE
//* ========================
//*
//ARCHIVE EXEC PGM=IEBGENER,REGION=165K
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//*
//*-----------------------------------------------------------
//*
//* JOB TO MAKE A BACKUP-ARCHIVE COPY OF A REDUC1 TAPE AT DESY
//*
//* SYSUT1 = INPUT REDUC1 TAPE TO BE COPIED
//*        = JADEPR.REDUCONE.G0˘(S1)V00
//*
//* SYSUT2 = OUTPUT ARCHIVE COPY TAPE
//*        = JADEPR.ARCHIVE.REDUC˘(S1)
//*
//*-----------------------------------------------------------
//*
//SYSUT1 DD UNIT=TAPE,DISP=SHR,
//       DSN=JADEPR.REDUCONE.G0˘(S1)V00
//SYSUT2 DD UNIT=ARCHIV,DISP=(NEW,CATLG,DELETE),
//      DSN=JADEPR.ARCHIVE.REDUC˘(S1)
//
./ LABEL NOMACRO
GOTO SUBMIT
$
$-------------
$ SUBMIT JOB ?
$-------------
$
LABEL SUBMIT
RENUM ###JUNK 1 1
SHOW ' '
SHOW '--- JCL CREATED'
SHOW '--- PRESS RETURN/ENTER TO SUBMIT, ANYTHING ELSE TO TERMINATE :'
READ INTO S1 PROMPT '--> '
IF S1=' ' GOTO RUN
SHOW '--- SUBMIT TERMINATED'
SHOW '--- JCL MAY BE INSPECTED IN MEMBER ####JUNK'
GOTO KEEPJCL
LABEL RUN
SUBH ###JUNK
SHOW '--- JOB ˘(S40) SUBMITTED '
READ INTO S1 PROMPT '--- ANOTHER ONE ? ( Y(ES) OR N(O) )'
IF SUBSTR(S1,1,1)^='N' GOTO SKIP1
GOTO STOP
$
$----------------
$ TERMINATE CLIST
$----------------
$
LABEL NODEFLT
SHOW ' '
SHOW '--- THERE IS NO DEFAULT FOR THIS PARAMETER'
LABEL STOP
SC ###JUNK
LABEL KEEPJCL
SHOW ' '
SHOW '--- END OF CLIST'
SET ESCAPE=''
V ON
FULL ON
RETURN
$   28/05/84 508061722: MEMBER NAME  #COPY1   (BIBLS)       NEWLIB
//JADECO JOB 10622622,#COPY1,CLASS=A,TIME=(1,10),MSGLEVEL=(2,0)
//*MAIN ORG=EXT,RELPRI=HIG
//*     5000 PTRS=17S,     100 MC-EVENTS = 5SEC
// EXEC FCLG
C
C   VERSION OF 29/06/79    LAST MOD 20/11/79    E.ELSEN
C                          LAST MOD 19/11/81    P.WARMING
C   OUTPUT ONTO MANY DATASETS       07/04/82    P.WARMING
C   COPY ANY SET OF BOS BANKS
C   NO CHECK ON VALIDITY OF BANK NAMES
C-----------------------------------------------------------
      IMPLICIT INTEGER*2 (H)
      COMMON / BCS / IW(35000)
      DIMENSION HW(1)
      EQUIVALENCE (HW(1),IW(1))
C IN -----
      DATA IEVLIM / 99999 /,    IEVANF /     0 /,    IFILMX / 1/
C OUT-----
      INTEGER JFILMX(20) /99999, 666,   1,  50,  50,  50,99999,13*0  /
      DIMENSION HDSN(22), HVOL(3)
      REAL*8 DDIN / 'FT02F001' /
      REAL*8 DDOU(20) /'FT21F001','FT22F001','FT23F001','FT24F001',
     *    'FT25F001','FT26F001','FT27F001','FT28F001','FT29F001',
     *  'FT30F001','FT31F001','FT32F001','FT33F001','FT34F001',
     *'FT35F001','FT36F001','FT37F001','FT38F001','FT39F001','FT40F001'/
      DATA IRUNIT / 2 /
      DATA IWUNIT / 21/, JOUT/0/
C
      CALL BINT( 35000, 35000, 10000, 0 )
      CALL DUMP0C
      CALL BWRO( IWUNIT, 1558, 2 )
C                                           I/O UNIT SPECIFICATION
      CALL DDCHA( DDIN, HDSN, HERR, HVOL )
      WRITE(6,9111) HDSN, HVOL
 9111 FORMAT(/' INPUT IS FROM DSN=',22A2,' VOL=',3A2)
      CALL DDCHA( DDOU(IWUNIT-20), HDSN, HERR, HVOL )
      WRITE(6,9112) HDSN, HVOL
 9112 FORMAT(/' OUTPUT IS TO  DSN=',22A2,' VOL=',3A2)
C
C
      IFIL = 1
      IEOF = 0
      IEV = 0
  100 IF( JUHR(2) .EQ. 2 ) GO TO 4000
      CALL BREAD( IRUNIT, &1000, &3000 )
      IEOF = 0
      IEV = IEV + 1
C     IF (MOD(IEV,5).EQ.0) WRITE (8,8008) IEV
C8008 FORMAT(I10)
C///////////////////////////////////////////////////
      IF (IEV.LE.IEVANF) GOTO 2000
C
      NPHEAD = IW(IBLN('HEAD'))
      IF( NPHEAD .LE. 0 ) GO TO 899
      HRUN = HW(NPHEAD*2+10)
      HEVT = HW(NPHEAD*2+12)
      IF(HRUN.EQ.14792.AND.HEVT.EQ.3793) WRITE(6,700) HRUN,HEVT
  700 FORMAT(3X,'FOLLOWING EVENT NOT COPIED RUN# EVT# ',2I9)
      IF(HRUN.EQ.14792.AND.HEVT.EQ.3793) GO TO 2000
  899 CONTINUE
  900 CONTINUE
C
C                                           WRITE RECORDS
      CALL BSLW
      CALL BWRITE( IWUNIT )
      JOUT = JOUT + 1
      IF (JOUT.LT.JFILMX(IWUNIT-20) ) GOTO 2000
C                                           INCREMENT OUTPUT UNIT
      CALL BMLT( 0, DUMMY )
      CALL BWRITE( IWUNIT )
      CALL BSTA
      IWUNIT = IWUNIT + 1
      JOUT = 0
      CALL DDCHA( DDOU(IWUNIT-20), HDSN, HERR, HVOL )
      WRITE(6,9112) HDSN, HVOL
      CALL BWRO( IWUNIT, 1558, 2 )
      GO TO 2000
C
C                                           ERRORS
 1000 WRITE(6,9101)
 9101 FORMAT(' +++++   READ ERROR FROM BREAD +++++' )
      CALL BSLT
      CALL BDLG
      GO TO 3000
C
C                                           END OF LOOP
 2000 CALL BSLT
      CALL BDLG
      IF( IEV .LT. IEVLIM ) GO TO 100
C
C                                           EOF ON IRUNIT
 3000 IF( IFIL .GE. IFILMX .OR. IEOF.NE.0 )  GO TO 8000
      IFIL = IFIL + 1
      IEOF = 1
      WRITE(6,9104) IEV, IFIL
 9104 FORMAT(' +++++ AFTER',I6,' EVENTS END OF FILE +++++')
      CALL BMLT( 0, DUMMY )
      CALL BWRITE( IWUNIT )
      CALL BSTA
      CALL BDLS( '+BUF', IRUNIT )
      GO TO 100
C
C
 4000 WRITE(6,9103)
 9103 FORMAT(/' +++++   TIME OUT +++++')
C
C                                           END OF JOB
 8000 CONTINUE
      CALL BMLT( 0, DUMMY )
      CALL BWRITE( IWUNIT )
      CALL BSTA
      STOP
      END
//LKED.SYSLIB DD
//            DD
//            DD DSN=F22ELS.CL11,DISP=SHR,UNIT=FAST
//            DD DSN=F1EBLO.BOSLIB.L,DISP=SHR,UNIT=FAST
//            DD DSN=F11LHO.JADEGL,DISP=SHR,UNIT=FAST
//*                INPUT
//GO.FT02F001 DD UNIT=TAPE,DISP=SHR,
//   DSN=F11LHO.JDATA10.REFORM.G0050V00
//*  --------      OUTPUT     --------       --------        -----------
//GO.FT08F001 DD DUMMY
//GO.FT21F001 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//   DCB=(R01DCB.VBS,LRECL=6236,BLKSIZE=24948),
//   DSN=F11LHO.JDATA10.REFORM.G0050
/*
$   28/05/84 508061722: MEMBER NAME  #DIFFLB  (BIBLS)       NEWLIB
//JADETT   JOB BECKER,CLASS=E,TIME=(0,15),MSGLEVEL=(2,0)
//*MAIN ORG=EXT,LINES=2,RELPRI=HIG
// EXEC FCLG
C
C ------   BEGIN TEST   ------
C     7
      CALL DIFFLB
      STOP
      END
#include "difflb.for"
//LKED.SYSLIB DD
//            DD
//            DD DISP=SHR,UNIT=FAST,DSN=F11BEK.BIBLL
//            DD DISP=SHR,UNIT=FAST,DSN=R01UTL.CERN.KERNLIB4
//*
//GO.FT10F001 DD DISP=SHR,DSN=JADEPR.DSK.DESY916
//GO.FT20F001 DD DISP=SHR,DSN=JADEPR.DSK.RUTH916
//*
//GO.FT30F001 DD UNIT=FAST,DISP=(NEW,CATLG,DELETE),
//    DCB=(R01DCB.VBS,LRECL=6236),SPACE=(TRK,(300,50),RLSE),
//    DSN=JADEPR.DSK.DIFF916
//*
//GO.FT30F001 DD DUMMY
//* 27/02/82            MEMBER NAME  #ENDF    (JADESR)      JCL
//JADEPREF JOB '10622622',PRODUC,CLASS=E,MSGLEVEL=(1,1),TIME=(0,05)
//*MAIN RELPRI=HIG
//CPRC EXEC FCLG,FORT='XL,OPT=2,LEVEL=4'
//FORT.SYSIN DD *
C--- COPY FIXED LENGTH RECORDS.
      END FILE 3
      STOP
      END
//GO.FT03F001 DD UNIT=FAST,DISP=OLD,DSN=F22WAT.LGBAD0
//* 31/07/84 504151221  MEMBER NAME  #EVT1    (JADESR)      JCL
//JADDUMP1 JOB '10622622',KAW,CLASS=A,MSGLEVEL=(1,1),TIME=(0,45)
//*MAIN LINES=(2),ORG=EXT,RELPRI=MED
//* #EVT1 IS FOR ONE NORD TAPE WITH ONE FILE TO ONE EXDATA TAPE
// EXEC NEWFAST
// EXEC FCLG
#include "evt.for"
//LKED.SYSLIB DD
// DD
// DD DSN=F22HIL.MTL,DISP=SHR,UNIT=FAST
// DD DSN=R01UTL.CERN.KERNLIB4,DISP=SHR
//LKED.JADE DD DSN=JADEPR.JADELD,DISP=SHR
 INCLUDE JADE(EVPK)
//*
//*                input
//*
//GO.FT09F001 DD DSN=F22YEN.NORD10,DISP=SHR,UNIT=TAPE,VOL=SER=JDAS04,
// DCB=(RECFM=F,BLKSIZE=4096,DEN=3),LABEL=(1,NL)
//*
//*                output
//*
//GO.FT02F001 DD UNIT=DISK,DISP=(,PASS),SPACE=(CYL,(90,50)),
// DSN=&&OUTPUT,DCB=(R01DCB.VBS,BLKSIZE=6240,LRECL=6236)
F22RAM.TAPE04
//*-------------------------------------------------------------------
// EXEC PGM=IEBGENER
//*YSUT1 DD UNIT=DISK,DISP=(OLD,DELETE),DSN=&&OUTPUT
//*YSUT2 DD DSN=F22YEN.JADE.EXTAPE01.G0088V00,UNIT=TAPE,
//*DCB=(R01DCB.VBS,BLKSIZE=6240,LRECL=6236),DISP=(NEW,CATLG,CATLG)
//SYSUT2 DD DSN=F22RAM.TAPE04,UNIT=TAPE,
// DCB=(R01DCB.VBS,BLKSIZE=6240,LRECL=6236),DISP=(NEW,CATLG,CATLG)
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//*-------------------------------------------------------------------
$   28/05/84 508061722: MEMBER NAME  #EVT2    (BIBLS)       NEWLIB
//JADDUMP2 JOB '10622622',KAW,CLASS=A,MSGLEVEL=(1,1),TIME=(1,0)
//*MAIN LINES=(2),ORG=EXT,RELPRI=HIGH
//* #EVT2 IS FOR ONE NORD TAPE WITH SEVERAL EOFS TO ONE EXDATA TAPE
//* AT THE END OF THIS PROGRAM YOU SHOULD SUPPLY THE BEGINNING AND THE
//* END OF RUN NUMBERS IN I5 FORMAT
// EXEC NEWFAST
// EXEC FCLG
#include "evt2.for"
//LKED.SYSLIB DD
// DD
// DD DSN=F22HIL.MTL,DISP=SHR,UNIT=FAST
// DD DSN=R01UTL.CERN.KERNLIB4,DISP=SHR,UNIT=FAST
//LKED.JADE DD DSN=JADEPR.JADELD,DISP=SHR
 INCLUDE JADE(EVPK)
//GO.FT02F001 DD UNIT=DISK,DISP=(,PASS),SPACE=(CYL,(90,50)),
// DSN=&&OUTPUT,DCB=(R01DCB.VBS,BLKSIZE=6240,LRECL=6236)
//GO.FT09F001 DD DSN=F22YEN.NORD10,UNIT=TAPE,VOL=SER=F11206,
// DCB=(RECFM=F,BLKSIZE=4096,DEN=3),LABEL=(1,NL),DISP=(SHR,PASS)
//GO.FT10F001 DD DSN=F22YEN.NORD10,UNIT=AFF=FT09F001,VOL=SER=F11206,
// DCB=(RECFM=F,BLKSIZE=4096,DEN=3),LABEL=(2,NL),DISP=(SHR,PASS)
//GO.FT11F001 DD DSN=F22YEN.NORD10,UNIT=AFF=FT09F001,VOL=SER=F11206,
// DCB=(RECFM=F,BLKSIZE=4096,DEN=3),LABEL=(3,NL),DISP=(SHR,PASS)
//GO.FT12F001 DD DSN=F22YEN.NORD10,UNIT=AFF=FT09F001,VOL=SER=F11206,
// DCB=(RECFM=F,BLKSIZE=4096,DEN=3),LABEL=(4,NL),DISP=(SHR,PASS)
//GO.FT13F001 DD DSN=F22YEN.NORD10,UNIT=AFF=FT09F001,VOL=SER=F11206,
// DCB=(RECFM=F,BLKSIZE=4096,DEN=3),LABEL=(5,NL),DISP=(SHR,PASS)
F22RAM.TAPE3
1859918602
//*-------------------------------------------------------------------
// EXEC PGM=IEBGENER
//SYSUT1 DD UNIT=DISK,DISP=(OLD,DELETE),DSN=&&OUTPUT
//*YSUT2 DD DSN=F22YEN.JADE.EXTAPE01.G0074V00,UNIT=TAPE,
//*DCB=(R01DCB.VBS,BLKSIZE=6240,LRECL=6236),DISP=(NEW,CATLG,CATLG)
//SYSUT2 DD DSN=F22RAM.TAPE3,UNIT=TAPE,
// DCB=(R01DCB.VBS,BLKSIZE=6240,LRECL=6236),DISP=(NEW,CATLG,CATLG)
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//*-------------------------------------------------------------------
$   28/05/84 508061722: MEMBER NAME  #EVT3    (BIBLS)       NEWLIB
//JADDUMP3 JOB '10622622',KAWBATA,CLASS=A,MSGLEVEL=(1,1),TIME=(1,00)
//*MAIN LINES=(2),ORG=EXT
//* THIS IS FOR SEVERAL NORD TAPES TO ONE EXTEST TAPE
// EXEC NEWFAST
// EXEC FCLG,REGION=600K
#include "evt.for"
//LKED.SYSLIB DD
// DD
// DD DSN=F22HIL.MTL,DISP=SHR,UNIT=FAST
// DD DSN=R01UTL.CERN.KERNLIB4,DISP=SHR,UNIT=FAST
//LKED.JADE DD DSN=JADEPR.JADELD,DISP=SHR
 INCLUDE JADE(EVPK)
//GO.FT09F001 DD DSN=F22YEN.NORD10,DISP=SHR,UNIT=TAPE,VOL=SER=F11180,
// DCB=(RECFM=F,BLKSIZE=4096,DEN=3),LABEL=(1,NL)
//                      DD DSN=F22YEN.NORD10,DISP=SHR,VOL=SER=F11197,
// DCB=(RECFM=F,BLKSIZE=4096,DEN=3),LABEL=(1,NL),UNIT=AFF=FT09F001
//GO.FT02F001 DD UNIT=DISK,DISP=(,PASS),SPACE=(CYL,(90,50)),
// DSN=&&OUTPUT,DCB=(R01DCB.VBS,BLKSIZE=6240,LRECL=6236)
JADE.EXTAPE01.G0074
//*-------------------------------------------------------------------
// EXEC PGM=IEBGENER
//SYSUT1 DD UNIT=DISK,DISP=(OLD,DELETE),DSN=&&OUTPUT
//SYSUT2 DD DSN=F22YEN.JADE.EXTAPE01.G0074V00,UNIT=TAPE,
// DCB=(R01DCB.VBS,BLKSIZE=6240,LRECL=6236),DISP=(NEW,CATLG,CATLG)
//*SYSUT2 DD DSN=F11HEU.COSM.R6178U82,UNIT=TAPE,
//* DCB=(R01DCB.VBS,BLKSIZE=6240,LRECL=6236),DISP=(NEW,CATLG,CATLG)
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//*-------------------------------------------------------------------
//* 27/02/82 202271304  MEMBER NAME  #KALCOP  (JADESR)      JCL
//JADEPRC3 JOB 10622622,'KALCOP',TIME=(0,10),CLASS=E
//*MAIN RELPRI=HIG
// EXEC FCLG,LIB1='F11LHO.JADEGL'
//FORT.SYSIN DD *
      CALL KALCOP
      STOP
      END
      SUBROUTINE KALCOP
      IMPLICIT INTEGER*2 (H)
C---
C---     SIMPLE COPY.
C---                                   L.H. O'NEILL 10.09.79
C---
      DIMENSION JBUF(10000),IDAT(9991),HBUF(20000),ITIME(6),NAME( 7)
      EQUIVALENCE(JBUF(1),HBUF(1))
      EQUIVALENCE(JBUF(10),IDAT(1))
C---
      NREC=0
    1 CONTINUE
      CALL EVREA1(2,NWORD,JBUF,IRET)
      IF(IRET.EQ.1) GO TO 1000
      IF(IRET.EQ.2) GO TO 2000
      NREC=NREC+1
C     IOUT=NWORD
C     IF(IOUT.GT.10) IOUT=10
C     WRITE(6,100) NREC,NWORD,(JBUF(I),I=1,IOUT)
  100 FORMAT(1X,I4,I12,10I10)
      CALL KALBNK(3,NWORD,JBUF)
      GO TO 1
 1000 CONTINUE
      WRITE(6,101) NREC
  101 FORMAT(' *** READ ERROR ENCOUNTERED AFTER ',I4,' RECORDS.')
      RETURN
 2000 CONTINUE
      WRITE(6,102) NREC
  102 FORMAT('0NORMAL END OF FILE AFTER',I4,' RECORDS.')
      RETURN
      END
//GO.FT02F001 DD UNIT=FAST,DISP=SHR,DSN=F11LHO.KALWRK0
//GO.FT03F001 DD UNIT=FAST,DISP=SHR,DSN=F11LHO.AUPDAT1
//*GO.FT03F001 DD UNIT=FAST,DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*  SPACE=(TRK,(50,20),RLSE),DSN=F11LHO.KB80023D
$   28/05/84 508061722: MEMBER NAME  #LKRED1  (BIBLS)       NEWLIB
//JADER1LK JOB '10622622',REDUCONE,CLASS=E,TIME=(0,15)
//*MAIN RELPRI=LOW,LINES=(2),ORG=EXT
//*
//*-------------------------------------------------------
//*
//* JOB TO LINK AN EXECUTABLE REDUC1 LOAD MODULE AT DESY
//* NEW MODULE NAME = JADEPR.JADELD(REDUC1LD)
//*
//*-------------------------------------------------------
//*
//JOBLIB DD DSN=R02BUT.FORTRANH,DISP=SHR
// EXEC FCL,FORT=XL,PARM.LKED='LIST,MAP'
//FORT.SYSIN DD *
#include "jdmain0.for"
//*
//LKED.SYSLIB DD
//            DD
//            DD DISP=SHR,UNIT=FAST,DSN=JADEPR.JADELD
//            DD DISP=SHR,UNIT=FAST,DSN=F11GOD.PATRECLD
//            DD DISP=SHR,UNIT=FAST,DSN=F11LHO.JADEGL
//            DD DISP=SHR,UNIT=FAST,DSN=JADELG.LOAD
//            DD DISP=SHR,UNIT=FAST,DSN=F22ALL.JADEMUL
//            DD DISP=SHR,UNIT=FAST,DSN=F1EBLO.BOSLIB.L
//*           DD DISP=SHR,UNIT=FAST,DSN=R01UTL.HBOOK321.L
//            DD DISP=SHR,DSN=R01UTL.CERN.KERNLIB4
//*           DD DISP=SHR,DSN=R01UTL.CERN.PACKLIB4
//*           DD DISP=SHR,DSN=R01UTL.CERN.GENLIB4
//LKED.SYSLMOD DD DISP=OLD,UNIT=FAST,DSN=JADEPR.JADELD(REDUC1LD)
//LKED.SYSIN DD *
 INCLUDE SYSLIB(USRED82,GBOOK,DBASEDUM)
//*
$   28/05/84 508061722: MEMBER NAME  #MELB+1  (BIBLS)       NEWLIB
//JADEMERG JOB '10622622',REDUCONE,CLASS=A,MSGLEVEL=(1,0),TIME=(1,00)
//*MAIN RELPRI=HIG,LINES=(15),CARDS=(900)
//*
//*-----------------------------------------------------------
//*
//*    ******   F JADEPR.  !!!   *******
//*
//* JCL TO RUN THE JADE REDUC1 MERGE STEP
//*
//* SYSUT1   = CONCATENATED SEQUENCE OF INPUT FILES TO BE MERGED
//* SYSUT2   = OUTPUT FILE FOR MERGED SUM
//* FT01F001 = SAME AS SYSUT2 FILE (USED AS INPUT BY MUONSTEP)
//* FT02F001 = SAME AS SYSUT2 FILE (USED AS INPUT BY LISTRUNS)
//*
//*-----------------------------------------------------------
//*
//* STEP 1 - THE MERGE
//* ==================
//*
//DESYMRGE EXEC PGM=IEBGENER,REGION=120K
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//*
//*  TAPE FOR MERGED OUTPUT
//*
//SYSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG),DSN=JADEPR.REDUCONE.G0956V00,
// VOL=(,RETAIN)
//*
//*  LIST OF INPUT TAPES TO BE MERGED
//*
//SYSUT1 DD UNIT=TAPE,DISP=SHR,DSN=JADEPR.ARCHIVE.REDUC956
// DD UNIT=AFF=SYSUT1,DISP=SHR,DSN=JADEPR.RED1HH.ST194
//*
//* STEP 2 - THE EVENT CHECK
//* ========================
//*
//LISTRUNS EXEC PGM=LISTRUNS,REGION=300K
//STEPLIB DD DSN=F11PEA.GENERAL.LOAD,DISP=SHR
//FT06F001 DD SYSOUT=*
//FT02F001 DD DISP=SHR,VOL=(,RETAIN),DSN=JADEPR.REDUCONE.G0956V00
//*
$   28/05/84 508061722: MEMBER NAME  #MERGELB (BIBLS)       NEWLIB
//JADEMERG JOB '10622622',REDUCONE,CLASS=A,MSGLEVEL=(1,0),TIME=(1,00)
//*MAIN RELPRI=HIG,LINES=(15),CARDS=(900)
//*
//*-----------------------------------------------------------
//*
//*    ******   F JADEPR.  !!!   *******
//*
//* JCL TO RUN THE JADE REDUC1 MERGE STEP
//*
//* SYSUT1   = CONCATENATED SEQUENCE OF INPUT FILES TO BE MERGED
//* SYSUT2   = OUTPUT FILE FOR MERGED SUM
//* FT01F001 = SAME AS SYSUT2 FILE (USED AS INPUT BY MUONSTEP)
//* FT02F001 = SAME AS SYSUT2 FILE (USED AS INPUT BY LISTRUNS)
//*
//*-----------------------------------------------------------
//*
//* STEP 1 - THE MERGE
//* ==================
//*
//DESYMRGE EXEC PGM=IEBGENER,REGION=120K
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//*
//*  TAPE FOR MERGED OUTPUT
//*
//SYSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG),DSN=JADEPR.REDUCONE.G0968V00,
// VOL=(,RETAIN)
//*
//*  LIST OF INPUT TAPES TO BE MERGED
//*
//SYSUT1 DD UNIT=TAPE,DISP=SHR,DSN=JADEPR.RED1HH.ST219
// DD UNIT=AFF=SYSUT1,DISP=SHR,DSN=JADEPR.RED1HH.ST220
//*
//* STEP 2 - THE EVENT CHECK
//* ========================
//*
//LISTRUNS EXEC PGM=LISTRUNS,REGION=300K
//STEPLIB DD DSN=F11PEA.GENERAL.LOAD,DISP=SHR
//FT06F001 DD SYSOUT=*
//FT02F001 DD DISP=SHR,VOL=(,RETAIN),DSN=JADEPR.REDUCONE.G0968V00
//*
//* 31/07/84 504151221  MEMBER NAME  #NORDLB  (JADESR)      JCL
//JADDUMP1 JOB '10622622',KAW,CLASS=A,MSGLEVEL=(1,1),TIME=(0,45)
//*MAIN LINES=(2),ORG=EXT,RELPRI=MED
//* #EVT1 IS FOR ONE NORD TAPE WITH ONE FILE TO ONE EXDATA TAPE
// EXEC NEWFAST
// EXEC FCLG
#include "evt.for"
//LKED.SYSLIB DD
// DD
// DD DSN=F22HIL.MTL,DISP=SHR,UNIT=FAST
// DD DSN=R01UTL.CERN.KERNLIB4,DISP=SHR
//LKED.JADE DD DSN=JADEPR.JADELD,DISP=SHR
 INCLUDE JADE(EVPK)
//*
//*                input
//*
//GO.FT09F001 DD DSN=F22YEN.NORD10,DISP=SHR,UNIT=TAPE,VOL=SER=JDAS04,
// DCB=(RECFM=F,BLKSIZE=4096,DEN=3),LABEL=(1,NL)
//*
//*                output
//*
//GO.FT02F001 DD UNIT=DISK,DISP=(,PASS),SPACE=(CYL,(90,50)),
// DSN=&&OUTPUT,DCB=(R01DCB.VBS,BLKSIZE=6240,LRECL=6236)
F22RAM.TAPE04
//*-------------------------------------------------------------------
// EXEC PGM=IEBGENER
//*YSUT1 DD UNIT=DISK,DISP=(OLD,DELETE),DSN=&&OUTPUT
//*YSUT2 DD DSN=F22YEN.JADE.EXTAPE01.G0088V00,UNIT=TAPE,
//*DCB=(R01DCB.VBS,BLKSIZE=6240,LRECL=6236),DISP=(NEW,CATLG,CATLG)
//SYSUT2 DD DSN=F22RAM.TAPE04,UNIT=TAPE,
// DCB=(R01DCB.VBS,BLKSIZE=6240,LRECL=6236),DISP=(NEW,CATLG,CATLG)
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//*-------------------------------------------------------------------
//* 13/07/84 407131521  MEMBER NAME  #REDUCTS (JADESR)      SHELTRAN
//JADED186 JOB '10622622',REDUCONE,CLASS=A,MSGLEVEL=(1,0),TIME=1
//*MAIN RELPRI=HIG,LINES=(20)
//JOBLIB DD DSN=JADEPR.JADELD,DISP=SHR
//*
//*-----------------------------------------------------------
//*
//* JCL TO RUN THE JADE REDUCONE PROGRAM
//*
//* FT02F001 = INPUT REFORMAT TAPE (IE DATA TO BE REDUCED)
//*          = F11LHO.JDATA11.REFORM.G0186V00
//*
//* SYSUT2   = OUTPUT FILE FOR REDUCED EVENTS
//*          = JADEPR.ST186
//*
//*-----------------------------------------------------------
//*
//REDUCING EXEC PGM=REDUC1LT,REGION=960K
//FT06F001 DD SYSOUT=*
//FT07F001 DD DUMMY
//FT03F001 DD UNIT=FAST,DISP=(,CATLG,CATLG),
// DSN=JADEPR.ST186,SPACE=(TRK,(40,30),RLSE)
//FT21F001 DD DISP=SHR,DSN=F11LHO.AUPDAT0
//FT22F001 DD DISP=SHR,DSN=F11LHO.KALWRK0
//*
//*        INPUT FILE OF EVENTS
//*
//FT02F001 DD DISP=SHR,DSN=F11LHO.JDATA11.REFORM.G0186V00
//*
//*        USER CONTROL FILE
//*
//FT05F001 DD *
STARTRUN 00017144 00003749
NOTRUNS  00000 00000 00000 00000 00000 00000 00000 00000 00000 00000
/*
$   28/05/84 508061722: MEMBER NAME  #RED1_LB (BIBLS)       NEWLIB
//JADED097 JOB '10622622',REDUCONE,CLASS=D,MSGLEVEL=(1,0),TIME=25
//*MAIN RELPRI=MED,LINES=(20)
//JOBLIB DD DSN=JADEPR.JADELD,DISP=SHR
//*
//*-----------------------------------------------------------
//*
//* JCL TO RUN THE JADE REDUCONE PROGRAM
//*
//* FT02F001 = INPUT REFORMAT TAPE (IE DATA TO BE REDUCED)
//*          = F11LHO.JDATA15.REFORM.G0097V00
//*
//* SYSUT2   = OUTPUT FILE FOR REDUCED EVENTS
//*          = JADEPR.RED1HH.ST097
//*
//*-----------------------------------------------------------
//*
//REDUCING EXEC PGM=REDUC1L9,REGION=960K
//FT06F001 DD SYSOUT=*
//FT07F001 DD DUMMY
//FT03F001 DD UNIT=DISK,DISP=(NEW,PASS),DSN=&&DATAOUT,
//         DCB=(RECFM=VBS,LRECL=6236,BLKSIZE=6240),
//         SPACE=(CYL,(200,50))
//FT21F001 DD DISP=SHR,DSN=F11LHO.AUPDAT0
//FT22F001 DD DISP=SHR,DSN=F11LHO.BUPDAT1
//*
//*        INPUT FILE OF EVENTS
//*
//FT02F001 DD DISP=SHR,DSN=F11LHO.JDATA15.REFORM.G0097V00
//*
//*        USER CONTROL FILE
//*
//FT05F001 DD *
STARTRUN 00000000 00000000
NOTRUNS  00000 00000 00000 00000 00000 00000 00000 00000 00000 00000
/*
//SPOOLING EXEC PGM=IEBGENER,REGION=220K
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD UNIT=DISK,DISP=(OLD,DELETE),DSN=&&DATAOUT
//*
//*        FINAL OUTPUT FILE
//*
//SYSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG,CATLG),
//       DCB=(RECFM=VBS,LRECL=6236,BLKSIZE=24948),
//       DSN=JADEPR.RED1HH.ST097
$   28/05/84 508061722: MEMBER NAME  #RED1LB  (BIBLS)       NEWLIB
//JADERED1 JOB '10622622',REDUCONE,CLASS=D,MSGLEVEL=(1,0),TIME=25
//*MAIN RELPRI=MED,LINES=(20)
//JOBLIB DD DSN=JADEPR.JADELD,DISP=SHR
//*
//*===============================================================*
//*  IF BUPDAT1 IS UPDATED USE IT INSTEAD OF KALWRK0              *
//*  CHECK OF CAL.FILES :   F11BEK.BIBLS(#KALW)                   *
//*===============================================================*
//*
//*-----------------------------------------------------------
//*
//* JCL TO RUN THE JADE REDUCONE PROGRAM
//*
//* FT02F001 = INPUT REFORMAT TAPE (IE DATA TO BE REDUCED)
//*          = F11LHO.JDATA12.REFORM.G0124V00
//*
//* SYSUT2   = OUTPUT FILE FOR REDUCED EVENTS
//*          = JADEPR.RED1HELP.R124
//*
//*-----------------------------------------------------------
//*
//REDUCING EXEC PGM=REDUC1LD,REGION=960K
//FT06F001 DD SYSOUT=*
//FT07F001 DD DUMMY
//FT03F001 DD UNIT=DISK,DISP=(NEW,PASS),DSN=&&DATAOUT,
//         DCB=(RECFM=VBS,LRECL=6236,BLKSIZE=6240),
//         SPACE=(CYL,(200,50))
//*
//FT21F001 DD DISP=SHR,DSN=F11LHO.BUPDAT0
//*
//FT22F001 DD DISP=SHR,DSN=F11LHO.BUPDAT1
//*T22F001 DD DISP=SHR,DSN=F11LHO.KALWRK0
//*
//*        INPUT FILE OF EVENTS
//*
//FT02F001 DD DISP=SHR,DSN=F11LHO.JDATA12.REFORM.G0124V00
//*
//*        USER CONTROL FILE
//*
//FT05F001 DD *
STARTRUN 00000000 00000000
NOTRUNS  00000 00000 00000 00000 00000 00000 00000 00000 00000 00000
/*
//SPOOLING EXEC PGM=IEBGENER,REGION=220K
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD UNIT=DISK,DISP=(OLD,DELETE),DSN=&&DATAOUT
//*
//*        FINAL OUTPUT FILE
//*
//SYSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG,CATLG),
//       DCB=(RECFM=VBS,LRECL=6236,BLKSIZE=24948),
//       DSN=JADEPR.RED1HELP.R124
//*
//* 18/01/82 312061840  MEMBER NAME  #RED1TST (JADESR)      JCL
//JADEGP99 JOB '10622622',REDUCONE,CLASS=L,MSGLEVEL=1,TIME=6
//*MAIN RELPRI=MED,LINES=(20)
//JOBLIB DD DSN=JADEPR.JADELD,DISP=SHR
//*
//*-----------------------------------------------------------
//*
//* JCL TO RUN THE JADE REDUCONE PROGRAM
//* TAKES ABOUT 1.3 MNS FOR 1K INPUT EVENTS  (16/10/81)
//*
//* FT02F001 = INPUT REFORMAT TAPE (IE DATA TO BE REDUCED)
//* SYSUT2   = OUTPUT FILE FOR REDUCED EVENTS
//*
//*-----------------------------------------------------------
//*
//REDUC1 EXEC PGM=REDUC1LO,REGION=760K
//FT06F001 DD SYSOUT=*
//FT07F001 DD DUMMY
//FT03F001 DD UNIT=DISK,DISP=(NEW,PASS),DSN=&&DATAOUT,
//         DCB=(RECFM=VBS,LRECL=6236,BLKSIZE=6240),SPACE=(CYL,(200,50))
//FT21F001 DD UNIT=FAST,DISP=SHR,DSN=F11LHO.AUPDAT0
//FT22F001 DD UNIT=FAST,DISP=SHR,DSN=F11LHO.KALWRK0
//*
//*        INPUT FILE OF EVENTS
//*
//FT02F001 DD DISP=SHR,DSN=JADEPR.REDUCONE.G0635V00
//*
//*        USER CONTROL FILE
//*
//FT05F001 DD *,DCB=(BUFNO=1)
STARTRUN 00014930 00014932
NOTRUNS  08871 00000 00000 00000 00000 00000 00000 00000 00000 00000
//COPY EXEC PGM=IEBGENER,REGION=220K
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD UNIT=DISK,DISP=(OLD,DELETE),DSN=&&DATAOUT
//*
//*        FINAL OUTPUT FILE
//*
//SYSUT2 DD DISP=(NEW,CATLG,CATLG),DSN=JADEPR.TEST635,
//       DCB=(RECFM=VBS,LRECL=6236,BLKSIZE=24948),
//       SPACE=(TRK,(20,100),RLSE),UNIT=FAST
//*
//* 18/01/82 404120911  MEMBER NAME  #RED2JCL (JADESR)      JCL
//JADEGP33 JOB '10622622',REDUCONE,CLASS=D,MSGLEVEL=1,TIME=28
//*MAIN RELPRI=MED,LINES=(20)
//JOBLIB DD DSN=JADEPR.JADELD,DISP=SHR
//*
//*-----------------------------------------------------------
//*
//* JCL TO RUN THE JADE REDUCONE PROGRAM
//* TAKES ABOUT 1.3 MNS FOR 1K INPUT EVENTS  (16/10/81)
//*
//* FT02F001 = INPUT REFORMAT TAPE (IE DATA TO BE REDUCED)
//* SYSUT2   = OUTPUT FILE FOR REDUCED EVENTS
//*
//*-----------------------------------------------------------
//*
//REDUC1 EXEC PGM=REDUC1LD,REGION=960K
//FT06F001 DD SYSOUT=*
//FT07F001 DD DUMMY
//FT03F001 DD UNIT=DISK,DISP=(NEW,PASS),DSN=&&DATAOUT,
//         DCB=(RECFM=VBS,LRECL=6236,BLKSIZE=6240),SPACE=(CYL,(200,50))
//FT21F001 DD UNIT=FAST,DISP=SHR,DSN=F11LHO.AUPDAT0
//FT22F001 DD UNIT=FAST,DISP=SHR,DSN=F11LHO.KALWRK0
//*
//*        INPUT FILE OF EVENTS
//*
//FT02F001 DD DISP=SHR,DSN=F11LHO.JDATA11.REFORM.G0133V00
//*
//*        USER CONTROL FILE
//*
//FT05F001 DD *,DCB=(BUFNO=1)
STARTRUN 00009251 00000000
NOTRUNS  08871 00000 00000 00000 00000 00000 00000 00000 00000 00000
//COPY EXEC PGM=IEBGENER,REGION=220K
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD UNIT=DISK,DISP=(OLD,DELETE),DSN=&&DATAOUT
//*
//*        FINAL OUTPUT FILE
//*
//SYSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),DSN=JADEPR.ST133,
//       DCB=(RECFM=VBS,LRECL=6236,BLKSIZE=24948)
//
$   18/10/82 403051410  MEMBER NAME  #REFORM  (JADESR)      CLIST
FULL OFF
V OFF OFF
SET ESCAPE='@'
$
$--------------------------
$ SET YEN AND REFORM SERIES
$--------------------------
$
SET S5='10'
SET S6='11'
$
$------
$ TITLE
$------
$
CLEAR
SHOW '        CREATE JCL FOR REFORM JOB'
SHOW '        ========================='
SHOW ' '
SHOW ' PRESENTLY HARDWIRED FOR EXDATA@(S5) AND JDATA@(S6)'
SHOW ' THE REFORM JCL WILL BE STORED IN MEMBER #REFMJCL'
SHOW ' '
$
$----------------------------------
$ CREATE/CLEAR DUMMY MEMBER FOR JCL
$----------------------------------
$
SC #REFMJCL
IF DIR('#REFMJCL') = 'T'  GOTO SKIP1
./ ADD #REFMJCL
./ LABEL NOMACRO
LABEL SKIP1
C #REFMJCL
D 0 900000
$
$---------------------
$ YEN GENERATION GROUP
$---------------------
$
SHOW ' '
READ INTO S1 PROMPT '-- ENTER YEN GENERATION GROUP NUMBER (EG 072)    :'
IF LENGTH(S1)=0 GOTO STOP
IF LENGTH(S1)=5 SET S1=SUBSTR(S1,3,3)
$
$-------------------------
$ REFORM GENERATION GROUP
$-------------------------
$
SHOW ' '
READ INTO S2 PROMPT '-- ENTER REFORM GENERATION GROUP NUMBER (EG 062) :'
IF LENGTH(S2)=0 GOTO STOP
IF LENGTH(S2)=5 SET S2=SUBSTR(S2,3,3)
$
$----------------------
$ RUTHERFORD TAPE NUMER
$----------------------
$
SHOW ' '
READ INTO S3 PROMPT '-- ENTER RUTHERFORD TAPE NUMBER (EG 939481)      :'
IF LENGTH(S3)=0 GOTO STOP
$
$-----------
$ CREATE JCL
$-----------
$
./ INSERT 10 10
//JADEREFO JOB '10622622',REFORM,CLASS=L,MSGLEVEL=1,TIME=(6,00)
//*MAIN RELPRI=MED
//*
//*
//* ======================================================
//*
//* JADE REFORMAT JOB
//* -----------------
//*
//* JCL CREATED BY @USER AT @SUBSTR(TIME,1,4) ON @DATE
//*
//* YEN TAPE = F22YEN.JADE.EXDATA@(S5).G0@(S1)V00
//*
//* REFORM TAPE = F11LHO.JDATA@(S6).REFORM.G0@(S2)V00
//*
//* RUTHERFORD TAPE = @(S3)
//*
//* ======================================================
//*
//*
//JOBLIB DD DSN=JADEPR.JADELD,DISP=SHR
// EXEC NEWFAST
//*
//* ===============
//*  REFORMAT STEP
//* ===============
//*
//REFORM EXEC PGM=REFRMLD,REGION=520K
//FT06F001 DD SYSOUT=*
//FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F22YEN.JADE.EXDATA@(S5).G0@(S1)V00
//FT03F001 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),VOL=(,RETAIN),
//    DCB=(RECFM=VBS,LRECL=6236,BLKSIZE=24948),
//    DSN=F11LHO.JDATA@(S6).REFORM.G0@(S2)V00
//FT04F001 DD UNIT=FAST,DISP=MOD,DSN=F22WAT.LGBAD0
//FT08F001 DD UNIT=FAST,DISP=MOD,DSN=F11LHO.DSKTI001
//FT09F001 DD DUMMY
//*FT09F001 DD UNIT=FAST,DISP=OLD,DSN=F11LHO.FASTSEL
//FT05F001 DD *
//*
//* =====================
//*  FIND BAD BLOCK STEP
//* =====================
//*
//BADCHL EXEC PGM=BADCHLD,REGION=340K
//FT06F001 DD SYSOUT=*
//FT02F001 DD UNIT=FAST,DISP=OLD,DSN=F11LHO.KALWRK0
//FT08F001 DD UNIT=FAST,DISP=OLD,DSN=F22WAT.LGBAD0
//FT04F001 DD UNIT=DISK,DISP=(,PASS),DSN=&&SCRTCH,
//         DCB=(R01DCB.VBS,LRECL=6236),SPACE=(CYL,(20,20))
//FT03F001 DD UNIT=DISK,DISP=(,PASS),DSN=&&SCRTCH1,
//         DCB=(R01DCB.VBS,LRECL=6236),SPACE=(CYL,(20,20))
//FT05F001 DD *
//*
//* =========================================================
//*  COPY THE CALIBRATION AND THE DATA ONTO A RUTHERFORD TAPE
//* =========================================================
//*
//RUTHCALB EXEC PGM=IEBGENER,REGION=165K
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD DISP=SHR,DSN=F11LHO.KALWRK0
//SYSUT2 DD UNIT=TAPE,DISP=(NEW,KEEP),DSN=JADEPR.KALWRK0,
//       VOL=(,RETAIN,,,SER=(@(S3))),LABEL=(1,SL,,OUT)
//*
//RUTHDATA EXEC PGM=IEBGENER,REGION=165K
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD DISP=SHR,DSN=F11LHO.JDATA@(S6).REFORM.G0@(S2)V00
//SYSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//       DSN=JADEPR.REFORM.RD@(S5)G@(S1).RF@(S6)G@(S2),
//       VOL=(,RETAIN,,,SER=(@(S3))),LABEL=(2,SL,,OUT)
//*
./ LABEL NOMACRO
SHOW ' '
SHOW '-- JCL CREATED AND STORED IN MEMBER #REFMJCL'
SHOW '-- TO ENTER INTO CHANGE MODE ON #REFMJCL JUST PRESS ENTER'
SHOW ' '
RENUM #REFMJCL 0
SHOW ' '
$
$------------
$ SUBMIT JOB
$------------
$
$SUBMIT #REFMJCL HOLD
GOTO END
LABEL STOP
SC #REFMJCL
$
$----------------------------
$ TIDY UP AND EXIT FROM CLIST
$----------------------------
$
LABEL END
SET ESCAPE=''
V ON
FULL ON
SHOW '-- END OF #REFORM'
RETURN
//* 14/01/82 209101332  MEMBER NAME  #REFRUN  (JADESR)      JCL
//JADEPRFM JOB '10622622',PRODUC,CLASS=K,MSGLEVEL=(1,1),TIME=4
//*MAIN RELPRI=MED,LINES=(18)
//*NET ID=JADEPRN8,RL=(JADEPRD8)
//JOBLIB DD DSN=R02BUT.FORTRANH,DISP=SHR
//*EXEC CATPROGM
//*DELETE F11LHO.JDATA03.REFORM.G0XXXV00
// EXEC NEWFAST
//*
//*    REFORMAT EVENTS
//*
//REFM EXEC FCLG,FORT='XL,OPT=2,LEVEL=4',
//      LKED='MAP,LIST',REGION=750K
//FORT.SYSIN DD *
      IMPLICIT INTEGER*2 (H)
      COMMON/CDFLAG/IDFLAG,LIMOUT,NRNMIN,NRNMAX
      IDFLAG=0
      LIMOUT=1000000
      NRNMIN=   9727
      NRNMAX=1000000
      CALL REFMAI
      STOP
      END
#include "evfoldkw.for"
#include "addon.for"
#include "evconv7.for"
//LKED.SYSLIB DD
// DD
// DD DSN=JADEPR.JADELD,UNIT=FAST,DISP=SHR
// DD DSN=F22WAT.BADCHL,UNIT=FAST,DISP=SHR
// DD DSN=F11LHO.JADEGL,UNIT=FAST,DISP=SHR
// DD DSN=R02BUT.CERNLIB,UNIT=FAST,DISP=SHR
//LKED.SYSIN DD *
 INCLUDE SYSLIB(BREADKW,BWRITEKW)
//*O.FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F22YEN.JADE.EXDUMP.G1237V00
//GO.FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F22YEN.JADE.EXDATA05.G0181V00
//GO.FT03F001 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//   DCB=(R01DCB.VBS,LRECL=6236,BLKSIZE=24948),
//   DSN=F11LHO.JDATA06.REFORM.G0199V00
//*
//GO.FT04F001 DD DSN=F22WAT.LGBAD0,DISP=MOD,UNIT=FAST
//GO.FT08F001 DD DSN=F11LHO.DSKTI001,DISP=MOD,UNIT=FAST
//GO.FT09F001 DD DUMMY
//*GO.FT09F001 DD UNIT=FAST,DISP=OLD,DSN=F11LHO.FASTSEL
//*
//*
//*   FIND BAD BLOCKS
//*
//SPBL EXEC FCLG,FORT='XL,OPT=2,LEVEL=4'
//FORT.SYSIN DD *
      IMPLICIT INTEGER*2 (H)
      REWIND 4
      REWIND 8
      CALL KALCOP
      CALL KALADD
      CALL KORDER
      CALL KALREV
      REWIND 4
      STOP
      END
#include "kalcop.for"
#include "kaladd.for"
#include "korder.for"
#include "kalrev.for"
//LKED.SYSLIB DD
// DD
// DD DSN=JADEPR.JADELD,UNIT=FAST,DISP=SHR
// DD DSN=F22WAT.BADCHL,UNIT=FAST,DISP=SHR
// DD DSN=F11LHO.JADEGL,UNIT=FAST,DISP=SHR
//GO.FT02F001 DD UNIT=FAST,DISP=OLD,DSN=F11LHO.KALWRK0
//*GO.FT03F001 DD UNIT=FAST,DISP=OLD,DSN=F11LHO.KALWRK1
//GO.FT08F001 DD UNIT=FAST,DISP=OLD,DSN=F22WAT.LGBAD0
//GO.FT04F001 DD UNIT=DISK,DISP=(,PASS),
//   DCB=(R01DCB.VBS,LRECL=6236),
//   SPACE=(CYL,(20,20)),DSN=&&SCRTCH
//GO.FT03F001 DD UNIT=DISK,DISP=(,PASS),
//   DCB=(R01DCB.VBS,LRECL=6236),
//   SPACE=(CYL,(20,20)),DSN=&&SCRTCH1
//*
//* =========================================================
//*  COPY THE CALIBRATION AND THE DATA ONTO A RUTHERFORD TAPE
//* =========================================================
//*
//RUTHCALI EXEC PGM=IEBGENER,REGION=165K
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD DISP=SHR,DSN=F11LHO.KALWRK0
//SYSUT2 DD UNIT=TAPE,DISP=(NEW,KEEP),DSN=JADEPR.KALWRK0,
//       VOL=(,RETAIN,,,SER=939500),LABEL=(1,SL,,OUT)
//*
//RUTHDATA EXEC PGM=IEBGENER,REGION=165K
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD DISP=SHR,DSN=F11LHO.JDATA03.REFORM.G0260V00
//SYSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),DSN=JADEPR.RUTH@(S2),
//       VOL=SER=939500,LABEL=(2,SL,,OUT)
//*
$   28/05/84 508061722: MEMBER NAME  #REPAIR  (BIBLS)       NEWLIB
//JADEPR   JOB CLASS=A,MSGLEVEL=(1,0),TIME=(0,40)
//*MAIN RELPRI=HIG
//*    JOB TO REPAIR CROSSED ID CABLES
//*    USING SPITZERS ALGORITHM            2/8/84  W.BARTEL
// EXEC NEWLIB,PS='JADEPR.JADESR',PL='JADEPR.JADELD'
./ COMPILE USERSPI
//MACRO DD DSN=F11GOD.PATRECSR,DISP=SHR,UNIT=FAST
// EXEC FLG,REGION.GO=950K
//LKED.SYSLIB DD
//            DD
//            DD DISP=SHR,UNIT=,DSN=&&LOAD
//            DD DISP=SHR,UNIT=FAST,DSN=F11GOD.PATRECLD
//            DD DISP=SHR,UNIT=FAST,DSN=F11LHO.JADEGL
//            DD DISP=SHR,UNIT=FAST,DSN=F22NAR.TOFLIB.L
//            DD DISP=SHR,UNIT=FAST,DSN=F22ALL.JADEMUL
//            DD DISP=SHR,UNIT=FAST,DSN=JADELG.LOAD
//            DD DISP=SHR,UNIT=FAST,DSN=F1EBLO.BOSLIB.L
//LKED.SYSIN DD *
 INCLUDE SYSLIB(JDMAIN0)
 INCLUDE SYSLIB(USERSPI)
//GO.FT21F001 DD UNIT=FAST,DISP=SHR,DSN=F11LHO.AUPDAT0
//GO.FT22F001 DD UNIT=FAST,DISP=SHR,DSN=F11LHO.AUPDAT1
//*                        INPUT:
//*GO.FT02F001 DD UNIT=TAPE,DISP=OLD,
//*         DSN=JADEPR.REDUC1HH.G0080V00
//GO.FT02F001 DD DISP=SHR,DSN=JADEPR.TEMPDL8
//*                        OUTPUT:
//*GO.FT03F001 DD DUMMY,DCB=R01DCB.VBS
//GO.FT03F001 DD UNIT=FAST,DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//   SPACE=(TRK,(70,10),),DSN=JADEPR.TEMPDL8C
//* 18/10/81 203301323  MEMBER NAME  #RUTHJCL (JADESR)      JCL
//*
//*
//*    A SIMPLE EXAMPLE OF A PROGRAM TO RUN AT RUTHERFORD
//*    (N.B. /* IS NOT A COMMENT !!)
//*                                                       GFP  NOV 1981
//*
//*
/*PRIORITY 8
//*
//* JOBCARD GIVES 5 MINUTES EXECUTION TIME AND 20K LINES LIMIT
//* =======
//*
//QLJOBNAM JOB (2191,QL,5-00,20,,,,,0),DESY,MSGLEVEL=1
//*
//* ROUTE CARDS SEND OUTPUT TO DESY (REMOTE79) TO PRINT UNDER ID F11RUT
//* ===========
//*
/*ROUTE  PRINT REMOTE79
/*ROUTE  POINT F11RUT
//*
//* SETUP CARDS
//* ===========
//*
//* THE FIRST TWO SETUP CARDS DEMAND THAT THE TAPE(S) ON WHICH THE TWO
//* NAMED REDUCTWO FILES RESIDE BE MOUNTED SUCCESSIVELY (UNIT=AFF) ON
//* THE SAME TAPE DRIVE. NO TAPE NUMBERS NEED BE SPECIFIED HERE SINCE
//* ALL REDUCTWO FILES AT RUTHERFORD ARE CATALOGUED.
//*
//* THE THIRD SETUP CARD DEMANDS THAT TAPE 333333 BE MOUNTED ONTO A
//* SECOND TAPE DRIVE WITH WRITE ENABLED. NOTE THAT WE HAVE ALSO HAD
//* TO SPECIFY THAT TH TAPE IS DEN6250 WITH A STANDARD LABEL (SL).
//* WE WOULD BE WRITING OUR OWN (PROCESSED) DATA ONTO THIS TAPE.
//*
/*SETUP  DSN=JADEPR.REDUCTWO.G0025V00
/*SETUPC DSN=JADEPR.REDUCTWO.G0026V00
/*SETUP 333333,DEN6250,SL,W
//*
//* COMPILE AND LINK STEPS
//* ======================
//*  THESE ARE VIRTUALLY THE SAME AS AT DESY. NOTE, HOWEVER, THAT THE
//*  STEP NAMES ARE DIFFERENT. COMPILE IS C , LINK IS L AND GO IS G.
//*  (RATHER THAN CO, LKED AND GO AT DESY).
//*  THE ONLY OTHER MAJOR DIFFERENCE IS IN THE NAMES OF THE JADE AND
//*  UTILITY LOAD LIBRARIES. MOST OF THE ONES THAT YOU WOULD NORMALLY
//*  REQUIRE ARE USED IN THIS EXAMPLE.
//*
//  EXEC FHCLG,CPRINT=YES,
//  PARM.C='OPT=3,LINECNT=60,NOXREF,NOMAP',REGION.C=400K,
//  PARM.L='LIST,MAP,SIZE=(208K,28K)',REGION.L=210K,
//  REGION.G=800K
//C.SYSIN DD *
      SUBROUTINE USER(INDEX)
      IMPLICIT INTEGER*2(H)
#include "cdata.for"
      IF(INDEX.EQ.1)PRINT100,INDEX
 100  FORMAT(' TEST USER CALLED WITH INDEX =',I6)
      RETURN
      END
/*
//L.SYSLIB DD
//         DD
//         DD
//         DD
//         DD DISP=SHR,DSN=ULIB.JADEGL
//         DD DISP=SHR,DSN=ULIB.TASSLIB
//         DD DISP=SHR,DSN=USER.DJLIB
//         DD DISP=SHR,DSN=SYS1.HBOOK
//         DD DISP=SHR,DSN=SYS1.CERNLIB
//L.SYSIN DD *
  INCLUDE SYSLIB(JDMAIN0)
/*
//*
//* GO STEP JCL
//* ===========
//*
//* STANDARD LINE PRINTER OUTPUT
//*
//G.FT06F001 DD SYSOUT=A
//*
//* INPUT DATA TAPES
//*
//G.FT02F001 DD      UNIT=DEN6250,DISP=SHR,DSN=JADEPR.REDUCTWO.G0025V00
//G.FT02F002 DD UNIT=AFF=FT02F001,DISP=SHR,DSN=JADEPR.REDUCTWO.G0026V00
//*
//* OUTPUT TAPE FOR WRITING MY DATA
//*
//G.FT03F001 DD UNIT=DEN6250,DISP=(NEW,KEEP),DSN=MYOUTPUT,
//           DCB=(RECFM=VBS,LRECL=6236,BLKSIZE=24948),
//           VOL=SER=333333,LABEL=(1,SL,,OUT)
//*
//* CALIBRATION FILES
//*
//G.FT21F001 DD DISP=SHR,DCB=(BUFNO=1),DSN=JADEPR.AUPDAT0
//G.FT22F001 DD DISP=SHR,DCB=(BUFNO=1),DSN=JADEPR.AUPDAT1
//
$   28/05/84 508061722: MEMBER NAME  #R1LB    (BIBLS)       NEWLIB
//JADERED1 JOB '10622622',REDUCONE,CLASS=L,MSGLEVEL=(1,0),TIME=3
//*MAIN RELPRI=HIG,LINES=(20)
//JOBLIB DD DSN=JADEPR.JADELD,DISP=SHR
//*
//*===============================================================*
//*  IF BUPDAT1 IS UPDATED USE IT INSTEAD OF KALWRK0              *
//*  CHECK OF CAL.FILES :   F11BEK.BIBLS(#KALW)                   *
//*===============================================================*
//*
//*-----------------------------------------------------------
//*
//* JCL TO RUN THE JADE REDUCONE PROGRAM
//*
//* FT02F001 = INPUT REFORMAT TAPE (IE DATA TO BE REDUCED)
//*
//* SYSUT2   = OUTPUT FILE FOR REDUCED EVENTS
//*
//*-----------------------------------------------------------
//*
//REDUCING EXEC PGM=REDUC1LD,REGION=960K
//FT06F001 DD SYSOUT=*
//FT07F001 DD DUMMY
//FT03F001 DD UNIT=DISK,DISP=(NEW,PASS),DSN=&&DATAOUT,
//         DCB=(RECFM=VBS,LRECL=6236,BLKSIZE=6240),
//         SPACE=(CYL,(200,50))
//FT21F001 DD DISP=SHR,DSN=F11LHO.AUPDAT0
//*
//*T22F001 DD DISP=SHR,DSN=F11LHO.BUPDAT1
//FT22F001 DD DISP=SHR,DSN=F11LHO.KALWRK0
//*
//*        INPUT FILE OF EVENTS
//*
//FT02F001 DD DISP=SHR,DSN=JADEOL.HH.G3138
//*
//*        USER CONTROL FILE
//*
//FT05F001 DD *
STARTRUN 00000000 00000000
NOTRUNS  00000 00000 00000 00000 00000 00000 00000 00000 00000 00000
/*
//SPOOLING EXEC PGM=IEBGENER,REGION=220K
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD UNIT=DISK,DISP=(OLD,DELETE),DSN=&&DATAOUT
//*
//*        FINAL OUTPUT FILE
//*
//*YSUT2 DD UNIT=FAST,DISP=(NEW,CATLG,DELETE),
//*      DCB=(R01DCB.VBS,LRECL=6236),SPACE=(TRK,(300,50),RLSE),
//*      DSN=JADEPR.HH.G3138
//*
//SYSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG,CATLG),
//       DCB=(RECFM=VBS,LRECL=6236,BLKSIZE=24948),
//       DSN=JADEPR.HH.G3138
//*
$   18/10/81 409121208  MEMBER NAME  #START0  (JADESR)      CLIST
FREE F(MACRO,CLIST)
ALLOC F(MACRO) DA('F11GOD.PATRECSR') SHR
ALLOC F(CLIST) DA('F11PEA.JDCLIST') SHR
CLEAR
$HOW ' ALL DESY REDUC1 TASKS ARE NOW CONTROLLED BY A CLIST. TO INVOKE  '
$HOW ' THIS SIMPLY TYPE IN '
$HOW '                    (REDUC1)'
$HOW ' AND ANSWER THE QUESTIONS. THE TASKS CURRENTLY PERFORMED BY THIS'
$HOW ' CLIST ARE TO :                '
$HOW ' (1) .. MAKE AN ARCHIVE COPY OF A REDUC1 MERGE TAPE'
$HOW ' (2) .. COPY MERGE DATA FROM A RUTHERFORD TAPE TO A DESY TAPE'
$HOW ' (3) .. LIST THE RUN CONTENTS OF A REDUC1 MERGE TAPE'
$HOW ' (4) .. SUBMIT A REDUC1 MERGE JOB'
$HOW ' (5) .. RE-LINK THE REDUC1 LOAD MODULE'
$HOW ' (6) .. SUBMIT A REDUC1 JOB'
$HOW ' (7) .. COPY A DESY REFORM TAPE ONTO A RUTHERFORD TAPE'
$HOW ' (8) .. LIST THE FILE CONTENTS OF A RUTHERFORD TAPE'
$HOW '                                                     GFP 27/02/82'
$HOW '-----------------------------------------------------------------'
SHOW '-----------------------------------------------------------------'
SHOW ' SEND A MESSAGE TO SOMEONE AT RUTHERFORD WITH THE COMMAND :      '
SHOW '                   (RUTHMAIL)                 OR (IN FULL)       '
SHOW '           "F11PEA.JDCLIST(RUTHMAIL)"                            '
SHOW '                                                    GFP          '
SHOW '-----------------------------------------------------------------'
$   06/07/82 403121153  MEMBER NAME  #START1  (JADESR)      CLIST
$   18/10/81 205181154  MEMBER NAME  #START   (JADESR)      CLIST
FREE F(MACRO,CLIST)
ALLOC F(MACRO) DA('F11GOD.PATRECSR') SHR
ALLOC F(CLIST) DA('F11PEA.JDCLIST') SHR
CLEAR
$HOW '1979 REDUC1 LIBRARY IS FOUND ON   JADEPR.ZZ.JADESR.B800222'
$HOW '                                                          '
$HOW ' JBUP4SET TO DELETE SCRATCH FILES 2-4 AFTER REFORMATTING (LHO)'
$HOW ' '
$HOW ' PLEASE SUBMIT NOT MORE THAN 6 RED-JOBS IN ADVANCE !!!!!!!!!!!!'
$HOW ' WE WILL GET OTHERWISE COMPLAINTS FROM R1 (PST)    !!!!!!!!!!!!'
$HOW '                  '
$HOW ' NEW RFM-JOB: JBNRFMT1,JBNRFMT2 '
$HOW '     JBNRFMT2(CLASS A)SEEMS TO BE FASTER THAN JBNRFMT1(CLASSK)
$HOW '     RED-JOB: JBNREDUC'
$HOW ' INTRODUCED NEW RING NUMBER "JRING" FROM JETC BANK HEADER INTO   '
$HOW ' EVCONV7. RELINKED REFRMLD. 11.51 31.03.80. L.H. O'NEILL         '
$HOW '                                                                 '
$HOW ' CHANGED JBSORDER TO WRITE ONTO F11LHO.FASTSEL1 INSTEAD OF 0     '
$HOW ' AND CUT THE SCRATCH DISK ALLOCATION DOWN TO 150 TRACKS.         '
$HOW '                                 L.H. ONEILL 17.50 03.05.80      '
$HOW '                                                                 '
$HOW '       A MULTI-STEP JOB NOW EXISTS TO                            '
$HOW '     MERGE, ARCHIVE , AND THEN TEST READ REDUC1 TAPES .          '
$HOW '       SEE MEMBER JBMRG                                          '
$HOW '                         MALCOLM                                 '
$HOW '                                                                 '
$HOW ' CHANGED JBNRFMT2 AND JBREFMT2 TO USER A SCRATCH FILE INSTEAD    '
$HOW ' OF F11LHO.KALWRK1. THIS SAVES A LITTLE SPACE ON STOR05.         '
$HOW '                                 L.H. ONEILL 17.10 15.05.80      '
$HOW ''
$HOW ' USREDUC1 CHANGED: LOWER PT LIMITS               '
$HOW ' OLD VERSIONS: USRED11 (ONLY SOURCE)                   '
$HOW ' BACKUPS ON ZZ.JADESR/LD.B800602                                 '
$HOW '                                 P. STEFFEN  11.51 09.06.80      '
$HOW ''
$HOW ' TRGCHK CHANGED(MISSING "ELSE"), PATROL CHANGED(UNDEFINED "S6")  '
$HOW ' MODUL RELINKED, BACKUP ON ZZ.JADELD.B800620           '
$HOW '                                 P. STEFFEN   9.00 20.06.80      '
$HOW '                                                                 '
$HOW ' SHORTENED FASTSEL AND GO REFORM JOBS WORKING ON IT AGAIN.       '
$HOW '
$HOW '     **************  REMEMBER TO SCRATCH EXISTING *********'
$HOW ' JADEPR.ST TAPES BEFORE SUBMITTING REDUC JOBS .                  '
$HOW '            '
$HOW ' CHANGE KALREV SO THAT IT GOES INTO A DELIBERATE DEAD LOOP'
$HOW ' IF LESS THAN 10 SECONDS CPU TIME LEFT AT CALL.
$HOW '                                 L.H. ONEILL 17.30 08.07.80'
$HOW ' CHANGED EVFOLDKW TO ELIMINATE BUG WHICH CAUSED ONLY ONE  '
$HOW ' EVENT PER RUN TO BE LISTED IN THE SUMMARY AT THE END.
$HOW '                                 L.H. ONEILL 08.25 10.07.80'
$HOW ' SCRATCHED TRGCHK AFTER SAVING THE SOURCE ONLY UNDER MEMBER'
$HOW ' TRGCHK8. RENAMED TRGCHKPS TO TRGCHK. RELINKED REDUC LOAD.'
$HOW '                                 L.H. ONEILL 12.24 25.07.80'
$HOW ' SCRATCHED TRGCHK AFTER SAVING THE SOURCE ONLY UNDER MEMBER'
$HOW ' TRGCHK8. RENAMED TRGCHKPS TO TRGCHK. RELINKED REDUC LOAD.'
$HOW '                                 L.H. ONEILL 12.24 25.07.80'
$HOW ' MADE NEW REFORMATTING MODULE WITH ADC ADDRESS ERROR       '
$HOW ' RECOVERY.                                                '
$HOW '                                 L.H. ONEILL 17.28 01.08.80'
$HOW ' CHANGED LGCUT AND USREDUC1 TO ACCOMODATE FWD MUON CNTRS   '
$HOW ' OLD VERSIONS ARE LGCUT0 AND USREDUC0                     '
$HOW '  RELINKED LOAD MODULE                                    '
$HOW '                                M. GODDARD AUG 3 80       '
$HOW ' REMOVED 512-ADDITION KLUGE OF 1 AUG. FROM EVCONV7 AND EVCONV9. '
$HOW ' COMPILED EVCONV9 TO THE LOAD. CHANGED JBLREFM SO THAT EVCONV9 '
$HOW ' IS STANDARDLY INCLUDED AND RELINKED REFORMATTING LOAD MODULE.'
$HOW ' THUS FOR THE TIME BEING WATANABES ERROR RECOVERY ROUTINE '
$HOW ' LGRFM1 IS ALWAYS CALLED FOR LEAD GLASS REFORMATTING.     '
$HOW ' THE ERROR CODE FROM THIS ROUTINE IS ADDED TO THE FIRST   '
$HOW ' HALF WORD OF THE ALGL BANK DESCRIPTOR.                   '
$HOW '                                 L.H. ONEILL 18.42 19.08.80'
$HOW ' CHANGED JBNRFMT2 TO WRITE ONTO JADEPR.FASTSEL6 INSTEAD OF      '
$HOW ' F11LHO.FASTSEL .                                              '
$HOW '                                MALCOLM,FRI AUG 29            '
$HOW ' REDUC179 RENAMED TO REDUCSUM                                   '
$HOW '                             MALCOLM , MON SEPT 1              '
$HOW '--------------------------------------------------------------'
$HOW ' EVFOLDKW CHANGED: CHECK ONLY IF INCREASING EVENT #             '
$HOW '                   REFMLD(LOAD MODUL) RELINKED PST, 19/9/80    '
$HOW '--------------------------------------------------------------'
$HOW ' STRAIGHTENED OUT FASTSEL MESS. CHANGED JBNRFMT2 TO WRITE ONTO  '
$HOW ' F11LHO.FASTSEL AGAIN.                                          '
$HOW '                   L.H. ONEILL 15.30 25 SEPT. 1980             '
$HOW '--------------------------------------------------------------'
$HOW ' TRGCHK   CHANGED: 3-TRACK TRIGGER BIT ALLOWED                  '
$HOW ' USREDUC1 CHANGED: PLOT VARIABLES SET REAL       PST, 26/9/80'
$HOW '--------------------------------------------------------------'
$HOW ' CHANGED EVCONV7 AND EVCONV9 TO ALLOW VARIABLE LENGTH NORD      '
$HOW ' HEADER BANK. RELINKED BADCHLD, REDUCLD AND REFRMLD, THE LATTER'
$HOW ' WITH INCLUSION OF EVCONV7, NOT 9, I.E. WITHOUT BAD ADC RECOVERY.'
$HOW '                       18.09 ON 26 SEPT. 1980. L.H. ONEILL       '
$HOW '--------------------------------------------------------------'
$HOW '--------------------------------------------------------------'
$HOW ' ADDED ALIAS VERSIONS OF KALREV AND KALADD, NAMED KALELM AND     '
$HOW ' KALM1S, AND A NEW DRIVER JOB NAMED JBREDOBL. THESE ARE FOR    '
$HOW ' REDOING THE BAD ADC DATA. THE KALADD VERSION UNDER ALIAS KALM1S'
$HOW ' SUBTRACTS 201 SECONDS INSTEAD OF THE USUAL 200 FROM THE TIME   '
$HOW ' GIVEN IN THE WATANABE SPINNING BLOCK RECORDS. THEN IN THE TIME-'
$HOW ' ORDERED SCRATCH CALIBRATION FILE THE OLD SPINNING BLOCK BANKS  '
$HOW ' WRITTEN BEFORE THE WATANABE CORRECTION ROUTINES BECAME AVAILABLE'
$HOW ' COME ONE SECOND AFTER THE NEW BANKS FOR THE SAME RUNS. THE OLD  '
$HOW ' BANKS ARE THEN ELIMINATED IN THE COPY FROM THE SCRATCH FILE TO  '
$HOW ' KALWRK0. THIS IS DONE BY THE KALREV ALIAS UNDER MEMBER KALELM.
$HOW '                       12.41 ON 29 SEPT. 1980. L.H. ONEILL       '
$HOW '--------------------------------------------------------------'
$HOW ' JADEPRLD RELINKED, ERROR(TRHTCK) CORRECTED ON PATRECSR/LD       '
$HOW '                       18.40 1/10/80 P.STEFFEN'
$HOW '--------------------------------------------------------------'
$HOW ' CHANGED USREDUC1 AND RELINKED REDUCLD TO SKIP RUN 5153, '
$HOW '  EVENT 26. ON JDATA04 #7. THIS CAUSES 0C4 IN BOS WRITE ROUTINE. '
$HOW '                       12.00 15/10/80 L.H. ONEILL.               '
$HOW '--------------------------------------------------------------'
$HOW ' TAPE JDATA04 #7 NOW THROUGH REDUC1. REMOVE THE CUT ON   '
$HOW '  RUN 5153, EVENT 26 IN USREDUC1 AND RELINK REDUCLD.             '
$HOW '                       09.00 16/10/80 L.H. ONEILL.               '
$HOW '--------------------------------------------------------------'
$HOW '  UPDATED REDUCTWO:  NEW TAPES 72 - 79     J.OLSSON  31.10.80'
$HOW '  REMOVED RUN 5153 PRINT STATEMENT USREDUC1. DONT BOTHER TO  '
$HOW '  RELINK REDUCLD. STATEMENT WILL DISAPPEAR NEXT TIME MODULE  '
$HOW '  IS RELINKED.         11.06 31/10/80 L.H. ONEILL            '
$HOW '  UPDATED REDUCTWO:REDUC2 TAPES AUTUMN 1980 REMADE J.O.26.11.80'
$HOW '--------------------------------------------------------------'
$HOW '  RELINKED REDUCLD FOLLOWING INSTALLATION OF NEW NOSAKI      '
$HOW '  CALIBRATION CONSTANTS ONTO THE STANDARD FILES. HAD TO SCRATCH'
$HOW '  KALELM IN ORDER TO COMPRESS JADELD - RECORDS GREATER THAN  '
$HOW '  BLOCK SIZE OR SOME SUCH NONSENSE. NO LONGER NEEDED ANYWAY. '
$HOW '                       21.58 08/12/80 L.H. ONEILL              '
$HOW '--------------------------------------------------------------'
$HOW '  RELINKED REDUCLD, REFRMLD AND BADCHLD TO BE SURE EVERYTHING  '
$HOW '  IS UP TO DATE FOR THE START OF 1981 RUNNING.                 '
$HOW '                       18.07 16/02/81 L.H. ONEILL              '
$HOW '--------------------------------------------------------------'
$HOW '  RE - RELINKED REDUCLD,            '
$HOW '                       1730  17/02/81 M.GODDARD                '
$HOW '--------------------------------------------------------------'
$HOW '  CHANGED EVCONV7 TO SET UP THE ATAG POINTERS PROPERLY FOR THE '
$HOW '  NEW TAGGING BLOCK SCHEME. RELINKED REFRMLD.                  '
$HOW '                       16.57 21/02/81 L.H. ONEILL              '
$HOW '--------------------------------------------------------------'
$HOW '  TAUGHT ADDON TO RECOGNIZE THE BANK MPRC. RELINKED REFRMLD.   '
$HOW '                       14.26 24/02/81 L.H. ONEILL              '
$HOW '--------------------------------------------------------------'
$HOW '  CHANGED THE STATEMENT:  IF IDATA(IQJETC).GT.0 TO             '
$HOW '  IF IDATA(IQJETC).LT.0 AT LINE 61700 IN USRECUC1. THIS WILL   '
$HOW '  BYPASS SLOW PATTERN RECOGNITION. RELINKED REDUCLD.           '
$HOW '                       11.59 12/03/81 L.H. ONEILL              '
$HOW '--------------------------------------------------------------'
$HOW '  ADDED AN END FILE NOUT AFTER THE BWTEND CALL END EVFOLDKW.   '
$HOW '                       15.59 15/03/81 L.H. ONEILL              '
$HOW '--------------------------------------------------------------'
$HOW '  CHANGED THE STATEMENT:  IF IDATA(IQJETC).LT.0 TO             '
$HOW '  IF IDATA(IQJETC).GT.0 AT LINE 61700 IN USRECUC1. THIS WILL   '
$HOW '  REVERSE THE CHANGE MADE ON 12/03/81 AND REACTIVATE SLOW      '
$HOW '  PATTERN RECOGNITION. RELINKED REDUCLD.                       '
$HOW '                       13.47 26/03/81 L.H. ONEILL              '
$HOW '--------------------------------------------------------------'
$HOW '  CHANGED TRGCHK TO RECOGNIZE NEW COLLINEAR TRIGGER            '
$HOW '                       APRIL 11 1981  M C G                    '
$HOW '--------------------------------------------------------------'
$HOW '  CHANGED USREDUC1 TO WRITE EVENTS WITH NO PATR BANK             '
$HOW '  AND TO PRINT SOME CALIBRATION NUMBERS.                         '
$HOW '  ALSO UPDATED FWMU ACCEPT                                       '
$HOW '                       APRIL 14 1981  M C G                    '
$HOW '--------------------------------------------------------------'
$HOW '  CHANGED USREDUC1 TO DROP PRINTOUT OF CONSTANTS                 '
$HOW '                       APRIL 24 1981  P S T                    '
$HOW '-----------------------------------------------------------------'
$HOW '  RELINKED REDUCLD TO MAKE SURE LATEST TRGCHK GET INTO MODULE.   '
$HOW '                       APRIL 29 1981 18.10 LHO                 '
$HOW '-----------------------------------------------------------------'
$HOW '  MOVED SUBROUTINE DUMDUM FROM MEMBER LGCUT TO MEMBER DUMDUM     '
$HOW '                         MAY 10 1981 14.50 GFP                   '
$HOW '-----------------------------------------------------------------'
$HOW '  TRGCHK CHANGED: ACCEPT UNKNOWN TRIGGER                        '
$HOW '                  REQUIRE 3 TRACKS FOR 3 TRACK TRIGGER          '
$HOW '                  TRGCHK0 = OLD VERSION                         '
$HOW '                  P. STEFFEN 81/05/13 10.00                     '
$HOW '-----------------------------------------------------------------'
$HOW '  MEMBERS USREPTIL AND JBREPTIL NOW DO THE JOB OF RECALIBRATION '
$HOW '  PROBLEM LIES IN THE FACT THAT DATA WITHOUT PATR AND JHTL      '
$HOW '  STILL HAS 2 JETC BANKS, SOMETIMES.THE CORRESPONDING NECESSARY '
$HOW '  BRANCHING HAS NOW BEEN INTRODUCED IN USREPTIL.                '
$HOW '            J.OLSSON ON EVENING OF 21.5.81                      '
$HOW '-----------------------------------------------------------------'
$HOW '  REDUCLD WAS RELINKED 30.5.81, 19.50    NO JOBS DIED. THIS WAS '
$HOW '  NECESSARY TO INCLUDE RECENT CHANGES IN KALIBR.'
$HOW '                 GREETINGS TO MALCOLM.... J.OLSSON '
$HOW '-----------------------------------------------------------------'
$HOW '  DELETED RUTHERFORD TAPE CATALOGUE ENTRIES  ... 13/6/81 G.F.P'
$HOW '-----------------------------------------------------------------'
$HOW '  SUBROUTINE DUMDUM REPLACED WITH RUTHERFORD    ...  6/7/81 G.F.P'
$HOW '  VERSION WHICH DUMMIES OUT ROUTINES NEVER      ...              '
$HOW '  CALLED BY THE REDUC1 PROGRAM.                 ...              '
$HOW '-----------------------------------------------------------------'
$HOW '  LOWERED LG THRESHOLDS IN LGCUT FOR 14 GEV DATA... 21/7/81 M.C.G'
$HOW '                                                ...              '
$HOW '-----------------------------------------------------------------'
$HOW '  USREDUC1, LGCUT AND JBNREDUC MADE COMPATIBLE  ... 10/8/81   GFP'
$HOW '  WITH THE RUTHERFORD VERSIONS - REDUC1 MODULE  ...              '
$HOW '  HAS NOT BEEN RE-LINKED. 0 => OLD VERSIONS     ...              '
$HOW '  NOTE...USELESS HISTOGRAMS ARE NOW GONE !!     ...              '
$HOW '-----------------------------------------------------------------'
$HOW '***  CHANGE OF CALIBRATION FILES:                       *********'
$HOW '     KALADD:  RUN # -> CALIBR.FILE ,   BADCHLD RELINKED   '
$HOW '     RUTHER:  READ ONLY UPDATE FILES , RUTHERLD RELINKED   '
$HOW '     #REFORM: ASTART0/1 FILES COMMENTED OUT                     '
$HOW '     15.09.81 9.45  P. ST.                                      '
$HOW '-----------------------------------------------------------------'
$HOW ' "GETMUONS" PROGRAM OF RJB NOW LOADED ONTO JADEPR.JADELD        '
$HOW '                                       GFP 5/10/81               '
$HOW '-----------------------------------------------------------------'
$HOW '     USREDUC1: |ZVTX| < 300                                      '
$HOW '     TRGCHK:   ERROR(LG-ROW #) CORRECTED                         '
$HOW '     REDUCLD RELINKED                           PST 6/10/81      '
$HOW '-----------------------------------------------------------------'
$HOW ' JCL EXAMPLES FOR VARIOUS REDUC1 TASKS CAN BE FOUND IN :         '
$HOW ' #COPYRUT  ..  JCL TO COPY A RUTHERFORD REDUC1 MERGE TAPE        '
$HOW ' #RED1ARK  ..  JCL TO PRODUCE AN ARCHIVE BACKUP OF A REDUC1 TAPE '
$HOW ' #RED1JCL  ..  JCL FOR A REDUC1 JOB (CLIST)                      '
$HOW ' #RED1LNK  ..  JCL TO RE-LINK THE REDUC1 MODULE                  '
$HOW ' #RED1LST  ..  JCL TO PRODUCE A RUN LISTING OF A REDUC1 TAPE     '
$HOW ' #RED1MRG  ..  JCL FOR THE REDUC1 MERGE JOB (CLIST !)         '
$HOW ' #RUTHTAP  ..  JCL TO CREATE A RUTHERFORD TAPE FROM REFORM TAPE  '
$HOW ' #TAPTEST  ..  JCL TO CHECK CONTENTS OF A RUTHERFORD TAPE        '
$HOW '                                       GFP 6/10/81               '
$HOW '-----------------------------------------------------------------'
$HOW ' IN ADDON + EVCONV7 THE BANCNAME FADC ADDED'
$HOW ' JBLREFM SUBMITTED TO PRODUCE A NEW LOAD MOULE                   '
$HOW '                                      PET 10/12/81               '
$HOW '-----------------------------------------------------------------'
SHOW ' ALL DESY REDUC1 TASKS ARE NOW CONTROLLED BY A CLIST. TO INVOKE  '
SHOW ' THIS SIMPLY TYPE IN '
SHOW '                    (REDUC1)'
SHOW ' AND ANSWER THE QUESTIONS. THE TASKS CURRENTLY PERFORMED BY THIS'
SHOW ' CLIST ARE TO :                '
SHOW ' (1) .. MAKE AN ARCHIVE COPY OF A REDUC1 MERGE TAPE'
SHOW ' (2) .. COPY MERGE DATA FROM A RUTHERFORD TAPE TO A DESY TAPE'
SHOW ' (3) .. LIST THE RUN CONTENTS OF A REDUC1 MERGE TAPE'
SHOW ' (4) .. SUBMIT A REDUC1 MERGE JOB'
SHOW ' (5) .. RE-LINK THE REDUC1 LOAD MODULE'
SHOW ' (6) .. SUBMIT A REDUC1 JOB'
SHOW ' (7) .. COPY A DESY REFORM TAPE ONTO A RUTHERFORD TAPE'
SHOW ' (8) .. LIST THE FILE CONTENTS OF A RUTHERFORD TAPE
SHOW '                                                     GFP 27/02/82'
SHOW '-----------------------------------------------------------------'
SHOW ' NEW REDUC1 MODULE (REDUC1LD) CREATED                GFP  4/03/82'
SHOW '-----------------------------------------------------------------'
SHOW ' NEW REDUC1 MODULE (REDUC1LD) CREATED                GFP 18/05/82'
$HOW '-----------------------------------------------------------------'
SHOW ' USRED82 AND TRCK82 CHANGED TO ALLOW FOR NEW MUT1 TRIGGER        '
SHOW ' COMPRESS AND BACKUP TAKEN FIRST. OLD VERSIONS COPIED TO         '
SHOW ' USRED820 AND TRCK820. REDUC1 MODULE RE-LINKED.      GFP 21/05/82'
SHOW '-----------------------------------------------------------------'
SHOW ' REFORMAT JOB JCL CHANGED TO ALLOW FOR THE CHANGEOVER TO A       '
SHOW ' SINGLE CALIBRATION FILE.                           GFP 10/09/82 '
SHOW '-----------------------------------------------------------------'
SHOW ' SEND A MESSAGE TO SOMEONE AT RUTHERFORD WITH THE COMMAND :      '
SHOW '                   (RUTHMAIL)                 OR (IN FULL)       '
SHOW '           "F11PEA.JDCLIST(RUTHMAIL)"                            '
SHOW '                                                    GFP          '
SHOW '-----------------------------------------------------------------'
SHOW ' USRED82: CHANGED TO COPE WITH ONLY 1 CALIBR. FILE (KALWRK0)     '
SHOW '          OLD VERSION = USRED820                                 '
SHOW ' EVCONV7 --> ECVONV, JBLREFM CHANGED ACCORDINGLY                 '
SHOW ' EVCONV9 + EVFOLDN5 DELETED                         PST 23/09/82 '
SHOW '-----------------------------------------------------------------'
SHOW ' USRED82: CHANGED TO ---REJECT--- RUN NUMBERS <= 63              '
SHOW '                                     BARRIE WHITAKER  06/06/83   '
SHOW '-----------------------------------------------------------------'
SHOW ' USREDUC1 AND LGCUT CHANGED TO CONFORM WITH PRTOCI ON TPSOURCE   '
SHOW '                                     J.OLSSON         17/12/83   '
$   28/05/84 508061722: MEMBER NAME  #SUPVLB  (BIBLS)       NEWLIB
//JADETEST JOB CLASS=A,MSGLEVEL=(2,0),TIME=(01,00)
//*MAIN RELPRI=HIG,LINES=2
//*MAIN ORG=EXT
// EXEC GEP,PARM.LKED='SIZE=(600K,60K)',REGION.LKED=800K,
//  REGION.GO=1100K
//COMP.SYSIN  DD *
#include "supvlb.for"
//*
//*
//*       ***************   COPY  JOB    *********************
//*
//*         --->    SET PARAMETERS IN COPYLB
//*
//LKED.SYSLIB DD
//            DD
//            DD
//            DD
//            DD
//            DD DISP=SHR,UNIT=FAST,DSN=F11BEK.USER.L
//            DD DISP=SHR,UNIT=FAST,DSN=F11LHO.JADEGL
//            DD DISP=SHR,UNIT=FAST,DSN=F11GOD.PATRECLD
//            DD DISP=SHR,UNIT=FAST,DSN=JADELG.LOAD
//            DD DISP=SHR,UNIT=FAST,DSN=F22ALL.JADEMUL
//            DD DISP=SHR,UNIT=FAST,DSN=R01UTL.HBOOK321.L
//            DD DISP=SHR,UNIT=FAST,DSN=R01UTL.CERN.KERNLIB4
//            DD DISP=SHR,UNIT=FAST,DSN=F1EBLO.BOSLIB.L
//            DD DISP=SHR,UNIT=FAST,DSN=F11BEK.BIBLL
//LKED.SYSIN DD *
 INCLUDE SYSLIB(JDMAIN0)
//GO.FT22F001 DD UNIT=FAST,DISP=SHR,DSN=F11LHO.AUPDAT1
//*
//*         -------   INPUT   -------
//*
//*O.FT02F001 DD DISP=SHR,DSN=JADEPR.REDUCONE.G0916V00
//GO.FT02F001 DD DISP=SHR,DSN=JADEPR.RED1HELP.R124
//*
//GO.FT30F001 DD DISP=SHR,DSN=JADEPR.DSK.DIFF916
//*
//*         -------   OUTPUT  -------
//*
//*O.FT03F001 DD  DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*    MSVGP=VTMP,UNIT=3330V,
//*    DSN=JADEPR.TMP.RED1HELP.G0916
//*    DSN=JADEPR.TMP.REDUCONE.G0916
//*
//GO.FT03F001 DD DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,UNIT=TAPE,
//    DSN=JADEPR.RED1HELP.DIFF916
//*
//*O.FT30F001 DD UNIT=FAST,DISP=(NEW,CATLG,DELETE),
//*   DCB=(R01DCB.VBS,LRECL=6236),SPACE=(TRK,(300,50),RLSE),
//*   DSN=JADEPR.DSK.RUTH916
//*
//GO.FT03F001 DD DUMMY
//GO.FT04F001 DD DUMMY
//*            -------- GEP ---------
//GO.SYSIN DD *
PRINT
DST 10  '      RUN - NUMBER  OF  WRITTEN  EVENTS
ENDQ
$   28/05/84 508061722: MEMBER NAME  #TEMP    (BIBLS)       NEWLIB
//JADEPR   JOB 10622622,F11OLS,CLASS=A,MSGLEVEL=(1,0),TIME=(0,20)
//*MAIN ORG=EXT,RELPRI=HIG
// EXEC FLG
//LKED.SYSLIB DD
//            DD
//            DD DSN=F22ELS.CL11,DISP=SHR,UNIT=FAST
//            DD DSN=F1EBLO.BOSLIB.L,DISP=SHR,UNIT=FAST
//LKED.SYSIN DD *
  INCLUDE SYSLIB(ECOPY)
//*                INPUT
//*GO.FT02F001 DD DISP=SHR,DSN=F11OLS.MSNEUSUM.N237238
//*            DD DISP=SHR,DSN=F11OLS.MSNEUSUM.N201
//*GO.FT02F001 DD UNIT=TAPE,DISP=OLD,
//*         DSN=F11OLS.R2610
//*   DD UNIT=AFF=FT02F001,DISP=OLD,DSN=F11OLS.R2611
//GO.FT02F001 DD UNIT=TAPE,DISP=OLD,
//         DSN=JADEPR.REDUC1HH.G0080V00
//*GO.FT02F001 DD UNIT=TAPE,DISP=OLD,
//*    VOL=SER=F11123,LABEL=(1,SL,,IN)
//*               OUTPUT
//*GO.FT03F001 DD DUMMY
//*GO.FT03F001 DD DISP=SHR,DSN=F11OLS.R283.RAWD19
//*GO.FT03F001 DD UNIT=TAPE,DISP=(NEW,KEEP),LABEL=(1,NL),
//*   DCB=(R01DCB.VBS,LRECL=6229,BLKSIZE=6233,DEN=4),
//*   DSN=YEN08150,VOL=SER=F11105
//*GO.FT03F001 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//*   DCB=(R01DCB.VBS,LRECL=6236,BLKSIZE=24948),
//*   DSN=F11OLS.RED2NEU.TAPE84A
//GO.FT03F001 DD DISP=(NEW,CATLG,CATLG),DCB=R01DCB.VBS,
//    DSN=JADEPR.TEMPDL8,
//         MSVGP=VTMP,UNIT=3330V
//*GO.FT03F001 DD UNIT=DISK,DISP=(,PASS),
//*   DCB=(R01DCB.VBS,LRECL=6236),
//*       SPACE=(CYL,(240,12)),DSN=&&SCRTCH
//*
//*  COPY DISK OUTPUT TO TAPE
//*
//*COPY EXEC PGM=IEBGENER
//*SYSUT1 DD UNIT=DISK,DISP=(OLD,DELETE),DSN=&&SCRTCH
//*SYSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//*          DCB=(R01DCB.VBS,LRECL=6236,BLKSIZE=24948),
//*          DSN=F11OLS.TR2NGAM.TAPE82A
//*SYSPRINT DD SYSOUT=*
//*SYSIN DD DUMMY
$   28/05/84 508061722: MEMBER NAME  JBBLANK  (BIBLS)       NEWLIB
//JADEPRU0 JOB 10622622,'GENERAL',TIME=(0,02),CLASS=E
//*MAIN RELPRI=HIG
// EXEC FCLG,LIB1='F11LHO.JADEGL'
//FORT.SYSIN DD *
      CALL KALLST
      STOP
      END
      SUBROUTINE KALLST
      IMPLICIT INTEGER*2 (H)
C---
C---     JUST LISTS OFF CALIBRATION FILE RECORDS, OR PIECES THEREOF.
C---                                   L.H. O'NEILL 06.09.79
C---
      DIMENSION IBUF(10000)
      DIMENSION HBUF(20000)
      EQUIVALENCE(IBUF(1),HBUF(1))
C---
      LTOT=0
      NREC=0
    1 CONTINUE
      CALL EVREA1(2,NWORD,IBUF,IRET)
      IF(IRET.EQ.1) GO TO 1000
      IF(IRET.EQ.2) GO TO 2000
      NREC=NREC+1
      LTOT=LTOT+NWORD+1
      IOUT=NWORD
      IF(IOUT.GT.10) IOUT=10
      IF(NREC.EQ.1) WRITE(6, 99) NREC,NWORD,(IBUF(I),I=1,IOUT)
      IF(NREC.NE.1) WRITE(6,100) NREC,NWORD,(IBUF(I),I=1,IOUT)
   99 FORMAT(1X,I4,2I12)
  100 FORMAT(1X,I4,I12,' ',A4,' ',9I10)
      GO TO 1
 1000 CONTINUE
      WRITE(6,101) NREC
  101 FORMAT(' *** READ ERROR ENCOUNTERED AFTER ',I4,' RECORDS.')
      RETURN
 2000 CONTINUE
      WRITE(6,102) NREC
  102 FORMAT('0NORMAL END OF FILE AFTER',I4,' RECORDS.')
      LBTOT=4*LTOT
      WRITE(6,103) LTOT,LBTOT
  103 FORMAT('0TOTAL LENGTH IN I*4 WORDS AND BYTES:',2I10)
      RETURN
      END
//GO.FT02F001 DD UNIT=FAST,DISP=SHR,DSN=F11LHO.KALWRK0
//
$   28/05/84 508061722: MEMBER NAME  JBCAMFIX (BIBLS)       NEWLIB
//JADEPRFM JOB '10622622',PRODUC,CLASS=A,MSGLEVEL=(1,1),TIME=1
//*MAIN RELPRI=HIG
//JOBLIB DD DSN=R02BUT.FORTRANH,DISP=SHR
// EXEC NEWFAST
//*   FIX 29 FEB 1981 ON KALWRK0.
//*
//*   FIND BAD BLOCKS
//*
//SPBL EXEC FCLG,FORT='XL,OPT=2,LEVEL=4'
//FORT.SYSIN DD *
      IMPLICIT INTEGER*2 (H)
      REWIND 4
      REWIND 8
      CALL KALCOP
      CALL KALADD
      CALL KORDER
      CALL KALREV
      REWIND 4
      STOP
      END
#include "kalcop.for"
#include "kaladdfx.for"
#include "korder.for"
#include "kalrev.for"
//LKED.SYSLIB DD
// DD
// DD DSN=JADEPR.JADELD,UNIT=FAST,DISP=SHR
// DD DSN=F22WAT.BADCHL,UNIT=FAST,DISP=SHR
// DD DSN=F11LHO.JADEGL,UNIT=FAST,DISP=SHR
//GO.FT02F001 DD UNIT=FAST,DISP=OLD,DSN=F11LHO.KALWRK0
//*GO.FT03F001 DD UNIT=FAST,DISP=OLD,DSN=F11LHO.KALWRK1
//GO.FT08F001 DD UNIT=FAST,DISP=OLD,DSN=F22WAT.LGBAD0
//GO.FT04F001 DD UNIT=DISK,DISP=(,PASS),
//   DCB=(R01DCB.VBS,LRECL=6236),
//   SPACE=(CYL,(20,20)),DSN=&&SCRTCH
//GO.FT03F001 DD UNIT=DISK,DISP=(,PASS),
//   DCB=(R01DCB.VBS,LRECL=6236),
//   SPACE=(CYL,(20,20)),DSN=&&SCRTCH1
//*
$   28/05/84 508061722: MEMBER NAME  JBCOPY   (BIBLS)       NEWLIB
//F11PST   JOB CLASS=E,MSGLEVEL=(0,0),TIME=(0,15)
//*MAIN LINES=(3),ORG=EXT,RELPRI=HIG
// EXEC FCLG,PARM.LKED='MAP,LIST',REGION.GO=850K
#include "uscopy.for"
//LKED.SYSLIB DD
//            DD
//            DD DSN=F11LHO.JADEGL,UNIT=FAST,DISP=SHR
//            DD DSN=F11GOD.PATRECLD,UNIT=FAST,DISP=SHR
//            DD DSN=JADELG.LOAD,UNIT=FAST,DISP=SHR
//            DD DSN=F22ALL.JADEMUL,UNIT=FAST,DISP=SHR
//            DD DSN=F1EBLO.BOSLIB.L,UNIT=FAST,DISP=SHR
//            DD DSN=R02BUT.CERNLIB,UNIT=FAST,DISP=SHR
//LKED.SYSIN DD *
 INCLUDE SYSLIB(JDMAIN0)
//*
//GO.FT21F001 DD UNIT=FAST,DSN=F11LHO.AUPDAT0,DISP=SHR
//GO.FT22F001 DD UNIT=FAST,DSN=F11LHO.AUPDAT1,DISP=SHR
//*
//GO.FT02F001 DD DISP=SHR,
//    DSN=JADEPR.RED1OU2
//*
//*O.FT03F001 DD DUMMY
//GO.FT03F001 DD DISP=OLD,
//          DSN=JADEPR.RED1.T1ACC
$   28/05/84 508061722: MEMBER NAME  JBDSKREF (BIBLS)       NEWLIB
//JADEPRSQ JOB '10622622',PRODUC,CLASS=A,MSGLEVEL=(1,1),TIME=(0,15)
//*MAIN RELPRI=HIG
//JOBLIB DD DSN=R02BUT.FORTRANH,DISP=SHR
// EXEC NEWFAST
//*
//*    REFORMAT EVENTS
//*
//REFM EXEC FCLG,FORT='XL,OPT=2,LEVEL=4',
//      LKED='MAP,LIST',REGION=750K
//FORT.SYSIN DD *
      IMPLICIT INTEGER*2 (H)
      COMMON/CDFLAG/IDFLAG,LIMOUT,NRNMIN,NRNMAX
      IDFLAG=0
      LIMOUT=1000000
      NRNMIN=      0
      NRNMAX=1000000
      CALL REFMAI
      STOP
      END
#include "reshuf.for"
#include "evfoldkw.for"
#include "addon.for"
#include "evconv7.for"
//LKED.SYSLIB DD
// DD
// DD DSN=JADEPR.YENLHO.L,UNIT=FAST,DISP=SHR
// DD DSN=F22WAT.BADCHL,UNIT=FAST,DISP=SHR
// DD DSN=F11LHO.JADEGL,UNIT=FAST,DISP=SHR
// DD DSN=R02BUT.CERNLIB,UNIT=FAST,DISP=SHR
//LKED.SYSIN DD *
 INCLUDE SYSLIB(BREADKW,BWRITEKW)
//GO.FT02F001 DD UNIT=FAST,DISP=SHR,DSN=F11LHO.ORIC
//GO.FT03F001 DD UNIT=FAST,DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//  SPACE=(TRK,(50,20),RLSE),DSN=F11LHO.ORICREFM
//GO.FT04F001 DD DUMMY
//GO.FT08F001 DD DUMMY
//GO.FT09F001 DD UNIT=FAST,DISP=OLD,DSN=F11LHO.FASTSEL
//*
$   28/05/84 508061722: MEMBER NAME  JBLBADC  (BIBLS)       NEWLIB
//JADEPRLK JOB '10622622',PRODUC,CLASS=E,MSGLEVEL=(1,1),TIME=(0,10)
//*MAIN RELPRI=HIG,LINES=(2),ORG=EXT
//JOBLIB DD DSN=R02BUT.FORTRANH,DISP=SHR
//*
//*   FIND BAD BLOCKS
//*
//LINK EXEC FCL,PARM.LKED='LIST,MAP'
//FORT.SYSIN DD *
      IMPLICIT INTEGER*2 (H)
      REWIND 4
      REWIND 8
      CALL KALCOP
      CALL KALADD
      CALL KORDER
      CALL KALREV
      REWIND 4
      STOP
      END
//LKED.SYSLIB DD
//            DD
//            DD DSN=JADEPR.JADELD,UNIT=FAST,DISP=SHR
//            DD DSN=F22WAT.BADCHL,UNIT=FAST,DISP=SHR
//            DD DSN=F11LHO.JADEGL,UNIT=FAST,DISP=SHR
//LKED.SYSLMOD DD DISP=SHR,UNIT=FAST,DSN=JADEPR.JADELD(BADCHLD)
//*
$   28/05/84 508061722: MEMBER NAME  JBLBADC1 (BIBLS)       NEWLIB
//JADEPRLK JOB '10622622',PRODUC,CLASS=E,MSGLEVEL=(1,1),TIME=(0,10)
//*MAIN RELPRI=HIG,LINES=(2),ORG=EXT
//JOBLIB DD DSN=R02BUT.FORTRANH,DISP=SHR
//*
//*   FIND BAD BLOCKS
//*
//LINK EXEC FCL,PARM.LKED='LIST,MAP'
//FORT.SYSIN DD *
      IMPLICIT INTEGER*2 (H)
      REWIND 2
      REWIND 3
      CALL KALCOP(2,3)
      CALL KORDER
      CALL KALADD
      CALL KALREV
      REWIND 4
      STOP
      END
//LKED.SYSLIB DD
//            DD
//            DD DSN=JADEPR.JADELD,UNIT=FAST,DISP=SHR
//            DD DSN=F22WAT.BADCHL,UNIT=FAST,DISP=SHR
//            DD DSN=F11LHO.JADEGL,UNIT=FAST,DISP=SHR
//LKED.SYSLMOD DD DISP=SHR,UNIT=FAST,DSN=JADEPR.JADELD(BADCHLD1)
//LKED.SYSIN DD *
  INCLUDE SYSLIB(KALIB)
//*
$   28/05/84 508061722: MEMBER NAME  JBLRED1  (BIBLS)       NEWLIB
//JADER1LK JOB '10622622',REDUCONE,CLASS=E,TIME=(0,15)
//*MAIN RELPRI=HIG,LINES=(2),ORG=EXT
//*
//*-------------------------------------------------------
//*
//* JOB TO LINK AN EXECUTABLE REDUC1 LOAD MODULE AT DESY
//* NEW MODULE NAME = JADEPR.JADELD(RED1LD)
//*
//*-------------------------------------------------------
//*
//JOBLIB DD DSN=R02BUT.FORTRANH,DISP=SHR
// EXEC FCL,FORT=XL,PARM.LKED='LIST,MAP'
//FORT.SYSIN DD *
#include "jdmain0.for"
//*
//LKED.SYSLIB DD
//            DD
//            DD DISP=SHR,UNIT=FAST,DSN=JADEPR.JADELD
//            DD DISP=SHR,UNIT=FAST,DSN=F11GOD.PATRECLD
//            DD DISP=SHR,UNIT=FAST,DSN=F11LHO.JADEGL
//            DD DISP=SHR,UNIT=FAST,DSN=JADELG.LOAD
//            DD DISP=SHR,UNIT=FAST,DSN=F22ALL.JADEMUL
//            DD DISP=SHR,UNIT=FAST,DSN=F1EBLO.BOSLIB.L
//*           DD DISP=SHR,UNIT=FAST,DSN=R01UTL.HBOOK321.L
//            DD DISP=SHR,UNIT=FAST,DSN=R02BUT.CERNLIB
//LKED.SYSLMOD DD DISP=SHR,UNIT=FAST,DSN=JADEPR.JADELD(RED1LD)
//LKED.SYSIN DD *
 INCLUDE SYSLIB(USRED82,GBOOK,DBASEDUM)
//*
$   28/05/84 508061722: MEMBER NAME  JBLRERM  (BIBLS)       NEWLIB
//JADEPRLK JOB '10622622',PRODUC,CLASS=E,MSGLEVEL=(1,1),TIME=(0,15)
//*MAIN RELPRI=HIG
//JOBLIB DD DSN=R02BUT.FORTRANH,DISP=SHR
//*
//*    REFORMAT EVENTS
//*
//LINK EXEC FCL,PARM.LKED='LIST,MAP'
//FORT.SYSIN DD *
      IMPLICIT INTEGER*2 (H)
      COMMON/CDFLAG/IDFLAG,LIMOUT,NRNMIN,NRNMAX
      IDFLAG=0
      LIMOUT=1000000
      NRNMIN=      0
      NRNMAX=1000000
      CALL REFMAI
      STOP
      END
//LKED.SYSLIB DD
// DD
// DD DSN=JADEPR.JADELD,UNIT=FAST,DISP=SHR
// DD DSN=F22WAT.BADCHL,UNIT=FAST,DISP=SHR
// DD DSN=F11LHO.JADEGL,UNIT=FAST,DISP=SHR
// DD DSN=R02BUT.CERNLIB,UNIT=FAST,DISP=SHR
//LKED.SYSLMOD DD DISP=SHR,UNIT=FAST,DSN=JADEPR.JADELD(REFRMLD)
//LKED.SYSIN DD *
 INCLUDE SYSLIB(EVFOLDKW,ADDON,EVCONV,BREADKW,BWRITEKW)
//*
$   28/05/84 508061722: MEMBER NAME  JBMEMRD1 (BIBLS)       NEWLIB
//F11OLS   JOB 10622622,OLSSON,CLASS=E,MSGLEVEL=(0,0)
//*MAIN ORG=EXT
// EXEC FCLG
//FORT.SYSIN DD *
      DIMENSION A(80)
C********************** NCOPY IS NUMBER OF COPIES WANTED  *****
      NCOPY = 1
      DO 2 N=1,NCOPY
      WRITE(6,102)
      DO 1 I=1,100000
      READ(5,100,END=99) A
  100 FORMAT(80A1)
C     IF(MOD(I,33).EQ.0) WRITE(6,102)
  102 FORMAT(1H1,/)
      WRITE(6,101) A
  101 FORMAT(3X,72A1,30X,8A1)
C     WRITE(6,103)
  103 FORMAT(/)
    1 CONTINUE
   99 REWIND 5
    2 CONTINUE
      STOP
      END
//GO.SYSIN DD *

                       ****************************
                     I                              I
                    I   JADE COMPUTER NOTE NR. 27    I
                     I                              I
                       ****************************

   *********************************************************************
   *                   JADE DATA REDUCTION,  STEP 1                    *
   *********************************************************************
                                          M.GODDARD  J.OLSSON  P.STEFFEN
                                                              05.10.1979
   ---------------------------------------------------------------------

  GENERAL INFORMATION (BOOK-KEEPING):
  -----------------------------------

     THE START POINT FOR DATA REDUCTION ARE THE DATA TAPES FROM THE
  REFORMATING STEP. THESE ARE FOUND IN THE DATA GENERATION GROUP

                                         F11LHO.JDATA01.REFORM.G0NNNV00

  CURRENT STATUS OF THESE TAPES IS FOUND IN THE MEMBER

                             JADEPR.YENLHO.S(RUNLST)

     BEFORE STARTING THE REDUCTION STEP, AN UPDATING OF "BAD LEAD GLASS"
  INFORMATION HAS TO BE PERFORMED. BOOK-KEEPING OF THIS STEP IS FOUND IN

                             F22WAT.BADCHS(BADCH)

     DATA REDUCTION STEP 1 HAS TWO SERIES OF OUTPUT TAPES. DUE TO TIME
  REASONS, TEMPORARY TAPES WITH THE NAMES
                                         JADEPR.TNNNA
                                         JADEPR.TNNNB  ETC.,
  ARE FIRST CREATED, NORMALLY 3-4 PER REFORM-TAPE (WITH NUMBER NNN)
     THESE TEMPORARY TAPES ARE THEN GROUPED TOGETHER INTO PERMANENT
  TAPES IN THE GENERATION GROUP

                                         JADEPR.REDUC1.G00MMV00

     THE NUMBER MM HAS NO RELATION TO THE PREVIOUS NUMBER NNN OF THE
  REFORMATING STEP. THE BOOK-KEEPING OF THIS STEP IS FOUND IN

                             JADEPR.JADESR(REDUC)

     IF POSSIBLE, THE GROUPING TO REDUC1 TAPES FOLLOWS THE VARIOUS
  CM-ENERGIES.

  THE DATA REDUCTION CUTS:
  ------------------------

    LEAD GLASS PULSER EVENTS ARE REJECTED (NORMALLY 13 EVENTS / RUN)

    AFTER THE EVENT IS READ AND BEFORE IT GOES ON TO ZVERTEX CALCULATION
  AND PATTERN RECOGNITION, SEVERAL FLAGS ARE SET:

      1. OVERFLOW FLAG IFLW, 0 OR 1  (SHORTER OR LONGER THAN 3000 WORDS)
      2. TAGGING FLAG IFTG       BY CALLING SUBR. TAGFLG(IFTG), WHICH
              SETS FLAG FOR ENERGY IN FORWARD TAGGING BLOCKS
             IFTG = 0      NO ENERGY
             IFTG = 11     ENERGY ABOVE LIMIT IN NEG. FW ARM
             IFTG = 12     ENERGY ABOVE LIMIT IN POS. FW ARM
             IFTG = 113    ENERGY ABOVE LIMIT IN BOTH FW ARMS  (LUMI)
      3. TOKYO LEAD GLASS LABEL, IAC
             IAC = 0 IF ETOT < 7 GEV AND ECYL < 3.5 GEV
             IAC = 0 IF LGCALB GIVES ERROR RETURN
             IAC = 0 IF ETOT IS CONTAINED (>95%) IN ONE ENDCAP BLOCK
                     (THIS IS CHECKED ONLY IF ETOT > 6 GEV)
             IAC = 1 OTHERWISE

    THESE THREE FLAGS ARE COMBINED INTO ONE WRITE FLAG, IWRT :

      IWRT = 1
      IF(IAC.EQ.0.AND.IFLW.EQ.0.AND.(IFTG.EQ.0.OR.ETOT.LT.300.)) IWRT=0

    THE LAST ETOT LIMIT SERVES TO REJECT PURE LUMI TRIGGERS
  **********
  OBS OBS
    THE WRITE FLAG IS USED TO SAVE THE EVENT IF IT WOULD OTHERWISE BE
  REJECTED IN ONE OF THE FOLLOWING ZVERTEX OR PATREC STEPS.
  **********

    EVENTS WITH NO INNER DETECTOR HITS ARE NOW REJECTED IF IWRT = 0
    EVENTS WITH NO INNER DETECTOR HITS ARE NOW WRITTEN  IF IWRT = 1

  ----->  Z-VERTEX CALCULATION

    EVENTS WITH NO Z-VERTEX (ZVTX) FOUND   ARE REJECTED IF IWRT = 0
    EVENTS WITH ABS(ZVTX) > 450. MM        ARE REJECTED IF IWRT = 0
    ALL OTHER EVENTS PROCEED TO PATTERN RECOGNITION

  ----->  PATTERN RECOGNITION

    EVENTS WITH NO 'PATR' BANK        ARE REJECTED  (PATHOLOGIC)
    NOTE: A RESULT BANK 'PATR' WITH MINIMUM LENGTH OF 8 I*4 WORDS IS
          ALWAYS CREATED, EVEN IF NO TRACK IS FOUND. THE ONLY EXCEPTION
          TO THIS IS WHEN COMMON /BCS/ HAS NOT ENOUGH FREE SPACE EVEN
          FOR THIS SHORT BANK. PRESENT SIZE OF /BCS/ IS 20000 I*4 WORDS
          ( MINUS ADMINISTRATIVE SPACE FOR "BOS")
    EVENTS WITH NO TRACKS (NTR = 0)   ARE REJECTED IF IWRT = 0
    EVENTS WITH NO TRACKS (NTR = 0)   ARE WRITTEN  IF IWRT = 1

  THE REMAINING EVENTS WITH TRACKS (NTR > 0) ARE NOW SEPARATED INTO
  TAGGED AND NONTAGGED EVENTS (IFTG > 0  AND  IFTG = 0). THEY ARE
  TREATED DIFFERENTLY:

   TAGGED EVENTS:

    SEARCH FOR TRACKS WITH > 12 HITS AND PTRANS > 200 MEV
    EVENTS WITH AT LEAST ONE SUCH TRACK ARE WRITTEN
    EVENTS WITHOUT SUCH TRACKS          ARE REJECTED

   NOTAGGED EVENTS:

    THESE EVENTS ARE DIVIDED INTO THREE DIFFERENT CLASSES, ACCORDING TO
  QUALITY OF TRACKS:
      ISTAR=0 MEANS ALL TRACKS SHORT  ( < 12 HITS IN THE R-Z FIT)
      ISTAR=1 MEANS AT LEAST ONE LONG HIGH PTRANS TRACK   ( > 600 MEV)
      ISTAR=2 MEANS AT LEAST ONE LONG TRACK BUT NOT HIGH PTRANS

   ISTAR = 0 EVENTS:

    EVENTS ARE WRITTEN  IF IWRT = 1
    IF IWRT = 0  THE EVENTS UNDERGO A FURTHER CHECK:
       EVENTS ARE WRITTEN IF THEY HAVE AT LEAST ONE LONG ( > 20 HITS)
                                            TRACK IN THE R-FI FIT
       EVENTS ARE REJECTED IF THEY DO NOT HAVE SUCH A TRACK

   ISTAR = 2 EVENTS:
       EVENTS ARE REJECTED IF IWRT = 0
       EVENTS ARE WRITTEN  IF IWRT = 1

   ISTAR = 1 EVENTS:
       EVENTS ARE WRITTEN  IF IWRT = 1
       IF IWRT = 0 THEN THE QUANTITY ZMIN IS CALCULATED:
        ZMIN IS THE SMALLEST Z-AXIS INTERCEPT OF ALL THE LONG TRACKS
       EVENTS ARE REJECTED IF  ZMIN > 450 MM
       IF ZMIN IS < 450 MM  THEN THE QUANTITY RMIN IS CALCULATED
        RMIN IS THE SMALLEST DISTANCE TO THE Z-AXIS OF ALL LONG TRACKS
       EVENTS ARE REJECTED IF    RMIN > 60 MM
       EVENTS ARE WRITTEN  IF    RMIN < 60 MM

  REDUCTION STATISTICS
  --------------------

   BELOW IS GIVEN THE TYPICAL STATISTICS FOR A DATA REDUCTION STEP 1
  ACCORDING TO THE CUTS DESCRIBED ABOVE.  PERCENTAGES GIVEN REFER TO THE
  TOTAL NUMBER OF READ EVENTS (- PULSER EVENTS) IN CASE OF REJECTS AND
  TO THE TOTAL NUMBER OF WRITTEN EVENTS IN CASE OF WRITTEN EVENTS.

       ++++++++   STATISTICS FOR RUN      0    ++++++++++
  EVENTS READ       7000           PULSER EVENTS        13
  OVERFLOW EVENTS    9       LGCALB ERROR RETURNS       0
  6798 EVENTS FAILED LGLASS CUT     97.29%
   189 EVENTS PASSED LGLASS CUT      2.71%
    95 EVENTS HAD BAD LGLASS BLOCKS      1.36%    (E-CAP SPINNERS)
  5966 EVENTS HAVE NO TAG TRIGGER     85.39%
  1021 EVENTS HAVE TAG TRIGGER        14.61%
   149 EVENTS WITH TAG TRIGGER AND ETOT >  300. MEV      2.13%
  6650 EVENTS WITH COMBINED WRITE FLAG OFF   95.18%
   337 EVENTS WITH COMBINED WRITE FLAG ON     4.82%
   110 EVENTS HAD NO ID HITS AND WRITE FLAG OFF      1.57%         (REJ)
     0 EVENTS HAD NO ID HITS AND WRITE FLAG ON      0.0 %          (WRI)
  6877 EVENTS ENTERED ZVERTEX ROUTINE      98.43%
   821 EVENTS FAILED TO FIND Z VERTEX & HAD WRITE FLAG OFF  11.75% (REJ)
   122 EVENTS FAILED TO FIND Z VERTEX BUT HAD WRITE FLAG ON  1.75% (WRI)
  3045 EVENTS HAD ZVTX > 450 AND WRITE FLAG OFF     43.58%         (REJ)
  3011 EVENTS THROUGH PATREC      43.09%
    87 EVENTS WERE 0 PRONGS        1.25%
     6 EVENTS WERE 0 PRONGS AND HADE NO WRITE FLAG      0.09%      (REJ)
    81 EVENTS WERE 0 PRONGS AND HAD WRITE FLAG ON      6.61%       (WRI)
  2924 EVENTS HAD AT LEAST ONE TRACK       41.85%
   222 EVENTS WITH TRACKS AND TAG FLAG       3.18%
    40 EVENTS WITH TRACKS AND TAG FLAG, LOW MOMENTUM       0.57%   (REJ)
   182 EVENTS WITH TRACKS AND TAG FLAG, HIGH MOMENTUM      14.86%  (WRI)
   103 EVENTS WERE ISTAR=0       1.47%
    46 EVENTS WERE ISTAR=0 AND HAD WRITE FLAG ON      3.76%        (WRI)
    11 EVENTS WERE ISTAR=0 BUT HAD LONG TRACK IN RFI  0.90%        (WRI)
    46 EVENTS WERE ISTAR=0 AND HAD NO LONG TRACK IN RFI      0.66% (REJ)
   990 EVENTS WERE ISTAR=2      14.17%
    30 EVENTS WERE ISTAR=2 AND HAD WRITE FLAG ON      2.45%        (WRI)
   960 EVENTS WERE ISTAR=2 AND HAD WRITE FLAG OFF     13.74%       (REJ)
  1609 EVENTS WERE ISTAR=1      23.03%
   213 EVENTS HAD ZMIN > 450 AND HAD NO WRITE FLAG      3.05%      (REJ)
     5 EVENTS HAD ZMIN > 450 BUT HAD WRITE FLAG ON      0.41%      (WRI)
    36 EVENTS HAD ZMIN < 450 AND WRITE FLAG ON      2.94%          (WRI)
  1355 EVENTS WENT INTO RMIN CUT     19.39%
   521 EVENTS REJECTED BY RMIN CUT       7.46%                     (REJ)
   834 EVENTS PASSED RMIN CUT AND ZMIN       68.08%                (WRI)

  6987 EVENTS WERE READ AND A TOTAL OF  1225  EVENTS WERE WRITTEN
         REDUCTION FACTOR :     17.53%


  REDUCTION STEP 1 FOR DATA FROM SUMMER 1979
  ------------------------------------------

   THE STATISTICS GIVEN ABOVE IS TYPICAL FOR DATA TAKEN IN AUTUMN 79.
  DATA FROM THE PRECEDING RUN IN SUMMER 79 IS MUCH DIRTIER, DUE TO WORSE
  BEAM CONDITIONS. THUS THE PROPORTION OF COSMIC EVENTS IN THE AUTUMN
  DATA IS MUCH HIGHER; THIS IS MIRRORED IN THE VERY DIFFERENT FRACTIONS
  OF EVENTS THAT PROCEED TO PATTERN RECOGNITION, AS WELL AS IN THE VERY
  DIFFERENT OVERALL REDUCTION FACTORS.  BELOW IS GIVEN THE SAME SUMMARY
  AS ABOVE, BUT FOR A TYPICAL SUMMER RUN.

       ++++++++   STATISTICS FOR RUN      0    ++++++++++
  EVENTS READ       9011           PULSER EVENTS        12
  OVERFLOW EVENTS    6       LGCALB ERROR RETURNS       0
  8906 EVENTS FAILED LGLASS CUT     98.97%
    93 EVENTS PASSED LGLASS CUT      1.03%
    71 EVENTS HAD BAD LGLASS BLOCKS      0.79%    (E-CAP SPINNERS)
  5724 EVENTS HAVE NO TAG TRIGGER     63.61%
  3275 EVENTS HAVE TAG TRIGGER        36.39%
   115 EVENTS WITH TAG TRIGGER AND ETOT >  300. MEV      1.28%
  8787 EVENTS WITH COMBINED WRITE FLAG OFF   97.64%
   212 EVENTS WITH COMBINED WRITE FLAG ON     2.36%
   140 EVENTS HAD NO ID HITS AND WRITE FLAG OFF      1.56%         (REJ)
     0 EVENTS HAD NO ID HITS AND WRITE FLAG ON      0.0 %          (WRI)
  8859 EVENTS ENTERED ZVERTEX ROUTINE      98.44%
  4633 EVENTS FAILED TO FIND Z VERTEX & HAD WRITE FLAG OFF  51.48% (REJ)
    93 EVENTS FAILED TO FIND Z VERTEX BUT HAD WRITE FLAG ON  1.03% (WRI)
  2566 EVENTS HAD ZVTX > 450 AND WRITE FLAG OFF     28.51%         (REJ)
  1660 EVENTS THROUGH PATREC      18.45%
   129 EVENTS WERE 0 PRONGS        1.43%
    60 EVENTS WERE 0 PRONGS AND HADE NO WRITE FLAG      0.67%      (REJ)
    69 EVENTS WERE 0 PRONGS AND HAD WRITE FLAG ON     19.44%       (WRI)
  1531 EVENTS HAD AT LEAST ONE TRACK       17.01%
   158 EVENTS WITH TRACKS AND TAG FLAG       1.76%
   104 EVENTS WITH TRACKS AND TAG FLAG, LOW MOMENTUM        1.16%  (REJ)
    54 EVENTS WITH TRACKS AND TAG FLAG, HIGH MOMENTUM      15.21%  (WRI)
   227 EVENTS WERE ISTAR=0       2.52%
    33 EVENTS WERE ISTAR=0 AND HAD WRITE FLAG ON      9.30%        (WRI)
     0 EVENTS WERE ISTAR=0 BUT HAD LONG TRACK IN RFI   0.0%        (WRI)
   194 EVENTS WERE ISTAR=0 AND HAD NO LONG TRACK IN RFI      2.16% (REJ)
   708 EVENTS WERE ISTAR=2       7.87%
    15 EVENTS WERE ISTAR=2 AND HAD WRITE FLAG ON      4.23%        (WRI)
   693 EVENTS WERE ISTAR=2 AND HAD WRITE FLAG OFF      7.70%       (REJ)
   438 EVENTS WERE ISTAR=1       4.87%
   167 EVENTS HAD ZMIN > 450 AND HAD NO WRITE FLAG      1.86%      (REJ)
     3 EVENTS HAD ZMIN > 450 BUT HAD WRITE FLAG ON      0.85%      (WRI)
    19 EVENTS HAD ZMIN < 450 AND WRITE FLAG ON      5.35%          (WRI)
   249 EVENTS WENT INTO RMIN CUT      2.77%
    87 EVENTS REJECTED BY RMIN CUT       0.97%                     (REJ)
   162 EVENTS PASSED RMIN CUT AND ZMIN       45.63%                (WRI)

  8999 EVENTS WERE READ AND A TOTAL OF   355  EVENTS WERE WRITTEN
         REDUCTION FACTOR :      3.94%

   THE DIFFERENT BEAM CONDITIONS ARE ALSO MIRRORED IN THE DEMAND ON CPU-
  TIME FOR THE REDUCTION STEP. FOR AUTUMN DATA THE TOTAL TIME SPENT IN
  PATTERN RECOGNITION IS C:A  50 %  OF THE TOTAL JOBTIME AND AVERAGE
  CPU-TIME DEMAND IS  80 - 100 MSEC / EVENT.  THIS MEANS THAT WITH AN
  L-JOB (15 MIN.) 9 - 10000 EVENTS CAN BE PROCESSED. THIS SHOULD BE COM-
  PARED WITH 20 - 22000 EVENTS / L-JOB FOR THE SUMMER RUN.

  PROGRAM CHANGES
  ---------------

   THE DATA REDUCTION PROGRAM (SUBROUTINE USREDUC1 ON LIB JADEPR.JADESR)
  HAS CHANGED FROM THE VERSION USED IN THE SUMMER RUN, BOTH BECAUSE SOME
  OF THE CALLED PROGRAMS HAVE CHANGED (LEAD GLASS CALIBRATION, PATTERN
  RECOGNITION) AND BECAUSE OF THE INTRODUCTION OF NEW CONDITIONS. THESE
  NEW CONDITIONS ARE MAINLY THAT TAGGED EVENTS ARE NOW GIVEN SPECIAL
  ATTENTION AND THAT A RMIN-CUT IS PERFORMED. TEST RUNS OF THE OLD AND
  THE NEW PROGRAMS ON SUMMER DATA SHOW ONLY SMALL VARIATIONS, DUE TO THE
  FACT THAT THE INCLUSION OF TAGGED EVENTS IS BALANCED BY THE REJECTION
  BY THE RMIN CUT.

                       A COPY OF THIS INFORMATION CAN BE OBTAINED BY
                       SUBMITTING THE JOB   JBMEMRD1  ON THE LIBRARY
                       JADEPR.JADESR
$   28/05/84 508061722: MEMBER NAME  JBNBADC  (BIBLS)       NEWLIB
//JADEPRF1 JOB '10622622',PRODUC,CLASS=E,MSGLEVEL=(1,1),TIME=(0,15)
//*MAIN RELPRI=HIG,LINES=(2)
//*NET ID=JADEPRN7,RL=(JADEPRD7)
//JOBLIB DD DSN=JADEPR.JADELD,DISP=SHR
//*
//*   FIND BAD BLOCKS
//*
//BADCHL EXEC PGM=BADCHLD,REGION=600K
//*
//GO.FT02F001 DD UNIT=FAST,DISP=OLD,DSN=F11LHO.KALWRK0
//GO.FT03F001 DD UNIT=FAST,DISP=OLD,DSN=F11LHO.KALWRK1
//GO.FT08F001 DD UNIT=FAST,DISP=OLD,DSN=F22WAT.LGBAD0
//GO.FT04F001 DD UNIT=DISK,DISP=(,PASS),
//   DCB=(R01DCB.VBS,LRECL=6236),
//   SPACE=(CYL,(20,20)),DSN=&&SCRTCH
//*
//GO.FT06F001 DD SYSOUT=*
//GO.FT05F001 DD *
//*
$   28/05/84 508061722: MEMBER NAME  JBPRMESS (BIBLS)       NEWLIB
//F11PST   JOB 10622622,MSGLEVEL=(0,0),CLASS=A,TIME=(0,10)
//*MAIN ORG=EXT,LINES=(4),RELPRI=HIG
// EXEC FCG,PARM.FORT='OPT=3,XL'
C
      DIMENSION A(200,18)
C
 1001 FORMAT(18A4)
 2000 FORMAT(1H1)
 2001 FORMAT(10X,18A4)
 2002 FORMAT(4X)
C
C                                       # OF PRINTED MESSAGES
C     NPR    =  70
      NPR    =  10
C
      IL = 1
  100 CONTINUE

         READ(5,1001,END=200) (A(IL,I1),I1=1,18)
         IL = IL + 1
         GOTO 100
C
  200 CONTINUE
      NL = IL - 1
C
      LINE   = 9999
      LINEMX = 32
      IF(NL.GT.LINEMX) LINEMX =-1
      DO 210 IPR=1,NPR
         IF(LINE.GT.LINEMX) GOTO 206
            L9 = LINEMX + 2
            L1 = LINE
            DO 204 IL=L1,L9
               PRINT 2002
               LINE = LINE + 1
  204       CONTINUE
         GOTO 207
  206       PRINT 2000
            LINE = 0
C
  207    CONTINUE
         DO 208 IL=1,NL
            IF(LINE.LE.68) GOTO 209
               PRINT 2000
               LINE = 0
  209       CONTINUE
            PRINT 2001, (A(IL,I1),I1=1,18)
            LINE = LINE + 1
  208    CONTINUE
  210 CONTINUE
C
      STOP
      END
//GO.SYSIN DD *
#include "rednote.for"
$   28/05/84 508061722: MEMBER NAME  JBREDOBL (BIBLS)       NEWLIB
//JADEPRFM JOB '10622622',PRODUC,CLASS=L,MSGLEVEL=(1,1),TIME=5
//*MAIN RELPRI=HIG,LINES=(18)
//JOBLIB DD DSN=R02BUT.FORTRANH,DISP=SHR
// EXEC CATPROGM
   DELETE F11LHO.JDATA03.REFORM.G0149V00
// EXEC NEWFAST
//*
//*    REFORMAT EVENTS
//*    SPECIAL VERSION FOR CORRECTING BAD ADC DATA AND REPLACING
//*    THE CORRESPONDING SPINNING BLOCK LISTS.
//*
//REFM EXEC FCLG,FORT='XL,OPT=2,LEVEL=4',
//      LKED='MAP,LIST',REGION=750K
//FORT.SYSIN DD *
      IMPLICIT INTEGER*2 (H)
      COMMON/CDFLAG/IDFLAG,LIMOUT,NRNMIN,NRNMAX
      IDFLAG=0
      LIMOUT=1000000
      NRNMIN=      0
      NRNMAX=1000000
      CALL REFMAI
      STOP
      END
#include "evfoldkw.for"
#include "addon.for"
#include "evconv9.for"
//LKED.SYSLIB DD
// DD
// DD DSN=JADEPR.JADELD,UNIT=FAST,DISP=SHR
// DD DSN=F22WAT.BADCHL,UNIT=FAST,DISP=SHR
// DD DSN=F11LHO.JADEGL,UNIT=FAST,DISP=SHR
// DD DSN=R02BUT.CERNLIB,UNIT=FAST,DISP=SHR
//LKED.SYSIN DD *
 INCLUDE SYSLIB(BREADKW,BWRITEKW)
//GO.FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F22YEN.JADE.EXDATA02.G0173V00
//GO.FT03F001 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//   DCB=(R01DCB.VBS,LRECL=6236,BLKSIZE=24948),
//   DSN=F11LHO.JDATA03.REFORM.G0149V00
//*
//GO.FT04F001 DD DSN=F22WAT.LGBAD0,DISP=MOD,UNIT=FAST
//GO.FT08F001 DD DUMMY
//GO.FT09F001 DD UNIT=FAST,DISP=OLD,DSN=F11LHO.FASTSELR
//*
//*
//*   FIND BAD BLOCKS
//*
//SPBL EXEC FCLG,FORT='XL,OPT=2,LEVEL=4'
//FORT.SYSIN DD *
      IMPLICIT INTEGER*2 (H)
      REWIND 4
      REWIND 8
      CALL KALCOP
      CALL KALADD
      CALL KORDER
      CALL KALREV
      REWIND 4
      STOP
      END
#include "kalcop.for"
#include "kalm1s.for"
#include "korder.for"
#include "kalelm.for"
//LKED.SYSLIB DD
// DD
// DD DSN=JADEPR.JADELD,UNIT=FAST,DISP=SHR
// DD DSN=F22WAT.BADCHL,UNIT=FAST,DISP=SHR
// DD DSN=F11LHO.JADEGL,UNIT=FAST,DISP=SHR
//GO.FT02F001 DD UNIT=FAST,DISP=OLD,DSN=F11LHO.KALWRK0
//*GO.FT03F001 DD UNIT=FAST,DISP=OLD,DSN=F11LHO.KALWRK1
//GO.FT08F001 DD UNIT=FAST,DISP=OLD,DSN=F22WAT.LGBAD0
//GO.FT04F001 DD UNIT=DISK,DISP=(,PASS),
//   DCB=(R01DCB.VBS,LRECL=6236),
//   SPACE=(CYL,(20,20)),DSN=&&SCRTCH
//GO.FT03F001 DD UNIT=DISK,DISP=(,PASS),
//   DCB=(R01DCB.VBS,LRECL=6236),
//   SPACE=(CYL,(20,20)),DSN=&&SCRTCH1
//*
$   28/05/84 508061722: MEMBER NAME  JBREDPS  (BIBLS)       NEWLIB
//F11PST   JOB '10622622',TEST,CLASS=E,MSGLEVEL=(0,0),TIME=(0,30)
//*MAIN RELPRI=HIG,LINES=(4),ORG=EXT
//*
// EXEC NEWLIB,PS='JADEPR.JADESR',
// LEVEL=0,OPT=2,FORT=XL
//MACRO DD DSN=F11GOD.PATRECSR,DISP=SHR,UNIT=FAST
./ COMPILE USRED829
//*
//*   DATA REDUCTION 1
//*
//REDUC1 EXEC FLG,PARM.LKED='LIST',REGION.GO=850K
//LKED.SYSLIB DD
//            DD
//            DD DISP=SHR,UNIT=,DSN=&&LOAD
//            DD DISP=SHR,UNIT=FAST,DSN=JADEPR.JADELD
//            DD DISP=SHR,UNIT=FAST,DSN=F22YAM.LGKOSM.L
//            DD DISP=SHR,UNIT=FAST,DSN=F11GOD.PATRECLD
//            DD DISP=SHR,UNIT=FAST,DSN=F11LHO.JADEGL
//            DD DISP=SHR,UNIT=FAST,DSN=JADELG.LOAD
//            DD DISP=SHR,UNIT=FAST,DSN=F22ALL.JADEMUL
//            DD DISP=SHR,UNIT=FAST,DSN=F1EBLO.BOSLIB.L
//            DD DISP=SHR,UNIT=FAST,DSN=R01UTL.HBOOK321.L
//            DD DISP=SHR,UNIT=FAST,DSN=R02BUT.CERNLIB
//LKED.SYSIN DD *
 INCLUDE SYSLIB(JDMAIN0,USRED829)
//*
//*O.FT21F001 DD UNIT=FAST,DISP=SHR,DSN=F11LHO.AUPDAT0
//GO.FT22F001 DD UNIT=FAST,DISP=SHR,DSN=F11LHO.KALWRK0
//GO.FT07F001 DD SYSOUT=B
//*                        INPUT:
//*O.FT02F001 DD DISP=OLD,UNIT=TAPE,
//*  DSN=F11LHO.JDATA07.REFORM.G0090V00
//GO.FT02F001 DD DISP=SHR,
//   DSN=F22NAR.MSSJAD.MY408450
//*  DSN=JADEPR.RED1IN2
//* DSN=F22TAK.DSK.REF01
//*                        OUTPUT:
//GO.FT03F001 DD DUMMY
//*O.FT03F001 DD DISP=OLD,DSN=JADEPR.RED1OU2
//GO.SYSIN DD *
STARTRUN 00010286 00000000
NOTRUNS  00000 00000 00000 00000 00000 00000 00000 00000 00000 00000
/*
$   28/05/84 508061722: MEMBER NAME  JBREDT1  (BIBLS)       NEWLIB
//JADEPR   JOB '10622622',TEST,CLASS=E,MSGLEVEL=(1,1),TIME=(0,15)
//*MAIN RELPRI=HIG,LINES=(5),ORG=EXT
//*
//*
//*   DATA REDUCTION 1
//*
//SHELTR EXEC SHELTRAN
#include "userx.for"
#include "trck82x.for"
//*
// EXEC FC,LEVEL=0,PARM.FORT='NOSOURCE,NOLIST,XL,OPT=3'
//FORT.SYSIN DD DSN=&&FORTIN,DISP=(OLD,DELETE)
// EXEC FCLG,LEVEL=0,PARM.FORT='NOLIST,XL,OPT=3',
//           PARM.LKED='LIST',REGION.GO=1000K
//*
//LKED.SYSLIB DD
//            DD
//            DD DISP=SHR,UNIT=FAST,DSN=JADEPR.JADELD
//            DD DISP=SHR,UNIT=FAST,DSN=F11GOD.PATRECLD
//            DD DISP=SHR,UNIT=FAST,DSN=F11LHO.JADEGL
//            DD DISP=SHR,UNIT=FAST,DSN=JADELG.LOAD
//            DD DISP=SHR,UNIT=FAST,DSN=F22ALL.JADEMUL
//            DD DISP=SHR,UNIT=FAST,DSN=F1EBLO.BOSLIB.L
//            DD DISP=SHR,UNIT=FAST,DSN=R01UTL.HBOOK321.L
//            DD DISP=SHR,UNIT=FAST,DSN=R02BUT.CERNLIB
//LKED.SYSIN DD *
 INCLUDE SYSLIB(JDMAIN0)
 INCLUDE SYSLIB(GBOOK,DBASEDUM)
//*
//GO.FT21F001 DD UNIT=FAST,DISP=SHR,DSN=F11LHO.BUPDAT0
//GO.FT22F001 DD UNIT=FAST,DISP=SHR,DSN=F11LHO.KALWRK0
//GO.FT07F001 DD SYSOUT=B
//*                        INPUT:
//*O.FT02F001 DD DISP=OLD,UNIT=TAPE,
//*  DSN=F11LHO.JDATA05.REFORM.G0028V00
//GO.FT02F001 DD DISP=SHR,UNIT=FAST,
//   DSN=JADEPR.TEST635
//*O.FT02F001 DD DISP=SHR,DSN=JADEPR.REDUCONE.G0635V00
//*                        OUTPUT:
//GO.FT03F001 DD DUMMY
//*O.FT03F001 DD DISP=OLD,DSN=JADEPR.TEST635
EVNT               0         0
$   28/05/84 508061722: MEMBER NAME  JBRED1LT (BIBLS)       NEWLIB
//JADEPR JOB '10622622',REDUCONE,CLASS=E,MSGLEVEL=(1,0),TIME=(0,10)
//*MAIN RELPRI=HIG,LINES=(20),ORG=EXT
//JOBLIB DD DSN=JADEPR.JADELD,DISP=SHR
//*
//*------------------  JCL FOR TEST OF LOAD MODULE  ----------
//*
//* JCL TO RUN THE JADE REDUCONE PROGRAM
//*
//* FT02F001 = INPUT REFORMAT TAPE (IE DATA TO BE REDUCED)
//*          = F11LHO.˘(S2).REFORM.˘(S1)V00
//*
//* SYSUT2   = OUTPUT FILE FOR REDUCED EVENTS
//*          = JADEPR.ST˘(SUBSTR(S1,3,3))
//*
//*-----------------------------------------------------------
//*
//REDUCING EXEC PGM=REDUC1LD,REGION=765K
//FT06F001 DD SYSOUT=*
//FT07F001 DD DUMMY
//FT03F001 DD DUMMY
//*T03F001 DD UNIT=DISK,DISP=(NEW,PASS),DSN=&&DATAOUT,
//*        DCB=(RECFM=VBS,LRECL=6236,BLKSIZE=6240),
//*        SPACE=(CYL,(200,50))
//FT21F001 DD DISP=SHR,DSN=F11LHO.AUPDAT0
//FT22F001 DD DISP=SHR,DSN=F11LHO.KALWRK0
//*
//*        INPUT FILE OF EVENTS
//*
//FT02F001 DD DISP=SHR,DSN=F11PST.MSSJAD.MY408450
//*T02F001 DD DISP=SHR,DSN=F11LHO.˘(S2).REFORM.˘(S1)V00
//*
//*        USER CONTROL FILE
//*
//FT05F001 DD *
STARTRUN 00000000 00000000
NOTRUNS  00000 00000 00000 00000 00000 00000 00000 00000 00000 00000
/*
//*POOLING EXEC PGM=IEBGENER,REGION=220K
//*YSPRINT DD SYSOUT=*
//*YSIN DD DUMMY
//*YSUT1 DD UNIT=DISK,DISP=(OLD,DELETE),DSN=&&DATAOUT
//*
//*        FINAL OUTPUT FILE
//*
//*YSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//*      DCB=(RECFM=VBS,LRECL=6236,BLKSIZE=24948),
//*      DSN=JADEPR.ST˘(SUBSTR(S1,3,3))
$   28/05/84 508061722: MEMBER NAME  JBREFORM (BIBLS)       NEWLIB
//F11JEO   JOB '10622622',REFORM,CLASS=K,MSGLEVEL=1,TIME=(4,00)
//*MAIN RELPRI=HIG
//*
//*
//* ======================================================
//*
//* JADE REFORMAT JOB
//* -----------------
//*
//* JCL CREATED BY JADEPR AT 1644 ON 19/09/82
//*
//* YEN TAPE = F22YEN.JADE.EXDATA07.G0072V00
//*
//* REFORM TAPE = F11LHO.JDATA08.REFORM.G0072V00
//*
//* RUTHERFORD TAPE = 939481
//*
//* ======================================================
//*
//*
//JOBLIB DD DSN=JADEPR.JADELD,DISP=SHR
// EXEC NEWFAST
//*
//* ===============
//*  REFORMAT STEP
//* ===============
//*
//REFORM EXEC PGM=REFRMLD,REGION=520K
//FT06F001 DD SYSOUT=*
//*FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F22YEN.JADE.EXDATA07.G0072V00
//FT02F001 DD DISP=SHR,DSN=F11BAR.YEN85
//FT03F001 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),VOL=(,RETAIN),
//    DCB=(RECFM=VBS,LRECL=6236,BLKSIZE=24948),
//    DSN=F11OLS.REFORMOF.YEN85
//FT04F001 DD UNIT=FAST,DISP=MOD,DSN=F22WAT.LGBAD0
//FT08F001 DD UNIT=FAST,DISP=MOD,DSN=F11LHO.DSKTI001
//FT09F001 DD DUMMY
//*FT09F001 DD UNIT=FAST,DISP=OLD,DSN=F11LHO.FASTSEL
//FT05F001 DD *
$   28/05/84 508061722: MEMBER NAME  JBREFOVR (BIBLS)       NEWLIB
//F11LHO27 JOB '10622622',PRODUC,CLASS=A,MSGLEVEL=(1,1),TIME=5
//*MAIN RELPRI=LOW,LINES=(4)
//JOBLIB DD DSN=JADEPR.JADELD,DISP=SHR
// EXEC NEWFAST
//*
//*    REFORMAT EVENTS
//*
//REFORM EXEC PGM=REFOVRF,REGION=600K
//*
//GO.FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F22YEN.JADE.EXDATA01.G0209V00
//    DD UNIT=AFF=FT02F001,DISP=OLD,DSN=F22YEN.JADE.EXDATA01.G0210V00
//    DD UNIT=AFF=FT02F001,DISP=OLD,DSN=F22YEN.JADE.EXDATA01.G0211V00
//    DD UNIT=AFF=FT02F001,DISP=OLD,DSN=F22YEN.JADE.EXDATA01.G0212V00
//GO.FT03F001 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//   DCB=(R01DCB.VBS,LRECL=6236,BLKSIZE=24948),
//   DSN=F11LHO.OVFIX27
//*
//GO.FT04F001 DD DUMMY
//GO.FT08F001 DD DUMMY
//GO.FT09F001 DD DUMMY
//*
//GO.FT06F001 DD SYSOUT=*
//GO.FT05F001 DD *
RNGE            3169      3184
//*
$   28/05/84 508061722: MEMBER NAME  JBREFPUL (BIBLS)       NEWLIB
//JADERFPU JOB '10622622',STEFFEN,CLASS=K,MSGLEVEL=(1,1),TIME=(6,00)
//*MAIN RELPRI=MED
//JOBLIB DD DSN=JADEPR.JADELD,DISP=SHR
//*
//*    REFORMAT EVENTS
//*
//REFORM EXEC PGM=REFRMLD,REGION=600K
//*
//GO.FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=F11BET.TZEROU.R7963
//*
//*O.FT04F001 DD DSN=F22WAT.LGBAD0,DISP=MOD,UNIT=FAST
//*O.FT08F001 DD DSN=F11LHO.DSKTI001,DISP=MOD,UNIT=FAST
//GO.FT04F001 DD DUMMY
//GO.FT08F001 DD DUMMY
//GO.FT09F001 DD DUMMY
//*
//GO.FT03F001 DD UNIT=DISK,DISP=(,PASS),
//   DCB=(R01DCB.VBS,LRECL=6236),
//       SPACE=(CYL,(200,50)),DSN=&&SCRTCH
//*
//GO.FT06F001 DD SYSOUT=*
//GO.FT05F001 DD *
//*
//*  COPY DISK OUTPUT TO TAPE
//*
//COPY EXEC PGM=IEBGENER
//SYSUT1 DD UNIT=DISK,DISP=(OLD,DELETE),DSN=&&SCRTCH
//SYSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//          DCB=(R01DCB.VBS,LRECL=6236,BLKSIZE=24948),
//          DSN=F11BET.TZEROR.R7963
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
$   28/05/84 508061722: MEMBER NAME  JBREPAT  (BIBLS)       NEWLIB
//JADEPRR8 JOB 10622622,CLASS=L,MSGLEVEL=(1,1),TIME=10
//*MAIN RELPRI=MED,ORG=EXT
// EXEC NEWLIB,PS='JADEPR.JADESR',
// OPT=2,FORT=XL
//MACRO DD DSN=F11GOD.PATRECSR,DISP=SHR,UNIT=FAST
./ C USREPAT
./ I 5200
********************************************************************

   SEE MEMBER JBREPTIL AND USREPTIL   AS WELL AS #START

********************************************************************
// EXEC FLG,PARM.LKED='MAP,LIST',REGION=750K
//LKED.SYSLIB DD
//            DD
//            DD DISP=SHR,UNIT=,DSN=&&LOAD
//            DD DISP=SHR,UNIT=FAST,DSN=F11LHO.JADEGL
//            DD DISP=SHR,UNIT=FAST,DSN=F11GOD.PATRECLD
//            DD DISP=SHR,UNIT=FAST,DSN=JADELG.LOAD
//            DD DISP=SHR,UNIT=FAST,DSN=F22ALL.JADEMUL
//            DD DISP=SHR,UNIT=FAST,DSN=F1EBLO.BOSLIB.L
//            DD DISP=SHR,UNIT=FAST,DSN=R01UTL.CERNLIB
//LKED.SYSIN DD *
 INCLUDE SYSLIB(JDMAIN0,USREPAT)
//GO.FT10F001 DD UNIT=FAST,DISP=SHR,DSN=F11LHO.ASTART0
//GO.FT11F001 DD UNIT=FAST,DISP=SHR,DSN=F11LHO.ASTART1
//GO.FT21F001 DD UNIT=FAST,DISP=SHR,DSN=F11LHO.AUPDAT0
//GO.FT22F001 DD UNIT=FAST,DISP=SHR,DSN=F11LHO.AUPDAT1
//*           INPUT
//*O.FT02F001 DD UNIT=FAST,DISP=SHR,DSN=F11OLS.PATRPROB
//GO.FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=JADEPR.RECLI142
//*   DD UNIT=AFF=FT02F001,DISP=OLD,DSN=JADEPR.ST141A
//*   DD UNIT=AFF=FT02F001,DISP=OLD,DSN=JADEPR.ST118B
//GO.FT03F001 DD UNIT=DISK,DISP=(,PASS),
//   DCB=(R01DCB.VBS,LRECL=6236),
//       SPACE=(CYL,(200,50)),DSN=&&SCRTCH
//*
//*  COPY DISK OUTPUT TO TAPE
//*
//COPY EXEC PGM=IEBGENER
//SYSUT1 DD UNIT=DISK,DISP=(OLD,DELETE),DSN=&&SCRTCH
//SYSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//          DCB=(R01DCB.VBS,LRECL=6236,BLKSIZE=24948),
//          DSN=JADEPR.RECLA142
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
$   28/05/84 508061722: MEMBER NAME  JBREPTIL (BIBLS)       NEWLIB
//JADEPRR8 JOB 10622622,CLASS=D,MSGLEVEL=(1,1),TIME=(13,00)
//*MAIN RELPRI=MED
// EXEC NEWLIB,PS='JADEPR.JADESR',
// OPT=2,FORT=XL
//MACRO DD DSN=F11GOD.PATRECSR,DISP=SHR,UNIT=FAST
./ COMPILE USREPTIL
// EXEC FLG,PARM.LKED='MAP,LIST',REGION=750K
//LKED.SYSLIB DD
//            DD
//            DD DISP=SHR,UNIT=,DSN=&&LOAD
//            DD DISP=SHR,UNIT=FAST,DSN=F11LHO.JADEGL
//            DD DISP=SHR,UNIT=FAST,DSN=F11GOD.PATRECLD
//            DD DISP=SHR,UNIT=FAST,DSN=JADELG.LOAD
//            DD DISP=SHR,UNIT=FAST,DSN=F22ALL.JADEMUL
//            DD DISP=SHR,UNIT=FAST,DSN=F1EBLO.BOSLIB.L
//            DD DISP=SHR,UNIT=FAST,DSN=R01UTL.CERNLIB
//LKED.SYSIN DD *
 INCLUDE SYSLIB(JDMAIN0,USREPTIL)
//GO.FT10F001 DD UNIT=FAST,DISP=SHR,DSN=F11LHO.ASTART0
//GO.FT11F001 DD UNIT=FAST,DISP=SHR,DSN=F11LHO.ASTART1
//GO.FT21F001 DD UNIT=FAST,DISP=SHR,DSN=F11LHO.AUPDAT0
//GO.FT22F001 DD UNIT=FAST,DISP=SHR,DSN=F11LHO.AUPDAT1
//*           INPUT
//*O.FT02F001 DD UNIT=FAST,DISP=SHR,DSN=F11OLS.PATRPRB1
//GO.FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=JADEPR.RECLI141
//*   DD UNIT=AFF=FT02F001,DISP=OLD,DSN=JADEPR.ST141A
//*   DD UNIT=AFF=FT02F001,DISP=OLD,DSN=JADEPR.ST118B
//GO.FT03F001 DD UNIT=DISK,DISP=(,PASS),
//    DCB=(R01DCB.VBS,LRECL=6236),
//        SPACE=(CYL,(200,50)),DSN=&&SCRTCH
//*O.FT03F001 DD DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*   DSN=F11OLS.PATRPRB2,
//*        MSVGP=VTMP,UNIT=3330V
//*GO.FT03F001 DD DUMMY,DCB=R01DCB.VBS
//*
//*  COPY DISK OUTPUT TO TAPE
//*
//COPY EXEC PGM=IEBGENER
//SYSUT1 DD UNIT=DISK,DISP=(OLD,DELETE),DSN=&&SCRTCH
//SYSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//          DCB=(R01DCB.VBS,LRECL=6236,BLKSIZE=24948),
//          DSN=JADEPR.RECLA141
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
$   28/05/84 508061722: MEMBER NAME  JBR1ANA  (BIBLS)       NEWLIB
//F11PST   JOB CLASS=E,MSGLEVEL=(0,0),TIME=(0,25)
//*MAIN LINES=(3),ORG=EXT,RELPRI=HIG
//*
// EXEC FCLG,PARM.LKED='LIST',REGION.GO=850K
#include "usr1ana.for"
//LKED.SYSLIB DD
//            DD
//            DD DSN=JADEPR.JADELD,DISP=SHR
//            DD DSN=F11LHO.JADEGL,UNIT=FAST,DISP=SHR
//            DD DSN=F11GOD.PATRECLD,UNIT=FAST,DISP=SHR
//            DD DSN=JADELG.LOAD,UNIT=FAST,DISP=SHR
//            DD DSN=F22ALL.JADEMUL,UNIT=FAST,DISP=SHR
//            DD DSN=F1EBLO.BOSLIB.L,UNIT=FAST,DISP=SHR
//            DD DISP=SHR,UNIT=FAST,DSN=R01UTL.HBOOK321.L
//            DD DSN=R02BUT.CERNLIB,UNIT=FAST,DISP=SHR
//LKED.SYSIN DD *
 INCLUDE SYSLIB(JDMAIN0)
//*
//GO.FT21F001 DD UNIT=FAST,DSN=F11LHO.AUPDAT0,DISP=SHR
//GO.FT22F001 DD UNIT=FAST,DSN=F11LHO.AUPDAT1,DISP=SHR
//*
//GO.FT02F001 DD DISP=SHR,
//    DSN=JADEPR.RED1OU2
//*
//GO.FT03F001 DD DUMMY
//*O.FT03F001 DD DISP=OLD,
//*         DSN=JADEPR.RED1.T1ACC
$   28/05/84 508061722: MEMBER NAME  JBSORDER (BIBLS)       NEWLIB
//F11JADSO JOB 10622622,'REORDER',TIME=(0,30),CLASS=A
// EXEC NEWFAST
// EXEC FCLG,LIB1='F11LHO.JADEGL'
//FORT.SYSIN DD *
      CALL SELCOP
      CALL SORDER
      STOP
      END
      SUBROUTINE SELCOP
      IMPLICIT INTEGER*2 (H)
C---
C---     SIMPLE COPY.
C---                                   L.H. O'NEILL 10.09.79
C---
      DIMENSION JBUF(10000),IDAT(9991),HBUF(20000),ITIME(6),NAME( 7)
      EQUIVALENCE(JBUF(1),HBUF(1))
      EQUIVALENCE(JBUF(10),IDAT(1))
C---
      NREC=0
    1 CONTINUE
      CALL EVREA1(4,NWORD,JBUF,IRET)
      IF(IRET.EQ.1) GO TO 1000
      IF(IRET.EQ.2) GO TO 2000
         IF(HBUF(18).LT.5342) WRITE(6,269) HBUF(18),HBUF(19)
         IF(HBUF(18).LT.5342) GO TO 1
         IF(HBUF(18).GT.9999) WRITE(6,269) HBUF(18),HBUF(19)
         IF(HBUF(18).GT.9999) GO TO 1
  269    FORMAT(1X,' ELIMINATE',2I6,'. RUN NUMBER CUT.')
      NREC=NREC+1
C     IOUT=NWORD
C     IF(IOUT.GT.10) IOUT=10
C     WRITE(6,100) NREC,NWORD,(JBUF(I),I=1,IOUT)
  100 FORMAT(1X,I4,I12,10I10)
      CALL KALBNK(2,NWORD,JBUF)
      GO TO 1
 1000 CONTINUE
      WRITE(6,101) NREC
  101 FORMAT(' *** READ ERROR ENCOUNTERED AFTER ',I4,' RECORDS.')
      RETURN
 2000 CONTINUE
      WRITE(6,102) NREC
  102 FORMAT('0NORMAL END OF FILE AFTER',I4,' RECORDS.')
      REWIND 2
      RETURN
      END
      SUBROUTINE SORDER
      IMPLICIT INTEGER*2 (H)
C---
C---     PUTS NORD 50 SELECTED EVENTS INTO ORDER OF INCREASING TIME.
C---                                   L.H. O'NEILL 25.02.80
C---
      DIMENSION JBUF(10000),IDAT(9996),HBUF(20000),HDAT(19992)
      DIMENSION LIST(2,10000),ITIME(6)
      EQUIVALENCE(JBUF(1),HBUF(1))
      EQUIVALENCE(JBUF(5),IDAT(1))
      EQUIVALENCE(IDAT(1),HDAT(1))
C---
      NREC=0
      NORG=0
    1 CONTINUE
      CALL EVREA1(2,NWORD,JBUF,IRET)
      IF(IRET.EQ.1) GO TO 1000
      IF(IRET.EQ.2) GO TO 2000
      NORG=NORG+1
         WRITE(6,737) NORG,HDAT(10),HDAT(11)
  737    FORMAT(1X,' SEQ. NUM. RUN, EVENT = ',I3,2I6)
      IF(HDAT(10).LT.2570) GO TO 1
      NREC=NREC+1
      IF(NREC.GT.10000) WRITE(6,201)
  201 FORMAT(' **** ERROR. MORE THEN 10000 RECORDS. PROGRAMMED STOP.')
      IF(NREC.GT.10000) STOP
      LIST(1,NREC)=NREC
      ITIME(1)=HDAT(3)
      ITIME(2)=HDAT(4)
      ITIME(3)=HDAT(5)
      ITIME(4)=HDAT(6)
      ITIME(5)=HDAT(7)
      ITIME(6)=HDAT(8)
      LASTIM=0
      NDUMMY=KTMCON(ITIME,KTWRIT,LASTIM)
      LIST(2,NREC)=NDUMMY
      CALL KALBNK(3,NWORD,JBUF)
      GO TO 1
 1000 CONTINUE
      WRITE(6,101) NREC
  101 FORMAT(' *** READ ERROR ENCOUNTERED AFTER ',I4,' RECORDS.')
      RETURN
 2000 CONTINUE
      WRITE(6,102) NREC
  102 FORMAT('0NORMAL END OF FILE AFTER',I4,' RECORDS.')
C---
C---     FIND TIME ORDER OF RECORDS.
C---
C        WRITE(6,1991) ((LIST(KLM,LHO),KLM=1,2),LHO=1,NREC)
 1991    FORMAT(1X,2I10)
      DO 2 I=1,NREC
      LOWEST=2000000001
      DO 3 J=I,NREC
      IF(LIST(2,J).GE.LOWEST) GO TO 3
      K=J
      LOWEST=LIST(2,J)
    3 CONTINUE
      IADDR=LIST(1,I)
      IVALU=LIST(2,I)
      LIST(1,I)=LIST(1,K)
      LIST(2,I)=LOWEST
      LIST(1,K)=IADDR
      LIST(2,K)=IVALU
C        WRITE(6,1998)
 1998    FORMAT(' ')
C        WRITE(6,1991) ((LIST(KLM,LHO),KLM=1,2),LHO=1,NREC)
    2 CONTINUE
C---
C---     NOW OVERWRITE FILE ON UNIT 2 WITH TIME ORDERED RECORDS.
C---
      REWIND 2
      REWIND 3
C---
      NCURNT=0
      LASTIW=0
      NOUT=0
      DO 10 I=1,NREC
C         WRITE(6,1995) I,NCURNT,LIST(1,I),LIST(2,I)
 1995     FORMAT(' I,NCURNT,LIST(1,I),LIST(2,I)= ',4I10)
      NWISH=LIST(1,I)
      IF(NWISH.GT.NCURNT) GO TO 4
      REWIND 3
      DO 5 J=1,NWISH
      CALL EVREA1(3,NWORD,JBUF,IRET)
      IF(IRET.EQ.0) GO TO 5
      WRITE(6,202) IRET
  202 FORMAT(' *** ILLEGAL IRET = ',I2,' IN 5 LOOP. STOP.')
      STOP
    5 CONTINUE
      GO TO 6
    4 CONTINUE
      LOOP=NWISH-NCURNT
      DO 7 J=1,LOOP
      CALL EVREA1(3,NWORD,JBUF,IRET)
      IF(IRET.EQ.0) GO TO 7
      WRITE(6,203) IRET
  203 FORMAT(' *** ILLEGAL IRET = ',I2,' IN 7 LOOP. STOP.')
      STOP
    7 CONTINUE
    6 CONTINUE
      NCURNT=NWISH
      ITIME(1)=HDAT(3)
      ITIME(2)=HDAT(4)
      ITIME(3)=HDAT(5)
      ITIME(4)=HDAT(6)
      ITIME(5)=HDAT(7)
      ITIME(6)=HDAT(8)
      LASTIM=0
      NDUMMY=KTMCON(ITIME,KTWRIT,LASTIM)
      IF(NDUMMY.EQ.LIST(2,I)) GO TO 8
      WRITE(6,204) I,NDUMMY,LIST(1,I),LIST(2,I)
  204 FORMAT(' NDUMMY AND LIST(2,I) DISAGREE. DUMP = ',4I10)
      WRITE(6,303)
  303 FORMAT(' *** PROGRAMMED STOP *** ')
      STOP
    8 CONTINUE
      IF(NDUMMY.GE.LASTIW) GO TO 9
      WRITE(6,205) I,NDUMMY,LASTIW,LIST(1,I),LIST(2,I)
  205 FORMAT(' DECREASING TIME. DUMP = ',5I10)
      WRITE(6,304)
  304 FORMAT(' *** PROGRAMMED STOP *** ')
      STOP
    9 CONTINUE
      IF(LASTIW.LT.NDUMMY) NOUT=NOUT+1
      IF(LASTIW.LT.NDUMMY) CALL KALBNK(2,NWORD,JBUF)
      IF(LASTIW.LT.NDUMMY)   WRITE(6,737) NOUT,HDAT(10),HDAT(11)
      IF(LASTIW.EQ.NDUMMY)   WRITE(6,738) HDAT(10),HDAT(11)
  738 FORMAT(1H0,' *** DUPLICATE',2I6,' ELIMINATED. ***',//)
      LASTIW=NDUMMY
   10 CONTINUE
      RETURN
      END
//GO.FT04F001 DD UNIT=FAST,DISP=SHR,DSN=F11LHO.FASTSEL
//GO.FT02F001 DD UNIT=FAST,DISP=SHR,DSN=F11LHO.FASTSEL7
//GO.FT03F001 DD UNIT=DISK,DISP=(,PASS),DCB=R01DCB.VBS,
//  SPACE=(TRK,(180,10)),DSN=&&SEORD
$   28/05/84 508061722: MEMBER NAME  JBWRIT   (BIBLS)       NEWLIB
//JADEPR   JOB CLASS=L,MSGLEVEL=(0,0),TIME=(3,00)
//*MAIN RELPRI=HIG
//*EXEC NEWFAST
// EXEC NEWLIB,PS='F11OLS.JADESR',PL='F11OLS.JADELD',
//  UNIT=FAST,LEVEL=8,OPT=3,FORT=XL
//MACRO DD DSN=F11GOD.PATRECSR,DISP=SHR,UNIT=FAST
./ C USER0
./ I 10200
C END OF JOB, AFTER PRINT OF IGGS,JIGGS AND BEFORE PLOTS
./ I 7800
C LEVEL 7
./ I 7400
C LEVEL 6
./ I 6800
C LEVEL 5
./ I 6200
C LEVEL 4
./ I 5600
C LEVEL 3
./ I 5000
C LEVEL 2
C     IF(HEAD(18).LT.4337) GO TO 1
C     IF(HEAD(18).GT.4337) GO TO 12
C     IF(HEAD(18).LT.11417) GO TO 1
C     IF(HEAD(18).GT.11416) GO TO 12
      GO TO 11
./ I 4400
C LEVEL 1
C     WRITE(JUSCRN,201) JIGG(2),HEAD(18),HEAD(19),HEAD(37),HEAD(34)
201   FORMAT(' RECORD NUMBER ',I4,'  RUN AND EVENT ',2I10,'  EBEAM ',I7,
     $'  N50 LABEL ',Z4)
./ I 1300
C DECLARATIVE LEVEL
      DATA IEVCNT/0/
// EXEC FLG,REGION.GO=800K
//LKED.SYSLIB DD
//            DD
//            DD DISP=SHR,UNIT=,DSN=&&LOAD
//            DD DISP=SHR,UNIT=FAST,DSN=F11GOD.PATRECLD
//            DD DISP=SHR,UNIT=FAST,DSN=F11LHO.JADEGL
//            DD DISP=SHR,UNIT=FAST,DSN=JADELG.LOAD
//            DD DISP=SHR,UNIT=FAST,DSN=F22ALL.JADEMUL
//            DD DISP=SHR,UNIT=FAST,DSN=R01UTL.HBOOK321.L
//            DD DISP=SHR,UNIT=FAST,DSN=R02BUT.CERNLIB
//            DD DISP=SHR,UNIT=FAST,DSN=F1EBLO.BOSLIB.L
//LKED.SYSIN DD *
 INCLUDE SYSLIB(JDMAIN0)
 INCLUDE SYSLIB(USER0,EXJDUM)
//GO.FT21F001 DD UNIT=FAST,DISP=SHR,DSN=F11LHO.AUPDAT0
//GO.FT22F001 DD UNIT=FAST,DISP=SHR,DSN=F11LHO.AUPDAT1
//*                        INPUT:
//GO.FT02F001 DD UNIT=TAPE,DISP=OLD,DSN=JADEPR.R1492A
//   DD DISP=SHR,DSN=JADEPR.R11908
//   DD UNIT=AFF=FT02F001,DISP=OLD,DSN=JADEPR.R1492B
//*GO.FT02F001 DISP=SHR,DSN=F11OLS.W12GEV.TR2GAM1
//*                        OUTPUT:
//GO.FT03F001 DD UNIT=DISK,DISP=(,PASS),
//   DCB=(R01DCB.VBS,LRECL=6236),
//       SPACE=(CYL,(220,20)),DSN=&&SCRTCH
//*GO.FT03F001 DD DUMMY,DCB=R01DCB.VBS
//*GO.FT03F001 DD UNIT=FAST,DISP=SHR,DSN=F11OLS.RAETEST
//*GO.FT03F001 DD UNIT=FAST,DISP=(NEW,CATLG,DELETE),DCB=R01DCB.VBS,
//*   SPACE=(TRK,(3,1),RLSE),DSN=F11OLS.TR23GAM.RESO7
//*GO.FT03F001 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//*    DCB=(R01DCB.VBS,LRECL=6236,BLKSIZE=24948),
//*   DSN=F11OLS.REDUCTWO.G0222V00
//*
//*  COPY DISK OUTPUT TO TAPE
//*
//COPY EXEC PGM=IEBGENER
//SYSUT1 DD UNIT=DISK,DISP=(OLD,DELETE),DSN=&&SCRTCH
//SYSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//          DCB=(R01DCB.VBS,LRECL=6236,BLKSIZE=24948),
//           DSN=JADEPR.REDUCONE.G0492V00
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
$   13/12/82 602191238  MEMBER NAME  REDUCHH  (JADESR)      CLIST
$
$---------------------------------------------------
$
$ REDUC1 - A CLIST TO PERFORM ALL DESY REDUC1 TASKS
$ ======                          ====
$
$ TASKS PERFORMED ARE :
$
$      (1) .. MAKE AN ARCHIVE COPY OF A REDUC1 MERGE TAPE'
$      (2) .. COPY REDUC1 DATA FROM A RUTHERFORD TAPE TO A DESY TAPE
$      (3) .. LIST THE RUN CONTENTS OF A REDUC1 MERGE TAPE'
$      (4) .. SUBMIT A REDUC1 MERGE JOB'
$      (5) .. RE-LINK THE REDUC1 LOAD MODULE'
$      (6) .. SUBMIT A REDUC1 JOB'
$      (7) .. COPY A DESY REFORM TAPE ONTO A RUTHERFORD TAPE'
$      (8) .. LIST FILE CONTENTS OF A RUTHERFORD TAPE'
$
$ TO INVOKE TYPE (REDUC1) AND ANSWER THE QUESTIONS
$
$ THE JCL IS WRITTEN INTO THE DUMMY MEMBER ####JUNK
$ AND MAY THEN BE SUBMITTED OR EDITED
$---------------------------------------------------
$
FULL OFF
V OFF OFF
SET ESCAPE='˘'
$
$----------------------------------
$ CREATE/CLEAR DUMMY MEMBER FOR JCL
$----------------------------------
$
SC ####JUNK
IF DIR('####JUNK') = 'T'  GOTO SKIP1
./ ADD ####JUNK
./ LABEL NOMACRO
LABEL SKIP1
C ####JUNK
D 0 900000
$
$-------------------------------
$ BRANCH TO REQUIRED REDUC1 TASK
$-------------------------------
$
IF N0^=0 GOTO NOTASK
CLEAR
SHOW '      REDUC1 TASKS AVAILABLE FOR EXECUTION AT DESY'
SHOW '      ============================================'
SHOW ' '
SHOW ' ARCHIVE  (A) .. MAKE AN ARCHIVED COPY OF A REDUC1 MERGE TAPE'
SHOW ' COPYRUT  (C) .. COPY A RUTH WRITTEN REDUC1 TAPE ONTO A DESY TAPE'
SHOW ' LISTRUNS (L) .. LIST THE RUN CONTENTS OF A REDUC1 MERGE TAPE'
SHOW ' MERGE    (M) .. SUBMIT A REDUC1 MERGE JOB'
SHOW ' NEWLOAD  (N) .. RE-LINK THE REDUC1 LOAD MODULE'
SHOW ' REDUCE   (R) .. SUBMIT A REDUC1 JOB'
SHOW ' WRITERUT (W) .. COPY A DESY REFORM TAPE ONTO A RUTHERFORD TAPE'
SHOW ' XTAPE    (X) .. LIST FILE CONTENTS OF A RUTHERFORD TAPE'
SHOW ' '
SHOW ' TO OPERATE REDUC1 AT RUTHERFORD USE (RUTHJOBS)'
SHOW ' REDUC1 LOAD MODULE RELINKED 19/2/86  L.BECKER'
SHOW ' '
READ INTO S0 PROMPT ' ENTER TASK REQUIRED :'
IF S0=' ' GOTO STOP
IF LENGTH(S0)=0 GOTO STOP
LABEL NOTASK
IF SUBSTR(S0,1,1)='R' GOTO RED1JOB
IF SUBSTR(S0,1,1)='M' GOTO MERGEJOB
IF SUBSTR(S0,1,1)='A' GOTO ARCHIVE
IF SUBSTR(S0,1,1)='L' GOTO LISTRUNS
IF SUBSTR(S0,1,1)='W' GOTO WRITERUT
IF SUBSTR(S0,1,1)='C' GOTO COPYRUT
IF SUBSTR(S0,1,1)='N' GOTO NEWLOAD
IF SUBSTR(S0,1,1)='X' GOTO XTAPE
SHOW ' '
SHOW ' TASK ˘(S0) NOT RECOGNISED .. CLIST TERMINATING'
GOTO STOP
$
$----------------------------------------------------------------------
$              ARCHIVE A REDUC1 MERGE TAPE
$----------------------------------------------------------------------
$
LABEL ARCHIVE
CLEAR
SHOW '      CREATE AN ARCHIVED COPY OF A REDUC1 MERGE TAPE'
SHOW '      =============================================='
SHOW ' '
$
$-------------------------
$ REDUC1 GENERATION NUMBER
$-------------------------
$
SHOW ' '
SHOW '--- ENTER THE REDUC1 GENERATION NUMBER TO BE ARCHIVED (EG G0402)'
READ INTO S1 PROMPT '-->'
IF LENGTH(S1)=0 GOTO NODEFLT
IF LENGTH(S1)=3 SET S1='G0'||S1
$
$--------------
$ CONSTRUCT JCL
$--------------
$
SET S40='JADEA'||SUBSTR(S1,3,3)
./ INSERT 1 1
//˘(S40) JOB 10622622,REDUCONE,CLASS=A,MSGLEVEL=(1,0),TIME=(1,00)
//*MAIN RELPRI=LOW,LINES=(2),ORG=EXT
//ARCHIVE EXEC PGM=IEBGENER,REGION=165K
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//*
//*-----------------------------------------------------------
//*
//* JOB TO MAKE A BACKUP-ARCHIVE COPY OF A REDUC1 TAPE AT DESY
//*
//* SYSUT1 = INPUT REDUC1 TAPE TO BE COPIED
//*        = JADEPR.REDUCONE.˘(S1)V00
//*
//* SYSUT2 = OUTPUT ARCHIVE COPY TAPE
//*        = JADEPR.ARCHIVE.REDUC˘(SUBSTR(S1,3,3))
//*
//*-----------------------------------------------------------
//*
//SYSUT1 DD UNIT=TAPE,DISP=SHR,
//       DSN=JADEPR.REDUCONE.˘(S1)V00
//SYSUT2 DD UNIT=ARCHIV,DISP=(NEW,CATLG,DELETE),
//      DSN=JADEPR.ARCHIVE.REDUC˘(SUBSTR(S1,3,3))
//
./ LABEL NOMACRO
GOTO SUBMIT
$
$----------------------------------------------------------------------
$    COPY A RUTHERFORD WRITTEN MERGE TAPE TO A DESY M/ROOM TAPE
$----------------------------------------------------------------------
$
LABEL COPYRUT
CLEAR
SHOW '    COPY A RUTHERFORD WRITTEN MERGE TAPE TO A DESY M/ROOM TAPE'
SHOW '    =========================================================='
SHOW ' '
$
$-------------------------
$ REDUC1 GENERATION NUMBER
$-------------------------
$
SHOW ' '
SHOW '--- ENTER THE REDUC1 GENERATION NUMBER TO BE COPIED (EG G0470)'
READ INTO S1 PROMPT '-->'
IF LENGTH(S1)=0 GOTO NODEFLT
IF LENGTH(S1)=3 SET S1='G0'||S1
$
$---------------------------------
$ RUTHERFORD TAPE SERIAL NUMBER(S)
$---------------------------------
$
SHOW ' '
SHOW '--- ENTER THE RUTHERFORD TAPE SERIAL NUMBER(S) (EG 939454,...)'
READ INTO S2 PROMPT '-->'
IF S2=' ' GOTO NODEFLT
IF LENGTH(S2)=0 GOTO NODEFLT
$
$--------------------------------------
$ RUTHERFORD TAPE LABEL SEQUENCE NUMBER
$--------------------------------------
$
SHOW ' '
SHOW '--- ENTER THE TAPE VOLUME LABEL NUMBER (DEFAULT = 1)'
READ INTO S3 PROMPT '-->'
IF S3=' ' SET S3='1'
IF LENGTH(S3)=0 SET S3='1'
$
$-----------
$ TIME LIMIT
$-----------
$
SET S11='(1,00)'
SET S12='A'
IF LENGTH(S2)<9 GOTO CLASSA
SET S11='(2,00)'
SET S12='K'
LABEL CLASSA
$
$--------------
$ CONSTRUCT JCL
$--------------
$
SET S40='JADEC'||SUBSTR(S1,3,3)
./ INSERT 1 1
//˘(S40) JOB 10622622,REDUCONE,CLASS=˘(S12),MSGLEVEL=(1,0),TIME=˘(S11)
//*MAIN RELPRI=MED,LINES=(2),ORG=EXT
//*
//*---------------------------------------------------------------------
//*
//* JOB TO COPY REDUC1 MERGE DATA FROM A RUTHERFORD TAPE TO A DESY TAPE
//*
//* SYSUT1 = (INPUT) RUTHERFORD TAPE CONTAINING REDUC1 MERGE DATA
//*        = JADEPR.REDUC1.˘(S1)    TAPE=˘(S2)    LABEL=˘(S3)
//*
//* SYSUT2 = (OUTPUT) DESY MACHINE ROOM TAPE
//*        = JADEPR.REDUCONE.˘(S1)V00
//*
//*---------------------------------------------------------------------
//*
//* STEP 1 - THE COPY
//* =================
//*
//RUTHCOPY EXEC PGM=IEBGENER,REGION=165K
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD UNIT=TAPE,DISP=(OLD,KEEP),
//       DSN=JADEPR.REDUC1.˘(S1),
//       VOL=SER=(˘(S2)),
//       LABEL=(˘(S3),SL,,IN)
//SYSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//      DSN=JADEPR.REDUCONE.˘(S1)V00
//*
//* STEP 2 - THE EVENT CHECK
//* ========================
//*
//LISTRUNS EXEC PGM=LISTRUNS,REGION=300K
//STEPLIB DD DSN=F11PEA.GENERAL.LOAD,DISP=SHR
//FT06F001 DD SYSOUT=*
//FT02F001 DD DISP=SHR,DSN=JADEPR.REDUCONE.˘(S1)V00
//
./ LABEL NOMACRO
GOTO SUBMIT
$
$----------------------------------------------------------------------
$              LIST RUN CONTENTS OF A REDUC1 MERGE TAPE
$----------------------------------------------------------------------
$
LABEL LISTRUNS
CLEAR
SHOW '        LIST RUN CONTENTS OF A REDUC1 MERGE TAPE'
SHOW '        ========================================'
SHOW ' '
$
$-------------------------
$ REDUC1 GENERATION NUMBER
$-------------------------
$
SHOW ' '
SHOW '--- ENTER THE REDUC1 GENERATION NUMBER TO BE LISTED (EG ST402)'
READ INTO S1 PROMPT '-->'
IF LENGTH(S1)=0 GOTO NODEFLT
IF LENGTH(S1)=3 SET S1='ST'||S1
$
$--------------
$ CONSTRUCT JCL
$--------------
$
SET S40='JADEL'||SUBSTR(S1,3,3)
./ INSERT 1 1
//˘(S40) JOB 10622622,REDUCONE,CLASS=A,MSGLEVEL=(1,0),TIME=(1,00)
//*MAIN RELPRI=LOW,LINES=(2),ORG=EXT
//JOBLIB DD DSN=F11PEA.GENERAL.LOAD,DISP=SHR
//LISTRUNS EXEC PGM=LISTRUNS,REGION=300K
//FT06F001 DD SYSOUT=*
//*
//*----------------------------------------------------------------
//*
//* JOB TO PRODUCE RUN/EVENT LISTING OF REDUC1 (OR ANY OTHER) TAPE
//* USED TO CHECK THAT CORRECT RUNS ETC ARE PRESENT ON TAPE
//*
//*----------------------------------------------------------------
//*
//FT02F001 DD DISP=SHR,DSN=JADEPR.HHMERGE.˘(S1)
//
./ LABEL NOMACRO
GOTO SUBMIT
$
$----------------------------------------------------------------------
$                   SUBMIT A REDUC1 MERGE JOB
$----------------------------------------------------------------------
$
LABEL MERGEJOB
CLEAR
SHOW '        SUBMIT A REDUC1 MERGE JOB'
SHOW '        ========================='
SHOW ' '
$
$-------------------------
$ REDUC1 GENERATION NUMBER
$-------------------------
$
SHOW ' '
SHOW '--- ENTER THE REDUC1 GENERATION NUMBER TO BE USED (EG G0066)'
READ INTO S1 PROMPT '-->'
IF LENGTH(S1)=0 GOTO NODEFLT
IF LENGTH(S1)=3 SET S1='ST'||S1
$
$-------------------
$ TAPES TO BE MERGED
$-------------------
$
SHOW ' '
SHOW '--- ENTER A LIST OF THE DATA SETS TO BE MERGED USING THE FULL'
SHOW '--- DATA SET NAME WITH NO APOSTROPHES (EG ST123)'
SHOW '--- THE LIST IS TERMINATED WITH A NULL INPUT'
SHOW ' '
READ INTO S2 PROMPT '--- ENTER FIRST DATA SET NAME :'
IF LENGTH(S2)=0 GOTO NODEFLT
IF S2 = ' ' GOTO NODEFLT
$
$-----------
$ CREATE JCL
$-----------
$
SET S40='JADEM'||SUBSTR(S1,3,3)
./ INSERT 1 1
//˘(S40) JOB '10622622',REDUCONE,CLASS=K,MSGLEVEL=(1,0),TIME=(2,00)
//*MAIN RELPRI=MED,LINES=(15),CARDS=(900)
//*
//*-----------------------------------------------------------
//*
//* JCL TO RUN THE JADE REDUC1 MERGE STEP
//*
//* SYSUT1   = CONCATENATED SEQUENCE OF INPUT FILES TO BE MERGED
//* SYSUT2   = OUTPUT FILE FOR MERGED SUM
//* FT01F001 = SAME AS SYSUT2 FILE (USED AS INPUT BY MUONSTEP)
//* FT02F001 = SAME AS SYSUT2 FILE (USED AS INPUT BY LISTRUNS)
//*
//*-----------------------------------------------------------
//*
//* STEP 1 - THE MERGE
//* ==================
//*
//DESYMRGE EXEC PGM=IEBGENER,REGION=120K
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//*
//*  TAPE FOR MERGED OUTPUT
//*
//SYSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG),DSN=JADEPR.REDUC1HH.˘(S1)V00,
// VOL=(,RETAIN)
//*
//*  LIST OF INPUT TAPES TO BE MERGED
//*
//SYSUT1 DD UNIT=TAPE,DISP=SHR,DSN=JADEPR.RED1HH.˘(S2)
./ LABEL NOMACRO
$
$------------------------
$ MORE TAPES TO BE MERGED
$------------------------
$
LABEL MERGE1
READ INTO S2 PROMPT '--- ENTER NEXT  DATA SET NAME :'
IF LENGTH(S2)=0 GOTO MERGE2
IF S2 = ' ' GOTO MERGE2
./ INSERT 1000 1
// DD UNIT=AFF=SYSUT1,DISP=SHR,DSN=JADEPR.RED1HH.˘(S2)
./ LABEL NOMACRO
RENUM ####JUNK 1 1
GOTO MERGE1
LABEL MERGE2
$
$--------------------------------------
$ NOW FOR THE LISTRUN AND DI-MUON STEPS
$--------------------------------------
$
./ INSERT 1000 1
//*
//* STEP 2 - THE EVENT CHECK
//* ========================
//*
//LISTRUNS EXEC PGM=LISTRUNS,REGION=300K
//STEPLIB DD DSN=F11PEA.GENERAL.LOAD,DISP=SHR
//FT06F001 DD SYSOUT=*
//FT02F001 DD DISP=SHR,VOL=(,RETAIN),DSN=JADEPR.REDUC1HH.˘(S1)V00
//*
//* STEP 3 - THE RJB DI-MUON EXTRACTOR
//* =================================
//*
//* GETMUONS EXEC PGM=GETMUONS,REGION=550K
//* STEPLIB DD DSN=JADEPR.JADELD,DISP=SHR,UNIT=FAST
//* FT06F001 DD SYSOUT=*
//* FT08F001 DD SYSOUT=4,OUTLIM=90000
//* FT21F001 DD DISP=SHR,DSN=F11LHO.AUPDAT0,DCB=BUFNO=1
//* FT22F001 DD DISP=SHR,DSN=F11LHO.KALWRK0,DCB=BUFNO=1
//* FT01F001 DD DISP=SHR,DSN=JADEPR.HHMERGE.˘(S1)
//* FT01F001 DD DISP=SHR,DSN=JADEPR.REDUC1HH.˘(S1)V00
//
./ LABEL NOMACRO
GOTO SUBMIT
$
$----------------------------------------------------------------------
$                   RE-LINK THE REDUC1 MODULE
$----------------------------------------------------------------------
$
LABEL NEWLOAD
CLEAR
SHOW '           RE-LINK THE DESY REDUC1 MODULE'
SHOW '           =============================='
SHOW ' '
SHOW '--- ENTER THE NAME FOR THE NEW MODULE (DEFAULT = REDUC1LD) '
READ INTO S1 PROMPT '-->'
IF LENGTH(S1)=0 SET S1='REDUC1LD'
IF S1=' ' SET S1='REDUC1LD'
$
$--------------
$ CONSTRUCT JCL
$--------------
$
SET S40='JADER1LK'
./ INSERT 1 1
//˘(S40) JOB '10622622',REDUCONE,CLASS=E,TIME=(0,15)
//*MAIN RELPRI=MED,LINES=(2),ORG=EXT
//*
//*-------------------------------------------------------
//*
//* JOB TO LINK AN EXECUTABLE REDUC1 LOAD MODULE AT DESY
//* NEW MODULE NAME = JADEPR.JADELD(˘(S1))
//*
//*-------------------------------------------------------
//*
//JOBLIB DD DSN=R02BUT.FORTRANH,DISP=SHR
// EXEC FCL,FORT=XL,PARM.LKED='LIST,MAP'
//FORT.SYSIN DD *
#include "jdmain0.for"
//*
//LKED.SYSLIB DD
//            DD
//            DD DISP=SHR,UNIT=FAST,DSN=JADEPR.JADELD
//            DD DISP=SHR,UNIT=FAST,DSN=F11GOD.PATRECLD
//            DD DISP=SHR,UNIT=FAST,DSN=F11LHO.JADEGL
//            DD DISP=SHR,UNIT=FAST,DSN=JADELG.LOAD
//            DD DISP=SHR,UNIT=FAST,DSN=F22ALL.JADEMUL
//            DD DISP=SHR,UNIT=FAST,DSN=F1EBLO.BOSLIB.L
//*           DD DISP=SHR,UNIT=FAST,DSN=R01UTL.HBOOK321.L
//            DD DSN=R01UTL.CERN.GENLIB4,DISP=SHR
//            DD DSN=R01UTL.CERN.PACKLIB4,DISP=SHR
//LKED.SYSLMOD DD DISP=SHR,UNIT=FAST,DSN=JADEPR.JADELD(˘(S1))
//LKED.SYSIN DD *
 INCLUDE SYSLIB(USRED82,GBOOK,DBASEDUM)
//*
//
./ LABEL NOMACRO
GOTO SUBMIT
$
$----------------------------------------------------------------------
$                       SUBMIT A REDUC1 JOB
$----------------------------------------------------------------------
$
LABEL RED1JOB
CLEAR
SHOW '        SUBMIT A REDUC1 JOB AT DESY'
SHOW '        ==========================='
SHOW ' '
$
$-------------------
$ TAPE TO BE REDUCED
$-------------------
$
SHOW ' '
SHOW '--- ENTER GENERATION NO. OF REFORM TAPE TO BE REDUCED (EG G0102)'
READ INTO S1 PROMPT '-->'
IF LENGTH(S1)=0 GOTO NODEFLT
IF S1=' ' GOTO NODEFLT
IF LENGTH(S1)=3 SET S1='G0'||S1
SHOW ' '
SHOW '--- ENTER THE REFORMAT SERIES TO BE USED (DEFAULT = JDATA15)'
READ INTO S2 PROMPT '-->'
IF LENGTH(S2)=0 SET S2='JDATA15'
IF S2=' ' SET S2='JDATA15'
IF LENGTH(S2)=2 SET S2='JDATA'||S2
$
$--------
$ CPUTIME
$--------
$
SHOW ' '
SHOW '--- ENTER THE CPUTIME REQUIRED IN MINUTES (DEFAULT = 25)'
SHOW ' '
SHOW '    ESTIMATE OF CPUTIME: '
SHOW '    CPUTIME = (# OF REFORM EVENTS)/1300   '
SHOW '    BUT:  CPUTIME .LE. 35                      (L.B.)'
READ INTO S3 PROMPT '-->'
IF LENGTH(S3)=0 SET S3='25'
IF S3=' ' SET S3='25'
$
$-----------
$ CREATE JCL
$-----------
$
SET S40='JADED'||SUBSTR(S1,3,3)
./ INSERT 1 1
//˘(S40) JOB '10622622',REDUCONE,CLASS=D,MSGLEVEL=(1,0),TIME=˘(S3)
//*MAIN RELPRI=MED,LINES=(20)
//JOBLIB DD DSN=JADEPR.JADELD,DISP=SHR
//*
//*-----------------------------------------------------------
//*
//* JCL TO RUN THE JADE REDUCONE PROGRAM
//*
//* FT02F001 = INPUT REFORMAT TAPE (IE DATA TO BE REDUCED)
//*          = F11LHO.˘(S2).REFORM.˘(S1)V00
//*
//* SYSUT2   = OUTPUT FILE FOR REDUCED EVENTS
//*          = JADEPR.RED1HH.ST˘(SUBSTR(S1,3,3))
//*
//*-----------------------------------------------------------
//*
//REDUCING EXEC PGM=REDUC1LD,REGION=960K
//FT06F001 DD SYSOUT=*
//FT07F001 DD DUMMY
//FT03F001 DD UNIT=DISK,DISP=(NEW,PASS),DSN=&&DATAOUT,
//         DCB=(RECFM=VBS,LRECL=6236,BLKSIZE=6240),
//         SPACE=(CYL,(200,50))
//FT21F001 DD DISP=SHR,DSN=F11LHO.AUPDAT0
//FT22F001 DD DISP=SHR,DSN=F11LHO.KALWRK0
//*
//*        INPUT FILE OF EVENTS
//*
//FT02F001 DD DISP=SHR,DSN=F11LHO.˘(S2).REFORM.˘(S1)V00
//*
//*        USER CONTROL FILE
//*
//FT05F001 DD *
STARTRUN 00000000 00000000
NOTRUNS  00000 00000 00000 00000 00000 00000 00000 00000 00000 00000
/*
//SPOOLING EXEC PGM=IEBGENER,REGION=220K
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD UNIT=DISK,DISP=(OLD,DELETE),DSN=&&DATAOUT
//*
//*        FINAL OUTPUT FILE
//*
//SYSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG,CATLG),
//       DCB=(RECFM=VBS,LRECL=6236,BLKSIZE=24948),
//       DSN=JADEPR.RED1HH.ST˘(SUBSTR(S1,3,3))
//
./ LABEL NOMACRO
GOTO SUBMIT
$
$----------------------------------------------------------------------
$        COPY A DESY WRITTEN REFORM TAPE ONTO A RUTHERFORD TAPE
$----------------------------------------------------------------------
$
LABEL WRITERUT
CLEAR
SHOW '   COPY A DESY WRITTEN REFORM TAPE ONTO A RUTHERFORD TAPE'
SHOW '   ======================================================'
SHOW ' '
$
$-------------------------
$ REFORM GENERATION NUMBER
$-------------------------
$
SHOW ' '
SHOW '--- ENTER THE REFORM GENERATION NUMBER TO BE COPIED (EG G0470)'
READ INTO S1 PROMPT '-->'
IF LENGTH(S1)=0 GOTO NODEFLT
IF S1=' ' GOTO NODEFLT
IF LENGTH(S1)=3 SET S1='G0'||S1
$
SHOW ' '
SHOW '--- ENTER THE REFORMAT SERIES REQUIRED (DEFAULT = JDATA08)'
READ INTO S3 PROMPT '-->'
IF LENGTH(S3)=0 SET S3='JDATA08'
IF S3=' ' SET S3='JDATA08'
$
$---------------------------------
$ RUTHERFORD TAPE SERIAL NUMBER(S)
$---------------------------------
$
SHOW ' '
SHOW '--- ENTER THE SERIAL NUMBER OF THE RUTHERFORD TAPE (EG 939454)'
READ INTO S2 PROMPT '-->'
IF S2=' ' GOTO NODEFLT
IF LENGTH(S2)=0 GOTO NODEFLT
$
$--------------
$ CONSTRUCT JCL
$--------------
$
SET S40='JADEC'||SUBSTR(S1,3,3)
./ INSERT 1 1
//˘(S40) JOB 10622622,REDUCONE,CLASS=A,MSGLEVEL=(1,0),TIME=(1,00)
//*MAIN RELPRI=MED,LINES=(5)
//*
//*
//* ===================================================================
//*
//* JOB TO PRODUCE A RUTHERFORD REFORM TAPE
//*
//* DESY REFORM TAPE = F11LHO.˘(S3).REFORM.˘(S1)V00
//*
//* RUTHERFORD TAPE  = ˘(S2)
//*
//* ===================================================================
//*
//*
//JOBLIB DD DSN=JADEPR.JADELD,DISP=SHR
//RUTH EXEC PGM=RUTHCOPY,REGION=190K
//FT06F001 DD SYSOUT=*
//FT21F001 DD DISP=SHR,DSN=F11LHO.AUPDAT0
//FT22F001 DD DISP=SHR,DSN=F11LHO.KALWRK0
//FT04F001 DD UNIT=TAPE,DISP=(OLD,KEEP),
//         DSN=F11LHO.˘(S3).REFORM.˘(S1)V00
//FT03F001 DD UNIT=TAPE,DISP=(NEW,KEEP,DELETE),
//         DCB=(RECFM=VBS,LRECL=6236,BLKSIZE=24948),
//         VOL=SER=(˘(S2)),
//         LABEL=(1,SL,,OUT),
//         DSN=JADEPR.AU0R˘(SUBSTR(S1,3,3))
//FT03F002 DD UNIT=AFF=FT03F001,DISP=(NEW,KEEP,DELETE),
//         DCB=(RECFM=VBS,LRECL=6236,BLKSIZE=24948),
//         VOL=SER=(˘(S2)),
//         LABEL=(2,SL,,OUT),
//         DSN=JADEPR.AU1R˘(SUBSTR(S1,3,3))
//FT03F003 DD UNIT=AFF=FT03F002,DISP=(NEW,CATLG,DELETE),
//         DCB=(RECFM=VBS,LRECL=6236,BLKSIZE=24948),
//         VOL=SER=(˘(S2)),
//         LABEL=(3,SL,,OUT),
//         DSN=JADEPR.RUTH˘(SUBSTR(S1,3,3))
//FT05F001 DD *
//*
./ LABEL NOMACRO
GOTO SUBMIT
$
$----------------------------------------------------------------------
$              LIST THE FILE CONTENTS OF A RUTHERFORD TAPE
$----------------------------------------------------------------------
$
LABEL XTAPE
CLEAR
SHOW '      LIST THE FILE CONTENTS OF A RUTHERFORD TAPE'
SHOW '      ==========================================='
SHOW ' '
$
$--------------------------
$ TAPE VOLUME SERIAL NUMBER
$--------------------------
$
SHOW ' '
SHOW '--- ENTER THE TAPE VOLUME SERIAL NUMBER (EG 939451)'
READ INTO S1 PROMPT '-->'
IF LENGTH(S1)=0 GOTO NODEFLT
$
$--------------
$ CONSTRUCT JCL
$--------------
$
SET S40='JADETAPE'
./ INSERT 1 1
//˘(S40) JOB 10622622,REDUCONE,CLASS=A,TIME=(,15),MSGLEVEL=(0,0)
//*MAIN RELPRI=MED,LINES=(5)
//*
//*-----------------------------------------------------------
//*
//* JOB TO LIST FILE CONTENTS OF A RUTHERFORD TAPE
//*
//*-----------------------------------------------------------
//*
// EXEC TAPETEST,VOLSER=˘(S1),ONLYSUM=Y
//
./ LABEL NOMACRO
GOTO SUBMIT
$
$-------------
$ SUBMIT JOB ?
$-------------
$
LABEL SUBMIT
RENUM ####JUNK 1 1
SHOW ' '
SHOW '--- JCL CREATED'
SHOW '--- PRESS RETURN/ENTER TO SUBMIT, ANYTHING ELSE TO TERMINATE :'
READ INTO S1 PROMPT '--> '
IF S1=' ' GOTO RUN
SHOW '--- SUBMIT TERMINATED'
SHOW '--- JCL MAY BE INSPECTED IN MEMBER ####JUNK'
GOTO KEEPJCL
LABEL RUN
SUBH ####JUNK
SHOW '--- JOB ˘(S40) SUBMITTED '
READ INTO S1 PROMPT '--- ANOTHER ONE ? ( Y(ES) OR N(O) )'
IF SUBSTR(S1,1,1)^='Y' GOTO STOP
GOTO SKIP1
$
$----------------
$ TERMINATE CLIST
$----------------
$
LABEL NODEFLT
SHOW ' '
SHOW '--- THERE IS NO DEFAULT FOR THIS PARAMETER'
LABEL STOP
SC ####JUNK
LABEL KEEPJCL
SHOW ' '
SHOW '--- END OF CLIST'
SET ESCAPE=''
V ON
FULL ON
RETURN
$   13/12/82 407031412  MEMBER NAME  REDUC1   (JADESR)      CLIST
$
$---------------------------------------------------
$
$ REDUC1 - A CLIST TO PERFORM ALL DESY REDUC1 TASKS
$ ======                          ====
$
$ TASKS PERFORMED ARE :
$
$      (1) .. MAKE AN ARCHIVE COPY OF A REDUC1 MERGE TAPE'
$      (2) .. COPY REDUC1 DATA FROM A RUTHERFORD TAPE TO A DESY TAPE
$      (3) .. LIST THE RUN CONTENTS OF A REDUC1 MERGE TAPE'
$      (4) .. SUBMIT A REDUC1 MERGE JOB'
$      (5) .. RE-LINK THE REDUC1 LOAD MODULE'
$      (6) .. SUBMIT A REDUC1 JOB'
$      (7) .. COPY A DESY REFORM TAPE ONTO A RUTHERFORD TAPE'
$      (8) .. LIST FILE CONTENTS OF A RUTHERFORD TAPE'
$
$ TO INVOKE TYPE (REDUC1) AND ANSWER THE QUESTIONS
$
$ THE JCL IS WRITTEN INTO THE DUMMY MEMBER ####JUNK
$ AND MAY THEN BE SUBMITTED OR EDITED
$---------------------------------------------------
$
FULL OFF
V OFF OFF
SET ESCAPE='˘'
$
$----------------------------------
$ CREATE/CLEAR DUMMY MEMBER FOR JCL
$----------------------------------
$
SC ####JUNK
IF DIR('####JUNK') = 'T'  GOTO SKIP1
./ ADD ####JUNK
./ LABEL NOMACRO
LABEL SKIP1
C ####JUNK
D 0 900000
$
$-------------------------------
$ BRANCH TO REQUIRED REDUC1 TASK
$-------------------------------
$
IF N0^=0 GOTO NOTASK
CLEAR
SHOW '      REDUC1 TASKS AVAILABLE FOR EXECUTION AT DESY'
SHOW '      ============================================'
SHOW ' '
SHOW ' ARCHIVE  (A) .. MAKE AN ARCHIVED COPY OF A REDUC1 MERGE TAPE'
SHOW ' COPYRUT  (C) .. COPY A RUTH WRITTEN REDUC1 TAPE ONTO A DESY TAPE'
SHOW ' LISTRUNS (L) .. LIST THE RUN CONTENTS OF A REDUC1 MERGE TAPE'
SHOW ' MERGE    (M) .. SUBMIT A REDUC1 MERGE JOB'
SHOW ' NEWLOAD  (N) .. RE-LINK THE REDUC1 LOAD MODULE'
SHOW ' REDUCE   (R) .. SUBMIT A REDUC1 JOB'
SHOW ' WRITERUT (W) .. COPY A DESY REFORM TAPE ONTO A RUTHERFORD TAPE'
SHOW ' XTAPE    (X) .. LIST FILE CONTENTS OF A RUTHERFORD TAPE'
SHOW ' '
SHOW ' TO OPERATE REDUC1 AT RUTHERFORD USE (RUTHJOBS)'
SHOW ' '
READ INTO S0 PROMPT ' ENTER TASK REQUIRED :'
IF S0=' ' GOTO STOP
IF LENGTH(S0)=0 GOTO STOP
LABEL NOTASK
IF SUBSTR(S0,1,1)='R' GOTO RED1JOB
IF SUBSTR(S0,1,1)='M' GOTO MERGEJOB
IF SUBSTR(S0,1,1)='A' GOTO ARCHIVE
IF SUBSTR(S0,1,1)='L' GOTO LISTRUNS
IF SUBSTR(S0,1,1)='W' GOTO WRITERUT
IF SUBSTR(S0,1,1)='C' GOTO COPYRUT
IF SUBSTR(S0,1,1)='N' GOTO NEWLOAD
IF SUBSTR(S0,1,1)='X' GOTO XTAPE
SHOW ' '
SHOW ' TASK ˘(S0) NOT RECOGNISED .. CLIST TERMINATING'
GOTO STOP
$
$----------------------------------------------------------------------
$              ARCHIVE A REDUC1 MERGE TAPE
$----------------------------------------------------------------------
$
LABEL ARCHIVE
CLEAR
SHOW '      CREATE AN ARCHIVED COPY OF A REDUC1 MERGE TAPE'
SHOW '      =============================================='
SHOW ' '
$
$-------------------------
$ REDUC1 GENERATION NUMBER
$-------------------------
$
SHOW ' '
SHOW '--- ENTER THE REDUC1 GENERATION NUMBER TO BE ARCHIVED (EG G0402)'
READ INTO S1 PROMPT '-->'
IF LENGTH(S1)=0 GOTO NODEFLT
IF LENGTH(S1)=3 SET S1='G0'||S1
$
$--------------
$ CONSTRUCT JCL
$--------------
$
SET S40='JADEA'||SUBSTR(S1,3,3)
./ INSERT 1 1
//˘(S40) JOB 10622622,REDUCONE,CLASS=A,MSGLEVEL=(1,0),TIME=(1,00)
//*MAIN RELPRI=LOW,LINES=(2),ORG=EXT
//ARCHIVE EXEC PGM=IEBGENER,REGION=165K
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//*
//*-----------------------------------------------------------
//*
//* JOB TO MAKE A BACKUP-ARCHIVE COPY OF A REDUC1 TAPE AT DESY
//*
//* SYSUT1 = INPUT REDUC1 TAPE TO BE COPIED
//*        = JADEPR.REDUCONE.˘(S1)V00
//*
//* SYSUT2 = OUTPUT ARCHIVE COPY TAPE
//*        = JADEPR.ARCHIVE.REDUC˘(SUBSTR(S1,3,3))
//*
//*-----------------------------------------------------------
//*
//SYSUT1 DD UNIT=TAPE,DISP=SHR,
//       DSN=JADEPR.REDUCONE.˘(S1)V00
//SYSUT2 DD UNIT=ARCHIV,DISP=(NEW,CATLG,DELETE),
//      DSN=JADEPR.ARCHIVE.REDUC˘(SUBSTR(S1,3,3))
//
./ LABEL NOMACRO
GOTO SUBMIT
$
$----------------------------------------------------------------------
$    COPY A RUTHERFORD WRITTEN MERGE TAPE TO A DESY M/ROOM TAPE
$----------------------------------------------------------------------
$
LABEL COPYRUT
CLEAR
SHOW '    COPY A RUTHERFORD WRITTEN MERGE TAPE TO A DESY M/ROOM TAPE'
SHOW '    =========================================================='
SHOW ' '
$
$-------------------------
$ REDUC1 GENERATION NUMBER
$-------------------------
$
SHOW ' '
SHOW '--- ENTER THE REDUC1 GENERATION NUMBER TO BE COPIED (EG G0470)'
READ INTO S1 PROMPT '-->'
IF LENGTH(S1)=0 GOTO NODEFLT
IF LENGTH(S1)=3 SET S1='G0'||S1
$
$---------------------------------
$ RUTHERFORD TAPE SERIAL NUMBER(S)
$---------------------------------
$
SHOW ' '
SHOW '--- ENTER THE RUTHERFORD TAPE SERIAL NUMBER(S) (EG 939454,...)'
READ INTO S2 PROMPT '-->'
IF S2=' ' GOTO NODEFLT
IF LENGTH(S2)=0 GOTO NODEFLT
$
$--------------------------------------
$ RUTHERFORD TAPE LABEL SEQUENCE NUMBER
$--------------------------------------
$
SHOW ' '
SHOW '--- ENTER THE TAPE VOLUME LABEL NUMBER (DEFAULT = 1)'
READ INTO S3 PROMPT '-->'
IF S3=' ' SET S3='1'
IF LENGTH(S3)=0 SET S3='1'
$
$-----------
$ TIME LIMIT
$-----------
$
SET S11='(1,00)'
SET S12='A'
IF LENGTH(S2)<9 GOTO CLASSA
SET S11='(2,00)'
SET S12='K'
LABEL CLASSA
$
$--------------
$ CONSTRUCT JCL
$--------------
$
SET S40='JADEC'||SUBSTR(S1,3,3)
./ INSERT 1 1
//˘(S40) JOB 10622622,REDUCONE,CLASS=˘(S12),MSGLEVEL=(1,0),TIME=˘(S11)
//*MAIN RELPRI=MED,LINES=(2),ORG=EXT
//*
//*---------------------------------------------------------------------
//*
//* JOB TO COPY REDUC1 MERGE DATA FROM A RUTHERFORD TAPE TO A DESY TAPE
//*
//* SYSUT1 = (INPUT) RUTHERFORD TAPE CONTAINING REDUC1 MERGE DATA
//*        = JADEPR.REDUC1.˘(S1)    TAPE=˘(S2)    LABEL=˘(S3)
//*
//* SYSUT2 = (OUTPUT) DESY MACHINE ROOM TAPE
//*        = JADEPR.REDUCONE.˘(S1)V00
//*
//*---------------------------------------------------------------------
//*
//* STEP 1 - THE COPY
//* =================
//*
//RUTHCOPY EXEC PGM=IEBGENER,REGION=165K
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD UNIT=TAPE,DISP=(OLD,KEEP),
//       DSN=JADEPR.REDUC1.˘(S1),
//       VOL=SER=(˘(S2)),
//       LABEL=(˘(S3),SL,,IN)
//SYSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//      DSN=JADEPR.REDUCONE.˘(S1)V00
//*
//* STEP 2 - THE EVENT CHECK
//* ========================
//*
//LISTRUNS EXEC PGM=LISTRUNS,REGION=300K
//STEPLIB DD DSN=F11PEA.GENERAL.LOAD,DISP=SHR
//FT06F001 DD SYSOUT=*
//FT02F001 DD DISP=SHR,DSN=JADEPR.REDUCONE.˘(S1)V00
//
./ LABEL NOMACRO
GOTO SUBMIT
$
$----------------------------------------------------------------------
$              LIST RUN CONTENTS OF A REDUC1 MERGE TAPE
$----------------------------------------------------------------------
$
LABEL LISTRUNS
CLEAR
SHOW '        LIST RUN CONTENTS OF A REDUC1 MERGE TAPE'
SHOW '        ========================================'
SHOW ' '
$
$-------------------------
$ REDUC1 GENERATION NUMBER
$-------------------------
$
SHOW ' '
SHOW '--- ENTER THE REDUC1 GENERATION NUMBER TO BE LISTED (EG G0402)'
READ INTO S1 PROMPT '-->'
IF LENGTH(S1)=0 GOTO NODEFLT
IF LENGTH(S1)=3 SET S1='G0'||S1
$
$--------------
$ CONSTRUCT JCL
$--------------
$
SET S40='JADEL'||SUBSTR(S1,3,3)
./ INSERT 1 1
//˘(S40) JOB 10622622,REDUCONE,CLASS=A,MSGLEVEL=(1,0),TIME=(1,00)
//*MAIN RELPRI=LOW,LINES=(2),ORG=EXT
//JOBLIB DD DSN=F11PEA.GENERAL.LOAD,DISP=SHR
//LISTRUNS EXEC PGM=LISTRUNS,REGION=300K
//FT06F001 DD SYSOUT=*
//*
//*----------------------------------------------------------------
//*
//* JOB TO PRODUCE RUN/EVENT LISTING OF REDUC1 (OR ANY OTHER) TAPE
//* USED TO CHECK THAT CORRECT RUNS ETC ARE PRESENT ON TAPE
//*
//*----------------------------------------------------------------
//*
//FT02F001 DD DISP=SHR,DSN=JADEPR.REDUCONE.˘(S1)V00
//
./ LABEL NOMACRO
GOTO SUBMIT
$
$----------------------------------------------------------------------
$                   SUBMIT A REDUC1 MERGE JOB
$----------------------------------------------------------------------
$
LABEL MERGEJOB
CLEAR
SHOW '        SUBMIT A REDUC1 MERGE JOB'
SHOW '        ========================='
SHOW ' '
$
$-------------------------
$ REDUC1 GENERATION NUMBER
$-------------------------
$
SHOW ' '
SHOW '--- ENTER THE REDUC1 GENERATION NUMBER TO BE USED (EG G0402)'
READ INTO S1 PROMPT '-->'
IF LENGTH(S1)=0 GOTO NODEFLT
IF LENGTH(S1)=3 SET S1='G0'||S1
$
$-------------------
$ TAPES TO BE MERGED
$-------------------
$
SHOW ' '
SHOW '--- ENTER A LIST OF THE DATA SETS TO BE MERGED USING THE FULL'
SHOW '--- DATA SET NAME WITH NO APOSTROPHES (EG JADEPR.ST101)'
SHOW '--- THE LIST IS TERMINATED WITH A NULL INPUT'
SHOW ' '
READ INTO S2 PROMPT '--- ENTER FIRST DATA SET NAME :'
IF LENGTH(S2)=0 GOTO NODEFLT
IF S2 = ' ' GOTO NODEFLT
$
$-----------
$ CREATE JCL
$-----------
$
SET S40='JADEM'||SUBSTR(S1,3,3)
./ INSERT 1 1
//˘(S40) JOB '10622622',REDUCONE,CLASS=K,MSGLEVEL=(1,0),TIME=(2,00)
//*MAIN RELPRI=MED,LINES=(15),CARDS=(900)
//*
//*-----------------------------------------------------------
//*
//* JCL TO RUN THE JADE REDUC1 MERGE STEP
//*
//* SYSUT1   = CONCATENATED SEQUENCE OF INPUT FILES TO BE MERGED
//* SYSUT2   = OUTPUT FILE FOR MERGED SUM
//* FT01F001 = SAME AS SYSUT2 FILE (USED AS INPUT BY MUONSTEP)
//* FT02F001 = SAME AS SYSUT2 FILE (USED AS INPUT BY LISTRUNS)
//*
//*-----------------------------------------------------------
//*
//* STEP 1 - THE MERGE
//* ==================
//*
//DESYMRGE EXEC PGM=IEBGENER,REGION=120K
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//*
//*  TAPE FOR MERGED OUTPUT
//*
//SYSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG),DSN=JADEPR.REDUCONE.˘(S1)V00,
// VOL=(,RETAIN)
//*
//*  LIST OF INPUT TAPES TO BE MERGED
//*
//SYSUT1 DD UNIT=TAPE,DISP=SHR,DSN=˘(S2)
./ LABEL NOMACRO
$
$------------------------
$ MORE TAPES TO BE MERGED
$------------------------
$
LABEL MERGE1
READ INTO S2 PROMPT '--- ENTER NEXT  DATA SET NAME :'
IF LENGTH(S2)=0 GOTO MERGE2
IF S2 = ' ' GOTO MERGE2
./ INSERT 1000 1
// DD UNIT=AFF=SYSUT1,DISP=SHR,DSN=˘(S2)
./ LABEL NOMACRO
RENUM ####JUNK 1 1
GOTO MERGE1
LABEL MERGE2
$
$--------------------------------------
$ NOW FOR THE LISTRUN AND DI-MUON STEPS
$--------------------------------------
$
./ INSERT 1000 1
//*
//* STEP 2 - THE EVENT CHECK
//* ========================
//*
//LISTRUNS EXEC PGM=LISTRUNS,REGION=300K
//STEPLIB DD DSN=F11PEA.GENERAL.LOAD,DISP=SHR
//FT06F001 DD SYSOUT=*
//FT02F001 DD DISP=SHR,VOL=(,RETAIN),DSN=JADEPR.REDUCONE.˘(S1)V00
//*
//* STEP 3 - THE RJB DI-MUON EXTRACTOR
//* =================================
//*
//* GETMUONS EXEC PGM=GETMUONS,REGION=550K
//* STEPLIB DD DSN=JADEPR.JADELD,DISP=SHR,UNIT=FAST
//* FT06F001 DD SYSOUT=*
//* FT08F001 DD SYSOUT=4,OUTLIM=90000
//* FT21F001 DD DISP=SHR,DSN=F11LHO.AUPDAT0,DCB=BUFNO=1
//* FT22F001 DD DISP=SHR,DSN=F11LHO.KALWRK0,DCB=BUFNO=1
//* FT01F001 DD DISP=SHR,DSN=JADEPR.REDUCONE.˘(S1)V00
//
./ LABEL NOMACRO
GOTO SUBMIT
$
$----------------------------------------------------------------------
$                   RE-LINK THE REDUC1 MODULE
$----------------------------------------------------------------------
$
LABEL NEWLOAD
CLEAR
SHOW '           RE-LINK THE DESY REDUC1 MODULE'
SHOW '           =============================='
SHOW ' '
SHOW '--- ENTER THE NAME FOR THE NEW MODULE (DEFAULT = REDUC1LD) '
READ INTO S1 PROMPT '-->'
IF LENGTH(S1)=0 SET S1='REDUC1LD'
IF S1=' ' SET S1='REDUC1LD'
$
$--------------
$ CONSTRUCT JCL
$--------------
$
SET S40='JADER1LK'
./ INSERT 1 1
//˘(S40) JOB '10622622',REDUCONE,CLASS=E,TIME=(0,15)
//*MAIN RELPRI=MED,LINES=(2),ORG=EXT
//*
//*-------------------------------------------------------
//*
//* JOB TO LINK AN EXECUTABLE REDUC1 LOAD MODULE AT DESY
//* NEW MODULE NAME = JADEPR.JADELD(˘(S1))
//*
//*-------------------------------------------------------
//*
//JOBLIB DD DSN=R02BUT.FORTRANH,DISP=SHR
// EXEC FCL,FORT=XL,PARM.LKED='LIST,MAP'
//FORT.SYSIN DD *
#include "jdmain0.for"
//*
//LKED.SYSLIB DD
//            DD
//            DD DISP=SHR,UNIT=FAST,DSN=JADEPR.JADELD
//            DD DISP=SHR,UNIT=FAST,DSN=F11GOD.PATRECLD
//            DD DISP=SHR,UNIT=FAST,DSN=F11LHO.JADEGL
//            DD DISP=SHR,UNIT=FAST,DSN=JADELG.LOAD
//            DD DISP=SHR,UNIT=FAST,DSN=F22ALL.JADEMUL
//            DD DISP=SHR,UNIT=FAST,DSN=F1EBLO.BOSLIB.L
//*           DD DISP=SHR,UNIT=FAST,DSN=R01UTL.HBOOK321.L
//            DD DSN=R01UTL.CERN.GENLIB4,DISP=SHR
//            DD DSN=R01UTL.CERN.PACKLIB4,DISP=SHR
//LKED.SYSLMOD DD DISP=SHR,UNIT=FAST,DSN=JADEPR.JADELD(˘(S1))
//LKED.SYSIN DD *
 INCLUDE SYSLIB(USRED82,GBOOK,DBASEDUM)
//*
//
./ LABEL NOMACRO
GOTO SUBMIT
$
$----------------------------------------------------------------------
$                       SUBMIT A REDUC1 JOB
$----------------------------------------------------------------------
$
LABEL RED1JOB
CLEAR
SHOW '        SUBMIT A REDUC1 JOB AT DESY'
SHOW '        ==========================='
SHOW ' '
$
$-------------------
$ TAPE TO BE REDUCED
$-------------------
$
SHOW ' '
SHOW '--- ENTER GENERATION NO. OF REFORM TAPE TO BE REDUCED (EG G0102)'
READ INTO S1 PROMPT '-->'
IF LENGTH(S1)=0 GOTO NODEFLT
IF S1=' ' GOTO NODEFLT
IF LENGTH(S1)=3 SET S1='G0'||S1
SHOW ' '
SHOW '--- ENTER THE REFORMAT SERIES TO BE USED (DEFAULT = JDATA08)'
READ INTO S2 PROMPT '-->'
IF LENGTH(S2)=0 SET S2='JDATA08'
IF S2=' ' SET S2='JDATA08'
IF LENGTH(S2)=2 SET S2='JDATA'||S2
$
$--------
$ CPUTIME
$--------
$
SHOW ' '
SHOW '--- ENTER THE CPUTIME REQUIRED IN MINUTES (DEFAULT = 40)'
READ INTO S3 PROMPT '-->'
IF LENGTH(S3)=0 SET S3='40'
IF S3=' ' SET S3='40'
$
$-----------
$ CREATE JCL
$-----------
$
SET S40='JADED'||SUBSTR(S1,3,3)
./ INSERT 1 1
//˘(S40) JOB '10622622',REDUCONE,CLASS=D,MSGLEVEL=(1,0),TIME=˘(S3)
//*MAIN RELPRI=MED,LINES=(20)
//JOBLIB DD DSN=JADEPR.JADELD,DISP=SHR
//*
//*-----------------------------------------------------------
//*
//* JCL TO RUN THE JADE REDUCONE PROGRAM
//*
//* FT02F001 = INPUT REFORMAT TAPE (IE DATA TO BE REDUCED)
//*          = F11LHO.˘(S2).REFORM.˘(S1)V00
//*
//* SYSUT2   = OUTPUT FILE FOR REDUCED EVENTS
//*          = JADEPR.ST˘(SUBSTR(S1,3,3))
//*
//*-----------------------------------------------------------
//*
//REDUCING EXEC PGM=REDUC1LD,REGION=960K
//FT06F001 DD SYSOUT=*
//FT07F001 DD DUMMY
//FT03F001 DD UNIT=DISK,DISP=(NEW,PASS),DSN=&&DATAOUT,
//         DCB=(RECFM=VBS,LRECL=6236,BLKSIZE=6240),
//         SPACE=(CYL,(200,50))
//FT21F001 DD DISP=SHR,DSN=F11LHO.AUPDAT0
//FT22F001 DD DISP=SHR,DSN=F11LHO.KALWRK0
//*
//*        INPUT FILE OF EVENTS
//*
//FT02F001 DD DISP=SHR,DSN=F11LHO.˘(S2).REFORM.˘(S1)V00
//*
//*        USER CONTROL FILE
//*
//FT05F001 DD *
STARTRUN 00000000 00000000
NOTRUNS  00000 00000 00000 00000 00000 00000 00000 00000 00000 00000
/*
//SPOOLING EXEC PGM=IEBGENER,REGION=220K
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD UNIT=DISK,DISP=(OLD,DELETE),DSN=&&DATAOUT
//*
//*        FINAL OUTPUT FILE
//*
//SYSUT2 DD UNIT=TAPE,DISP=(NEW,CATLG,DELETE),
//       DCB=(RECFM=VBS,LRECL=6236,BLKSIZE=24948),
//       DSN=JADEPR.ST˘(SUBSTR(S1,3,3))
//
./ LABEL NOMACRO
GOTO SUBMIT
$
$----------------------------------------------------------------------
$        COPY A DESY WRITTEN REFORM TAPE ONTO A RUTHERFORD TAPE
$----------------------------------------------------------------------
$
LABEL WRITERUT
CLEAR
SHOW '   COPY A DESY WRITTEN REFORM TAPE ONTO A RUTHERFORD TAPE'
SHOW '   ======================================================'
SHOW ' '
$
$-------------------------
$ REFORM GENERATION NUMBER
$-------------------------
$
SHOW ' '
SHOW '--- ENTER THE REFORM GENERATION NUMBER TO BE COPIED (EG G0470)'
READ INTO S1 PROMPT '-->'
IF LENGTH(S1)=0 GOTO NODEFLT
IF S1=' ' GOTO NODEFLT
IF LENGTH(S1)=3 SET S1='G0'||S1
$
SHOW ' '
SHOW '--- ENTER THE REFORMAT SERIES REQUIRED (DEFAULT = JDATA08)'
READ INTO S3 PROMPT '-->'
IF LENGTH(S3)=0 SET S3='JDATA08'
IF S3=' ' SET S3='JDATA08'
$
$---------------------------------
$ RUTHERFORD TAPE SERIAL NUMBER(S)
$---------------------------------
$
SHOW ' '
SHOW '--- ENTER THE SERIAL NUMBER OF THE RUTHERFORD TAPE (EG 939454)'
READ INTO S2 PROMPT '-->'
IF S2=' ' GOTO NODEFLT
IF LENGTH(S2)=0 GOTO NODEFLT
$
$--------------
$ CONSTRUCT JCL
$--------------
$
SET S40='JADEC'||SUBSTR(S1,3,3)
./ INSERT 1 1
//˘(S40) JOB 10622622,REDUCONE,CLASS=A,MSGLEVEL=(1,0),TIME=(1,00)
//*MAIN RELPRI=MED,LINES=(5)
//*
//*
//* ===================================================================
//*
//* JOB TO PRODUCE A RUTHERFORD REFORM TAPE
//*
//* DESY REFORM TAPE = F11LHO.˘(S3).REFORM.˘(S1)V00
//*
//* RUTHERFORD TAPE  = ˘(S2)
//*
//* ===================================================================
//*
//*
//JOBLIB DD DSN=JADEPR.JADELD,DISP=SHR
//RUTH EXEC PGM=RUTHCOPY,REGION=190K
//FT06F001 DD SYSOUT=*
//FT21F001 DD DISP=SHR,DSN=F11LHO.AUPDAT0
//FT22F001 DD DISP=SHR,DSN=F11LHO.KALWRK0
//FT04F001 DD UNIT=TAPE,DISP=(OLD,KEEP),
//         DSN=F11LHO.˘(S3).REFORM.˘(S1)V00
//FT03F001 DD UNIT=TAPE,DISP=(NEW,KEEP,DELETE),
//         DCB=(RECFM=VBS,LRECL=6236,BLKSIZE=24948),
//         VOL=SER=(˘(S2)),
//         LABEL=(1,SL,,OUT),
//         DSN=JADEPR.AU0R˘(SUBSTR(S1,3,3))
//FT03F002 DD UNIT=AFF=FT03F001,DISP=(NEW,KEEP,DELETE),
//         DCB=(RECFM=VBS,LRECL=6236,BLKSIZE=24948),
//         VOL=SER=(˘(S2)),
//         LABEL=(2,SL,,OUT),
//         DSN=JADEPR.AU1R˘(SUBSTR(S1,3,3))
//FT03F003 DD UNIT=AFF=FT03F002,DISP=(NEW,CATLG,DELETE),
//         DCB=(RECFM=VBS,LRECL=6236,BLKSIZE=24948),
//         VOL=SER=(˘(S2)),
//         LABEL=(3,SL,,OUT),
//         DSN=JADEPR.RUTH˘(SUBSTR(S1,3,3))
//FT05F001 DD *
//*
./ LABEL NOMACRO
GOTO SUBMIT
$
$----------------------------------------------------------------------
$              LIST THE FILE CONTENTS OF A RUTHERFORD TAPE
$----------------------------------------------------------------------
$
LABEL XTAPE
CLEAR
SHOW '      LIST THE FILE CONTENTS OF A RUTHERFORD TAPE'
SHOW '      ==========================================='
SHOW ' '
$
$--------------------------
$ TAPE VOLUME SERIAL NUMBER
$--------------------------
$
SHOW ' '
SHOW '--- ENTER THE TAPE VOLUME SERIAL NUMBER (EG 939451)'
READ INTO S1 PROMPT '-->'
IF LENGTH(S1)=0 GOTO NODEFLT
$
$--------------
$ CONSTRUCT JCL
$--------------
$
SET S40='JADETAPE'
./ INSERT 1 1
//˘(S40) JOB 10622622,REDUCONE,CLASS=A,TIME=(,15),MSGLEVEL=(0,0)
//*MAIN RELPRI=MED,LINES=(5)
//*
//*-----------------------------------------------------------
//*
//* JOB TO LIST FILE CONTENTS OF A RUTHERFORD TAPE
//*
//*-----------------------------------------------------------
//*
// EXEC TAPETEST,VOLSER=˘(S1),ONLYSUM=Y
//
./ LABEL NOMACRO
GOTO SUBMIT
$
$-------------
$ SUBMIT JOB ?
$-------------
$
LABEL SUBMIT
RENUM ####JUNK 1 1
SHOW ' '
SHOW '--- JCL CREATED'
SHOW '--- PRESS RETURN/ENTER TO SUBMIT, ANYTHING ELSE TO TERMINATE :'
READ INTO S1 PROMPT '--> '
IF S1=' ' GOTO RUN
SHOW '--- SUBMIT TERMINATED'
SHOW '--- JCL MAY BE INSPECTED IN MEMBER ####JUNK'
GOTO KEEPJCL
LABEL RUN
SUBH ####JUNK
SHOW '--- JOB ˘(S40) SUBMITTED '
READ INTO S1 PROMPT '--- ANOTHER ONE ? ( Y(ES) OR N(O) )'
IF SUBSTR(S1,1,1)^='Y' GOTO STOP
GOTO SKIP1
$
$----------------
$ TERMINATE CLIST
$----------------
$
LABEL NODEFLT
SHOW ' '
SHOW '--- THERE IS NO DEFAULT FOR THIS PARAMETER'
LABEL STOP
SC ####JUNK
LABEL KEEPJCL
SHOW ' '
SHOW '--- END OF CLIST'
SET ESCAPE=''
V ON
FULL ON
RETURN
$   28/05/84 508061722: MEMBER NAME  JBWRIT   (BIBLS)       NEWLIB
