CULLUS14 checks for month values in the range 01-12, day values in the range 01-31, and year values in the range 00-99.
Example 1—Gregorian to Julian format
This example shows the CA Culprit parameters required to convert a Gregorian (mmddyy) date to a Julian (yyddd) date.
The following code:
IN 80 F 400 REC GREG-IN-DATE 1 6 2 990 JUL-DATE 0 990 GREG-DATE 0 993CULLUS14 9951*010 GREG-DATE FD HH 'GREGORIAN DATE' 9951*020 JUL-DATE FM '99.999' HH 'JULIAN DATE' 997300 MOVE GREG-IN-DATE GREG-DATE 997350 CALL US14 (GREG-DATE JUL-DATE)
REPORT NO. 99 CULLUS14 mm/dd/yy PAGE 1 GREGORIAN DATE JULIAN DATE 01/10/90 90.010 10/21/56 56.295 12/25/87 87.359 03/01/85 85.060 03/17/94 94.076 09/17/86 86.260 09/08/93 93.251
Example 2—System to Julian format
This example shows the CA Culprit parameters required to retrieve the system date and convert it to a Julian date.
The following code uses two user modules:
Three work fields are required:
IN 200 F 4000 REC NAME 5 25 REC BALANCE 160 7 3 DP=2 013CULLUS10 AND CULLUS14 010 CURR-DATE '2' 010 WORK-DATE 010 JUL-DATE 010 ZERO 01SORT JUL-DATE NOSORT 01OUT 80 D 01410001 ' ' 01420001 'DATE:' 01420007 JUL-DATE FM '99.999' 01510001 NAME HH 'NAME' 01510032 BALANCE HH 'BALANCE' 017010 CALL US10 (CURR-DATE WORK-DATE 0 0 0 0) 017020 IF CURR-DATE EQ 'E' 120 017100 CALL US14 (WORK-DATE JUL-DATE) 017120 ZERO / ZERO ZERO 017150 STOP
REPORT NO. 01 CULLUS10 AND CULLUS14 mm/dd/yy PAGE 1 DATE: 99.278 NAME BALANCE TERRY JANENS E 38,000.00 JOE NGUYA 31,000.00 MARK TIME 33,000.00 ROGER WILCO 80,000.00 ALBERT BREEZE 38,000.00 CAROLYN CROW 37,500.00 BURT LANCHESTER 54,500.00 RENE MAKER 85,000.00
Copyright © 2014 CA.
All rights reserved.
|
|