Getting less records in physical file

1465 pts.
Tags:
AS/400
Physical File
I have a physical file has 10000 records, while read that file I'm getting only 8000 records. What is the reason? Thanks in advance.
1

Answer Wiki

Thanks. We'll let you know when a new response is added.

Check the file you are reading to see if any SELECT / OMIT criteria is defined in the DDS. This may be reducing the total record count for the job you are running. 

Discuss This Question: 8  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • deepu9321
    Hi,

    How are you trying to read the file? And, How are you saying that there are 10000 records.

    If you are saying that 10000 records based on RRN, There could be chance of records being deleted.

    Pradeep.
    4,980 pointsBadges:
    report
  • 9783444184
    Hi Deepu,
    I am reading a file                 
          read iimamt           
                    dow       not%eof(iimamt)  
                    eval      rrn=rrn+1        
                    if        rrn>150          
      rrn           dsply                      
                    endif                      
                    read      iimamt           
                    enddo                      
                            
    and i am checking record count through sql
    select count(*) from iimamt
    
    1,465 pointsBadges:
    report
  • 9783444184
    using dspfd iimamt

    Total records  . . . . . . . . . . . . . . :               10000 
    Total deleted records  . . . . . . . . . . :                0 
    1,465 pointsBadges:
    report
  • hunshabbir7
    strange. Check if there is some filter applied with file like COMP etc. 
    2,900 pointsBadges:
    report
  • deepu9321
    So, what does your code return to RRN variable at end of the loop.

    Make sure your DDS doesnt contain any Select or Omit Conditions.

    Paste your File DDS here, It'd help to find the reason.

    Pradeep.
    4,980 pointsBadges:
    report
  • aceofdelts

    Another unlikely but possible reason is if you actually have a 2nd file by that same name (in another library, of course). If your SQL reads one copy while your program reads the other copy then you can get this result.

    In general, one of your assumptions is wrong.

    2,550 pointsBadges:
    report
  • BigKat
    when your program is running is it called from a CL that might be doing an OPNQRYF and omitting some of the records? 
    9,460 pointsBadges:
    report
  • chowas400
    Can you read all members in a file? Default it reads first member records in a file.
    620 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: