[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: brain dead question



Your month array is too small.  If you enlarge the size, it will work.  You
may want to investigate why all of a sudden the array got blown out, but
that can wait until Monday if you are playing golf like me tomorrow.  As
long as it works for now.

Enjoy the weekend. . .

  - - Art


                -----Original Message-----
                From:   the dragon [mailto:ceprn@HOTMAIL.COM]
                Sent:   Thursday, October 21, 1999 2:19 PM
                To:     Multiple recipients of list SQR-USERS
                Subject:        brain dead question

                Guys, Gals, Others,

                OK, it's an hour before I go home for the weekend, and I
have been staring
                at this, and nothing is coming to mind.  Hopefully one of
you will have
                encountered this before..
                PS 5.12 HR
                Oracle 8
                SQR 3x

                error message in the log file :

                Exiting : DELETE PREVIOUS STS RUN
                Entering : LOAD LOOKUP TABLES  proc  1
                (SQR 2613) Loading 'alocalitymap' lookup table ... done.
348 rows loaded.
                Exiting : LOAD LOOKUP TABLES
                (SQR 1500) Array element out of range (201) for array
'month' on line 1361.

                SQR: Program Aborting.


                snippets d' code :

                calling program :
                *******************

                do delete-previous-sts-run('sts_initialization',
$global.run_id,
                                           $global.calendar_year,
$global.qtrcd) !
                stsdbsql.sqc.3

                do load-lookup-tables                            !
stsrtlcl.sqc.1
                                                                 ! Needs
$Effdt, sets
                                                           ! global lookup
var.


                ! -----------------------------------------------+
                ! -- PROGRAMMING NOTE --                         |
                ! Set the Global First and Last Day of the       |
                ! Quarter using PS date routines. Initialize the |
                ! Variables used by the PeopleSoft Get-Weeks and |
                ! Get-Hours routines.  See taxrntcl.sqc and      |
                ! tax002.sqr main. I use my global var's already |
                ! set instead of their method.  Set Period End   |
                ! Date in YMD Format from native.                |
                ! -----------------------------------------------+
                move '1' to $Year4
                move '-' to $DDelimiter
                do format-datetime($global.last_day_of_qtr, $periodenddate,
{DEFYMD}, '',
                '')
                ! proc

                ! -----------------------------------------------+
                ! -- PROGRAMMING NOTE --                         |
                ! Save the First day of quarter in YMD format    |
                ! from native.                                   |
                ! -----------------------------------------------+
                move '1' to $year4
                move '-' to $ddelimiter
                do format-datetime($global.first_day_of_qtr, $qtrbegindate,
{DEFYMD}, '',
                '')
                do dtu-dayofweek#($qtrbegindate, #qtrbeginweekday)
                if #qtrbeginweekday <> 1
                  let #begoffsetdays = #qtrbeginweekday - 1
                  do dtu-subtract-days($qtrbegindate, #begoffsetdays,
$earnsbegindate)
                else
                  move $qtrbegindate to $earnsbegindate
                end-if

                move '1' to $year4
                move '-' to $ddelimiter
                do format-datetime($earnsbegindate, $slctearnsbegindate,
{DEFYMD}, '',
                'native')
                do dtu-dayofweek#($periodenddate, #qtrendweekday)
                if #qtrendweekday <> 7
                  let #endoffsetdays = 7 - #qtrendweekday
                  do dtu-add-days($periodenddate, #endoffsetdays,
$earnsenddate)
                else
                  move $periodenddate to $earnsenddate
                end-if
                move '1' to $year4
                move '-' to $ddelimiter
                do format-datetime($earnsenddate, $slctearnsenddate,
{DEFYMD}, '', 'native')

                ! -----------------------------------------------+
                ! -- PROGRAMMING NOTE --                         |
                ! End PeopleSoft Routines Date Initialization.   |
                ! -----------------------------------------------+
                #debug1 show 'Init date earn begin/end: ' $earnsbegindate
',' $periodenddate
                #debug1 show 'Init date slct earn begin/end: '
$slctearnsbegindate ','
                $slctearnsenddate

                #debug show 'Exiting : STS INITIALIZATION'

                end-procedure ! STS INITIALIZATION

                **********************
                called sqc procedure :
                **********************

                begin-procedure Load-Lookup-Tables

                #debug9 show 'Entering : LOAD LOOKUP TABLES  proc  1'

                ! -----------------------------------------------+
                ! -- PROGRAMMING NOTE --                         |
                ! I tried to make local; but the load lookup     |
                ! didn't like it here.                           |
                ! -----------------------------------------------+

                ! -----------------------------------------------+
                ! -- PROGRAMMING NOTE --                         |
                ! THE GLOBALS used/set are :                     |
                ! -----------------------------------------------+
                let $Global.Local_Map_Lookup = {FALSE}
                let $EFFDT= $Global.EffDt

                begin-select

                count(*)                          &LOCAL_MAP_COUNT

                from ps_sts_local_map lp
                where lp.effdt          = (select max(effdt)
                                           from ps_sts_local_map
                                           where state    = LP.state
                                           and   locality = lp.locality
                                           and   effdt    <= $EFFDT )
                AND   lp.eff_status     = 'A'
                AND   lp.sts_local_code != ' '

                end-select

                if &LOCAL_MAP_COUNT < {MaxLocalMapLookup}
                  let $Global.Local_Map_Lookup = {TRUE}
                  let $sts_lookup_clause =
                           'lp.effdt = (select max(effdt) '
||
                           '            from ps_sts_local_map '
||
                           '            where state         = lp.state '
||
                           '            and   locality      = lp.locality '
||
                           '            and   effdt         <= ''' || $EFFDT
|| ''') ' ||
                           'and   lp.eff_status     = ''A'' '
||
                           'and   lp.sts_local_code != '' '' '

                  load-lookup
                            name=aLocalityMap
                            rows={MaxLocalMapLookup}
                           table='ps_sts_local_map lp'
                             key='lp.state || lp.locality'
                    return_value='lp.sts_local_code'
                           where=$sts_lookup_clause
                end-if

                #debug9 show 'Exiting : LOAD LOOKUP TABLES'

                end-procedure ! LOAD LOOKUP TABLES

                I am running with -debug1249, so I should get all the debug
statements.
                According to the log, it finishes load-lookup but never gets
to the next
                debug statement. So, I don't know where it's puking,
especially with an
                array called month...

                TIA
                clark

                ______________________________________________________
                Get Your Private, Free Email at http://www.hotmail.com