COBOL and Easytrieve Programming: Data Types, SORT, and Date Functions
Tests knowledge of mainframe programming including COBOL SORT statements, COMP/COMP-3 data types, array performance, and Easytrieve date functions and report generation
Questions
Keyword Functions are evaluated from
- Left to Right
- Right to left
- Middle
- second Character
Is it possible to get advance/Past date values thru Keyword Parms
- True
- False
Which symbol is used to ensure whether a valid date is returned or not
- $
- #
- &
- *
If the job run in November 2010 |EZCYMFP4| will return
- 201006
- 201007
- 201004
- 201005
|EZMSDSY| will return ( give answer MM-Month DD-Date YY -Year format)
- MM/DD/YY
- MM-DD-YY
- DD-MM-YY
- DD/MM/YY
Which one among the given data type is best if u need performance (need to save more CPU) for your arithmetic computations
- COMP
- COMP-3 SIGN LEADING
- COMP-1 SIGN LEADING
- COMP-3 SIGN LEADING SEPARATE
How the data +89 is stored internally if u use the data type COMP
- Ox4EF5 F9
- OxF8F9
- OxC5F9
- Ox0059
Where do we need to declare the sorting key ACCOUNT-NO for the following syntax SORT WORK-FILE ON ASCENDING KEY ACCOUNT-NO USING FILE-NAME-1 GIVING FILE-NAME-2
- WORK-FILE
- FILE-NAME-1
- FILE-NAME-2
- No need to declare
In a sort when the control transfers to the para TEST-ACCOUNT-PARA for the following syntax SORT FILE-NAME-1 ON ASCENDING KEY ACCOUNT-NO INPUT PROCEDURE IS TEST-ACCOUNT-PARA USING FILE-NAME-2 OUTPUT PROCEDURE IS WRITE-ACCOUNT-PARA GIVING FILE-NAME-3
- Before sort
- After sort
- For each record in the sort
- For the last record
Which is more efficient search, if your number of records is more and the input is sorted
- Binary Search
- Sequential Search
- Both a and b
- None
If you need performance which is the best for your array variable
- Using Index to access
- Using subscript to access
- Both a and b
- None of the above
How many bytes will be taken if you store your data +12345 in S9(05) comp-3
- 3 BYTES
- 4 BYTES
- 5 BYTES
- 2 BYTES
The only section that is mandatory in an easytrieve program
- Library section
- Environment definition
- Activity definition
- NONE OF THE ABOVE
The same variable name cannot be used in more than one file
- True
- False
The parameter used with the REPORT statement that can be used to sort the report based on a field
- SORT
- SEQUENCE
- CONTROL
- None of the above
The I/O statements that are used for random access
- READ and WRITE
- GET and PUT
- Both a and b
- None of the above
Any DB2 select query which is not part of the JOB INPUT SQL statement should be used as a cursor
- True
- False
The parameter LINESIZE used with the REPORT statement should have the length
- Equal to lrecl of the file
- Greater than lrecl of the file
- Equal to lrecl – 1
- Equal to lrecl + 1
While comparing files using MATCHED keyword, only one key field can be used
- True
- False
In case of controlled processing, the JOB statement should be defined as
- JOB INPUT SQL
- JOB INPUT NULL
- JOB INPUT filename
- None of the above