Answered Questions

  • skip alternate records

    I have a seq file with 1000 records and I need to skip alternate records and write into a output file using cobol How can I do it

    RohitPd

    • Dec 12th, 2011

    It writes the first record and then skips a record and then writes the third record again, so basically were here writing the odd numbered records .i.e. when divided by 2 and the remainder is not equa...

  • COBOL File Handling

    how do you read a file in reverse order through COBOL program?

    sunny

    • Jun 28th, 2017

    Add a seq number to file thru JCL (1:seqnum,3,zd) and sort the file in descending order sortfields=copy, include cond=(1,3,zd,d) after this provide the file in Cobol as input.

    Gyanendra Singh

    • Jul 7th, 2016

    Can be done in VSAM : by using Low and HIGH-VALUE
    If you pass HIGH-VALUE to the key field, then it will read the record from bottom

  • If a simple cobol program has no syntax error, then is it necessary to compile it?

    krishna

    • Oct 11th, 2011

    Compilation converts the source code in to object code but the object code is not executable in mainframe environment so we need to link-edit it by using iewl............compilation is must for the programs to execute...............

  • What is the difference between COPY and INCLUDE

    Srinivas Enumula

    • Sep 8th, 2017

    Copy - Expand the copybook statements during compilation time.

    Include - Expand the copybook statements during pre-compilation time. Usually for DELGENS we use INCLUDE as DCLGEN statements needed during pre-compilation process.

    surya

    • Dec 31st, 2015

    Copy will be used in the cobol compile process and Include will be used during the Db2 precompile process. So we include a Dclgen. We cannot copy a dclgen..If so the program will fail the compilation.We can include a copybook too.

  • What is a clustered index?

    For a clustered index DB2 maintains rows in the same sequence as the columns in the index for as long as there is free space. DB2 can then process that table in that order efficiently.

    Amol

    • Sep 2nd, 2006

    Partitioned table is clustered by clustering index