× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: problem with using D-specs in a procedure
  • From: "Joe Teff" <jteff19@xxxxxxx>
  • Date: Tue, 31 Aug 1999 13:52:46 -0500

An associate was trying to use some code shown in
Bob Cozzi's RPG IV book and it won't compile. I've looked
at it and don't see the problem. What am I missing?

Joe Teff

                                       
     **=============================================================**
     ** WEEKDAY( date )
     **  Return character form of day of week from input date
     **  Input date can be any valid date/date format
     **=============================================================**

     P WeekDay         B                   Export

     D WeekDay         PI            10A
     D  InputDate                      D   Const DatFmt(*ISO)

     D Days            DS
     D  Sunday                       10A   Inz('Sunday')
     D  Monday                       10A   Inz('Monday')
     D  Tuesday                      10A   Inz('Tuesday')
     D  Wednesday                    10A   Inz('Wednesday')
     D  Thursday                     10A   Inz('Thursday')
     D  Friday                       10A   Inz('Friday')
     D  Saturday                     10A   Inz('Saturday')
     D  Day                          10A   Dim(7) Overlay(Sunday)

     C                   Return    Day(DayOfWeek(InputDate))

     P WeekDay         E
    94 D Days            DS                                                     
                                 000000     009400
    95 D  Sunday                       10A   Inz('Sunday')                      
                                 000000     009500
    96 D  Monday                       10A   Inz('Monday')                      
                                 000000     009600
    97 D  Tuesday                      10A   Inz('Tuesday')                     
                                 000000     009700
    98 D  Wednesday                    10A   Inz('Wednesday')                   
                                 000000     009800
    99 D  Thursday                     10A   Inz('Thursday')                    
                                 000000     009900
   100 D  Friday                       10A   Inz('Friday')                      
                                 000000     010000
   101 D  Saturday                     10A   Inz('Saturday')                    
                                 000000     010100
   102 D  Day                          10A   Dim(7) Overlay(Sunday)             
                                 000000     010200


          A d d i t i o n a l   D i a g n o s t i c   M e s s a g e s
 Msg id  Sv Number Seq     Message text
*RNF7303 30    102 010200  Subfield DAY defined with keyword OVERLAY is too big;
                           specification ignored.
*RNF7503 30    104 010400  Expression contains an operand that is not defined.
 * * * * *   E N D   O F   A D D I T I O N A L   D I A G N O S T I C   M E S S 
A G E S   * * * * *


      WEEKDAY Field References:
         Field             Attributes         References (D=Defined M=Modified)
         INPUTDATE         D(10*ISO-)             92D    104
*RNF7031 DAYS              DS(70)                 94D
*RNF7031 SUNDAY            A(10)                  95D    102
*RNF7031 MONDAY            A(10)                  96D
*RNF7031 TUESDAY           A(10)                  97D
*RNF7031 WEDNESDAY         A(10)                  98D
*RNF7031 THURSDAY          A(10)                  99D
*RNF7031 FRIDAY            A(10)                 100D
*RNF7031 SATURDAY          A(10)                 101D
         DAY(7)            A(10)                 102D    104


                           M e s s a g e   S u m m a r y
 Msg id  Sv Number Message text
*RNF7031 00      9 The name or indicator is not referenced.
*RNF7303 30      1 Subfield defined with keyword OVERLAY is too big;
                   specification ignored.
*RNF7503 30      1 Expression contains an operand that is not defined.
       * * * * *   E N D   O F   M E S S A G E   S U M M A R Y   * * * * *


         * * * * *   E N D   O F   F I N A L   S U M M A R Y   * * * * *
Compilation stopped. Severity 30 errors found in program.
          * * * * *   E N D   O F   C O M P I L A T I O N * * * * *

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.