/* REXX *** */ PARSE UPPER ARG Volume Ttr /* check the arguments */ If Length(Volume) \= 6 then Do Say 'Input parameters are Volser Ttr' Exit 4 End /* input ttr value is hexadecimal and 6 long */ If Length(Ttr) \= 6 , | \Datatype(Ttr, 'X') Then Do Say 'Invalid TTR input 'Ttr Exit 4 End /* the program expects the input value as CCCCHHHHRR in hex */ rr = Right(Ttr,2) trks = X2D(Left(Ttr, 4)) cc = D2X(trks % 15, 4) hh = D2X(trks // 15, 4) Say 'Volume='Volume 'CCHHRR='cc'-'hh'-'rr Address TSO , "CALL (CHR) '"Volume||cc||hh||rr"'" xrc = RC If xrc \= 0 then Say 'Return code was 'xrc Exit xrc