How to read subfile records in Cobol/400

620 pts.
Tags:
COBOL/400
Subfile
How to read/update/delete subfile records in cobal/400? I'm unable to read 2nd record. Please advise?
Read subfile dsp-file record into sflrec-i format is 'sflrec'

perform until file_status='10'

move ...
rewrite db-rec format is 'pfrec'
read subfile dsp-file next modified record into sflrec-i format is 'sflrec'
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 2  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.
  • bvining
    You don't provide a lot of information on what your problem is. When this type of question was asked in the past the reply given here might apply to you also.
    7,070 pointsBadges:
    report
  • chowas400

    Hi Bvining,

         Thank you for your speedy response..

    My question is i want to read  all screen(subfile) records.

    My subfile screen like below.

    2=UPDATE 4=DELETE

    ...............
    OPT  ENO   ENAME
     .................
     2    1201  MIKE
     2    1202  JAN
     4    1203  MCCAIN
          1204  JASMIN

    When i'm using below read statements, it  pic the first record and UPDATED and  its looping the same record.it's not come to the next record.

    In RPG  READC is working perfect, but in COBOL i don't know below read statements are working or not. Please help me.

     

    Read subfile dsp-file record into sflrec-i format is 'sflrec'

    (This read pic the first record)

    Read subfile dsp-file next modified record into sflrec-i format is 'sflrec'

    (this read pic the next record and looping the same record)

     

     

    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: