As 400 Real Time Interview Questions

Here are COBOL interview questions and answers for fresher as well experienced candidates to get their dream job.

COBOL is abbreviated as Common Business Oriented Language and it is one of the oldest programming languages. It primarily used for business, finance and administrative systems for companies.

2 How to write files onto tape devices using the AS400 operating system?

The SAVLIB command is the one that should be used if you want to save libraries to tape media. Using the TAPDEV parameter is required in order for you to declare the name of the tape device that you are working with.

2 How to determine which records in a table are duplicates in the most time-effective method possible?

When searching for duplicate records inside a database, using the DISTINCT keyword is the most efficient way that may be used. Since this keyword will only return values that are fully unique, it will be quite easy to identify any instances of duplicate content.

1 What are Program Entry Procedures (PEP) and User Entry Procedures (UEP?

  • PEP, If a program is made up of numerous different modules, the question of which module should be executed first arises while the programs are being run. As a consequence of this fact, the name of the module that is supplied in PEP will be executed initially.
  • UEP, The control will then be transferred to the very first statement included within that module when the program is run for the first time.
  • 32) Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?

    TEST BEFORE is the default statement and the condition is checked before executing the instructions under Perform.

    2) What are the different data types in COBOL?

    There are three data types in Cobol:

  • Alpha-numeric (X)
  • Alphabetic (A) and
  • Numeric (9)
  • 13) What is the LOCAL-STORAGE SECTION?

    Local-Storage is allocated each time the program is called and will be de-allocated when the program stops via an EXIT PROGRAM, GOBACK, or STOP RUN. It is defined in the DATA DIVISION after WORKING-STORAGE SECTION

    4 It would be helpful if you could provide an example of the SETLL operation.

    When used with a search argument of factor-1, SETLL will position the file pointer at the first occurrence of the record when the value in the key field/RRN is greater than or equal to the search argument. File operations such as READ, READP,READPE, and READE are possible once the file pointer has been set. The file is moved to the end of the file if the SETLL operation fails (no records found condition). We can use the symbolic constants *LOVAL, *HIVAL, *START, *END, or the more concrete RRN VALUE, KEY VALUE, or KEY LIST in factor-1. To ascertain if the found record has a key field/RRN value that is larger than or equal to the key field, we use the %FOUND variable. The HI indicator will be “on” in this situation. Using %EQUAL, we check to see if the value of the key field or RRN in the found record matches the value of the search input in factor 1. Only the RRN number is required for a sequential file. Therefore, the EQ indicator will be *on in this scenario. An error indicator at the LO level or the operation code extension E can be used to deal with SETLL exceptions (file status codes higher than 1000). In the event of a 100% match, the Equal Indicator will light up. Thats a suitable replacement for %equal, actually (). HI level indication will be activated if a greater value match is obtained. Substitute this in for %found (). For files that arent encrypted with a key, *LOVAL will return an error. If SETLL succeeds, it turns EOF() *OFF if it is *ON; otherwise, it does not affect EOF() ().

    As400 Interview Questions

    Related Posts

    Leave a Reply

    Your email address will not be published. Required fields are marked *