SAMDFMT

The SAMDFMT routine converts a date from an internal format to a printable format based on the
View
standard date format. The internal date formats maintained in the database index records are either an unsigned packed Gregorian date or a packed Julian date. In the database index records, date fields are designated as YYYYMMDD or 0CYYDDD, which represent a Gregorian date or Julian date format, respectively.
view
The SAMDFMT routine converts a date from an internal format to a printable format based on the
View
standard date format. The internal date formats maintained in the database index records are either an unsigned packed Gregorian date or a packed Julian date. In the database index records, date fields are designated as YYYYMMDD or 0CYYDDD, which represent a Gregorian date or Julian date format, respectively.
Calling Parameters
  • Address of four-byte date to be formatted
  • Address of 10-byte area to receive the formatted date
  • Address of an optional one-byte input date format:
    'J' Julian date
    'D' Unsigned, packed Gregorian date
If omitted, an unsigned, packed Gregorian date is assumed.
Return Codes
Output Return Codes (general register 15):
  • 0
    Date formatted
Calling Example: Assembler
The following is an example using assembler:
. . . CALL SAMDFMT,(GCRADATE,PADATE),VL FORMAT ARCHIVE DATE . . . PADATE DS CL10 ARCHIVE PRINT DATE
Calling Example: COBOL
The following is an example using COBOL:
. . . 77 PADATE PIC X(10). . . . CALL 'SAMDFMT' USING GCRADATE, PADATE.