!LET ECHOING= 1
!   IF $FID_EXIST('DONTECHO.X') THEN DONTECHO.X ECHOING
!"
!GET_VERSION:
!   LET VERSION=$INPUT('Enter your CP-6 operating system version (B03,C00,etc.): ')
!   IF $LEN(VERSION) > 0 THEN GOTO CHECK_VERSION
!   OUTPUT '.. Version C01 is assumed.'
!   LET VERSION='C01'
!   GOTO GET_ACCOUNT
!"
!CHECK_VERSION:
!   IF VERSION = 'Q' THEN GOTO RESET_ECHO
!   IF $LEN(VERSION) = 3 THEN GOTO CHECK_VERSION_PREFIX
!   OUTPUT '.. Version MUST be three characters -- Try again.'
!   GOTO GET_VERSION
!"
!CHECK_VERSION_PREFIX:
!   IF $SUBSTR(VERSION,0,1) = 'B' THEN GOTO GET_ACCOUNT
!   IF $SUBSTR(VERSION,0,1) = 'C' THEN GOTO GET_ACCOUNT
!   IF $SUBSTR(VERSION,0,1) = 'D' THEN GOTO GET_ACCOUNT
!   IF $SUBSTR(VERSION,0,1) = 'E' THEN GOTO GET_ACCOUNT
!   LET MSG='.. Are you sure you mean version ' || VERSION || '? '
!   LET ANS=$INPUT('%MSG')
!   IF $LEN(ANS) = 0 THEN GOTO GET_VERSION
!   IF $SUBSTR(ANS,0,1) .NE. 'Y' .AND. $SUBSTR(ANS,0,1) .NE. 'y' THEN GOTO GET_VERSION
!"
!GET_ACCOUNT:
!   LET ACCOUNT=$INPUT('Enter the account where the HC6? files reside .')
!   IF $LEN(ACCOUNT) = 0 THEN LET ACCOUNT=$DIR
!   IF ACCOUNT = 'Q' THEN GOTO RESET_ECHO
!   IF $LEN(ACCOUNT) <= 8 THEN GOTO GET_WSN
!   LET MSG='.. An account of ' || ' is too long - Try again'
!   OUTPUT MSG
!   GOTO GET_ACCOUNT
!"
!GET_WSN:
!   LET WSN=$INPUT('Enter the WSN to be used by the KERMIT compile job: ')
!   IF $LEN(WSN) > 0 THEN GOTO CHECK_WSN
!   OUTPUT '.. WSN of @LOCAL assumed.'
!   LET WSN='LOCAL'
!   GOTO VERIFY_ANSWERS
!"
!CHECK_WSN:
!   IF WSN = 'Q' THEN GOTO RESET_ECHO
!   IF $LEN(WSN) <= 8 THEN GOTO VERIFY_ANSWERS
!   LET MSG='.. WSN of ' || WSN || ' is too long -- Try again'
!   OUTPUT MSG
!   GOTO GET_WSN
!"
!VERIFY_ANSWERS:
!   OUTPUT '***** Are the following correct?'
!   LET MSG='CP-6 operating system version is ' || '%VERSION'
!   OUTPUT MSG
!   LET MSG='All HC6KERMIT? files are in .' || '%ACCOUNT'
!   OUTPUT MSG
!   LET MSG='WSN the compile job should use is @' || '%WSN'
!   OUTPUT MSG
!   OUTPUT ' '
!GET_VERIFY_ANSWER:
!   LET ANS=$INPUT('Correct? ')
!   IF $LEN(ANS) = 0 THEN GOTO GET_VERIFY_ANSWER
!   IF $SUBSTR(ANS,0,1)='Y' .OR. $SUBSTR(ANS,0,1)='y' THEN GOTO BUILD_CMD_FILE
!   GOTO GET_VERSION
!"
!BUILD_CMD_FILE:
!C ME OVER *LEE(NB)
!!E
C HC6KERMIT_JCL
SE 0-5,/!DEFAULT/
1E/!DEFAULT OSVERS='VVV',YOURWSN='WWW',DIRACCT='DDD',DEST='*LS'/
C HC6KERMIT_PAR
SE 0-200,/%EQU OS_VERSION/
//?/'/?/'/?/ /S//?1/'VVV'/?3/ /;TX
C HC6KERMIT_PL6
SE 0-200,/%EQU OS_VERSION/
//?/'/?/'/?/ /S//?1/'VVV'/?3/ /;TX
END
!!C HC6KERMIT_JCL OVER HC6KERMIT_JCL(NLN,NB)
!!C HC6KERMIT_PAR OVER HC6KERMIT_PAR(NLN,NB)
!!C HC6KERMIT_PL6 OVER HC6KERMIT_PL6(NLN,NB)
!"
!BACKUP_FILES:
!   PCL
    CA HC6KERMIT_JCL TO *?
    CA HC6KERMIT_PAR TO *?
    CA HC6KERMIT_PL6 TO *?
    END
!"
!MAKE_MY_DAY:
!   XEQ *LEE 'VVV'=%VERSION,'WWW'=%WSN,'DDD'=%ACCOUNT
!RESET_ECHO:
!   IF ECHOING THEN ECHO
!EOJ:
