Menu

Need help on comparing files in cobol

Anonymous
2021-07-18
2021-07-18
  • Anonymous

    Anonymous - 2021-07-18

    My pgm look like this...
    ====≠==

    main para.

    open input files
    initialize ip files
    perform process para

    close files
    ====≠
    In process para

    if eof2 =n
    process peform para
    endif

    if flagy
    perform write op1
    else
    wrie op2
    endif

    read file1

    ≠===========
    perform para.

    if in1=in2
    set flagy
    if in2>in1
    read file 2 until eof2 or in2>= in1
    if in1= in2
    set flagy
    else
    set flag n
    ≠===========

    i dont know what i am missing its not reading properly..pls help ..

    Thanks in advance!!

     
  • Vincent (Bryan) Coen

    The most obvious is :

    if eof2 =n

    should be eof2 = "n"
    and your code should have produced a error msg.

    I suggest you provide :

    1. The compiler versions and platform used.
    2. The souce code

    and register as a user on SF as your post may get held up waiting for one of the moderators to vet your posts.

     

Anonymous
Anonymous

Add attachments
Cancel