What can cause a S0C7 in VISION:Sixty when calling DYLDATE after upgrading to r12?
If a VISION:Sixty 12.0 program calls the DYLDATE routine, a S0C7 will occur if the DYLDATE routine from the VISION:Excel 7.0 product library is used. The VISION:Excel 7.0 version of the DYLDATE routine is Y2K compliant and checks the values in the fields that are contained in the copy member SIXTY4YR of the VISION:Sixty copy/source library.
The SIXTY4YR copy code consists of L parameters defining 57 bytes of storage and one D parameter. The D parameter must be the first D parameter in the program, and it performs an Enter Linkage to subroutine DYL4INIT to initialize the fields defined in the L parameters. These same fields then are also inserted in a control block that DYLDATE will inspect to determine if a 4 digit year date is being used.
The S0C7 ABEND occurs because the control block being inspected by DYLDATE has not been properly initialized by DYL4INIT.
The version is significant as the S0C7 abend does not occur using the DYLDATE routine from the old DYL-Subroutines product library. The old version was not Y2K compliant and did not deal with expanded date formats.
The solution is to use the COPY statement to bring in SIXTY4YR as shown below which will automatically include the DYL4INIT.
The user must remember to code the L header, LHR, and to place the copy statement right before the first D parameter.
----+----1----+----2----+----3----+----4----+----5----+----60 C 352 S 00352 F (4,7,CH,A) FA FH 1 FK F 80 K LHR COPY SIXTY4YR D 1 1 EQ1 VX'FF' SRT D 1 VD 1 U1 DSRT DYLSORT EL U,A * FOLLOWING PARAMETER SHOULD BRANCH TO EOJ NOT EOT *** D 2 U1 EQ2 VE EOJ D 1 U1 EQ1 VD REJ D 10 R00001 C 10 K2 D 7 A4 7 K20 D 1 V1 N +10 UC01 P OUTOUT D 1 10 UC01 P 10 UC02 P D 1 V0 N 10 UC01 P OUTOUT DEOJ 1 V2 1 UEOJ REJ END ----+----1----+----2----+----3----+----4----+----5----+----60