Q1) COBOL programs have 4 divisions – Identification, Environment, Data and procedure division
Q2) Max length to define a file name /variable name is 30 chars
Q3) In Identification divison, “Program-id Program-name.” is mandatory
Q4) In cobol-85, “Label Records are standard” (FB, 80 byte length) is optional. OS will take care if you do not mention it. For print files we need to mention “Label Records are Omitted”
Q5) “Block Contains 100 chars” is optional in cobol-85
Q6) “Filler” is optional, instead we can use a Blank field
Q7) Max limit for numeric is “18”. Max limit for Alpha is “160” chars.
Q8)”QUOTE”- To print quotation mark in the output, we need to code as follows.
05 Data-1 PIC X VALUE QUOTE 05 Data-2 PIC X(6) VALUE 'SPECIAL' ex: 'SPECIAL' ==> in the o/p we see quotation mark.
Q9) Perform para-1
Perform . . End-perform Perform until... Perform para-1 thru para-2 Perform n times
Q10) Search of two dimensional array:
Perform varying day-one 1 by 1 until day-one > 7 perform varying hour-one from 1 by 1 until hour-one > 24 Add (day-one, hour-one) to Total End-perform End-perform