***********************************************************
*       HARD DISK LOGICAL COMMANDS VERIFICATION SCRIPT    *
*                                                         *
*   Directions for use:                                   *
*                                                         *
*     - Execute the Device Driver Test Tool against this  *
*       script:  DDTT DASDSTD2.SCR                        *
*                                                         *
*     - Enter target logical disk drive letter in DDTT    *
*       response window when prompted.                    *
*       (Such as C: for primary hard disk.)               *
*                                                         *
*     - Check log file DASDSTD2.LOG to ensure that no     *
*       failures occurred.                                *
*                                                         *
*                                                         *
*                                                         *
*                                                         *
***********************************************************
@thread DASDSTD2.LOG
@NewAlias ld DASD.GRA
ld set HDR="========================================================"
ld OUT $KWD=HDR
ld LOG $PROMPT="        HARD DISK TEST SCRIPT:  LOGICAL COMMANDS"
ld OUT $KWD=HDR
*
*ld RESPONSE $PROMPT="ENTER TARGET DISK LETTER WITH COLON" $PAUSE=-1 $RESPONSE=DEVICENAME
ld SET DEVICENAME="C:"
ld SET CMD="OPEN FOLLOWING LOGICAL DRIVE - "
ld OUT $KWD=CMD
ld OUT $KWD=DEVICENAME
ld DASD_OPEN
*
ld SET CMD="BLOCK REMOVABLE AGAINST DRIVE"
ld OUT $KWD=CMD
ld BLOCK_REMOVABLE
ld SET EXPECT="  REMOVABLE = 0 (FALSE)"
ld OUT $KWD=EXPECT
ld CHECKVALUE $PARM=$(REMOVABLE) $EXPECT=0
*
ld SET CMD="READ LOGICAL DRIVE PARAMETERS"
ld OUT $KWD=CMD
ld GET_LOGICAL_PARAMS
ld SET CYLINDERCOUNT=$(CYLINDER)
*
ld SET HEAD=0         \
       CYLINDER=1     \
       SECTORSTART=1  \
       SECTORCOUNT=1  \
       SECTORSIZE=512 \
       $BUFFER=ALPHA
*
ld SET MSG="READ DISK AT 0-0-1"
ld OUT $KWD=MSG
ld CLEAR $BUFFER=ALPHA
ld READ_LOGICAL
*
ld SET HEAD=0         \
       CYLINDER=1     \
       SECTORSTART=0
*
ld SET MSG="READ DISK AT 0-1-0"
ld OUT $KWD=MSG
ld CLEAR $BUFFER=ALPHA
ld READ_LOGICAL
*
ld SET HEAD=1         \
       CYLINDER=0     \
       SECTORSTART=0
*
ld SET MSG="READ DISK AT 1-0-0"
ld OUT $KWD=MSG
ld CLEAR $BUFFER=ALPHA
ld READ_LOGICAL
*
ld SET $COUNT=$(CYLINDERCOUNT)
ld DECREMENT
ld SET CYLINDER=$($COUNT)
ld SET $COUNT = $(TRACKSIZE)
ld DECREMENT
ld SET SECTORSTART=$($COUNT)
ld SET HEAD=10
*
ld SET MSG="READ DISK AT HEAD=10, CYLINDERCOUNT-1, TRACKSIZE-1"
ld OUT $KWD=MSG
ld OUT $KWD=HEAD
ld OUT $KWD=CYLINDER
ld OUT $KWD=SECTORSTART
ld CLEAR $BUFFER=ALPHA
ld READ_LOGICAL
*
ld SET HEAD=5         \
       SECTORSTART=0  \
       CYLINDER=10    \
       SECTORCOUNT=2  \
       SECTORSIZE=512 \
       $BUFFER=ALPHA  \
       $COUNT=10
*
ld SET MSG="READ DISK IN A CYLINDER LOOP OF 10"
ld OUT $KWD=MSG
@loop 10
ld CLEAR $BUFFER=ALPHA
ld SET CYLINDER=$($COUNT)
ld OUT $KWD=CYLINDER
ld READ_LOGICAL
ld INCREMENT
@endloop
*
ld SET HEAD=5         \
       SECTORSTART=1  \
       CYLINDER=20    \
       SECTORCOUNT=8  \
       SECTORSIZE=512 \
       $BUFFER=ALPHA  \
       $COUNT=1
*
ld SET MSG="VERIFY DISK IN A HEAD LOOP OF 10"
ld OUT $KWD=MSG
@loop 10
ld CLEAR $BUFFER=ALPHA
ld SET HEAD=$($COUNT)
ld OUT $KWD=HEAD
ld VERIFY_LOGICAL
ld INCREMENT
@endloop
*
ld SET CMD="UNLOCK LOGICAL DRIVE D:"
ld OUT $KWD=CMD
ld UNLOCK_LOGICAL
*
ld SET $COUNT=$(CYLINDERCOUNT)
ld DECREMENT
ld SET CYLINDER=$($COUNT)
ld SET SECTORCOUNT=1  \
       SECTORSIZE=512 \
       $BUFFER=ALPHA
ld SET HEAD=10
ld SET $COUNT=0
*
ld SET MSG="READ/WRITE DISK IN A SECTOR LOOP OF 10"
ld OUT $KWD=MSG
@loop 10
ld CLEAR $BUFFER=ALPHA
ld SET SECTORSTART=$($COUNT)
ld OUT $KWD=SECTORSTART
ld READ_LOGICAL
ld WRITE_LOGICAL
ld INCREMENT
@endloop
*
ld SET CMD="CLOSE LOGICAL DRIVE"
ld OUT $KWD=CMD
ld DASD_CLOSE
@flush ld
