E@DBFINDnxt in LSF9

 3 Replies
 0 Subscribed to this topic
 17 Subscribed to this forum
Sort:
Author
Messages
Walter
Advanced Member
Posts: 22
Advanced Member
    I'm in the process of migrating our custom programs from 8.1 to LSF9. The following is from one of those programs which has been working fine 8.1



    C eval $FirstZAY = 'Y'

    C callp DN@DBPXZAY1(E@DBFINDbegrng)
    * Loop through Billing Header Records where status = 1

    * If applicable, apply Process Lever and/or Voucher Number filters
    C DOU dzay@notfound = TRUE or
    C dzay@notfound = FALSE and
    C (Dzaycmpny <> D@cmpny or
    C Dzayvchnbr <> D@vchnbr)
    C if $FirstZAY = 'N'
    C callp DN@DBPXZAY1(E@DBFINDnxt)
    C endif
    C eval $FirstZAY = 'N'

    Testing this in 9.0.1, the program crashes at DN@DBPXZAY1(E@DBFINDbegrng)
    with the following error, which trying to read the second record

    User Name: DSWK Job Name: PX120WK Queue Name: ACCLAWDEV
    BEGIN: Job Submitted: Thu Aug 19 12:43:54 2010

    Step 1: PX120 Started. . . . . .: Thu Aug 19 12:44:38 2010
    ** Creating .prt and .dtl files
    File LAWAPP9/BINVOICEDT.
    tsFindNxtDBRec error is File position not valid for nxt/prv find (114).
    Process ID . . . . . . .: 156767
    (StartJob) CALL PX120 Failed
    Elapsed Time: 00:04:42

    END: Job Ended: Thu Aug 19 12:48:36 2010

    Does anyone know if these IO routines have changed in LSF9
    Ragu Raghavan
    Veteran Member
    Posts: 476
    Veteran Member
      They did change in the Unix/Wndows env.

      Prior to LSF9, it was forgving. I could pair a FIND-BEGRNG with a FIND-NEXT.
      Now it forces me to match FIND-BEGRNG with FIND-NXTRNG.

      This looks like I-series/RPG. Don't know the syntax. You probably need to replace the callp DN@DBPXZAY1(E@DBFINDnxt) with a callp DN@DBPXZAY1(E@DBFINDnxtrng) or something.
      Walter
      Advanced Member
      Posts: 22
      Advanced Member
        Thanks. That's what I was suspecting. I'll give your suggestion a try and let you know how it works

        Your right in that is iSeries RPG and I wouldn't be at all surprised if it were changed too.
        Walter
        Advanced Member
        Posts: 22
        Advanced Member
          Looks like that worked. I paired up E@DBLOCKBEGRNG with E@DBLOCKNXTRNG; also E@DBFINDBEGRNG with E@DBFINDNXTRNG

          Program ran to normal completion and the results look good.

          Thanks for your help. The solution was not nearly as bad as I initially thought.