can any one give good example for cond 88 level number and for renames pls urgent dudes ?

Answers were Sorted based on User's Feedback



can any one give good example for cond 88 level number and for renames pls urgent dudes ?..

Answer / mk naidu

sorry for the above one, pls check the below answer for
renames.

01 EMP-REC.
02 EMP-INFO.
05 EMP-NO PIC X(10) VALUE 'SACHIN'.
05 EMP-NAME PIC X(10) VALUE 'GUNTUR'.
02 EMP-ALLOWANCE.
05 HR PIC 9999 VALUE '1500'.
05 PF PIC 9999 VALUE '1000'.
66 EMP-SAL-ALLOWANCE RENAMES EMPNO THRU PF.
PROCEDURE DIVISION.
DISPLAY EMP-SAL-ALLOWACE.

o/p:- all details from emp-no to pf will be grouped as
EMP-SAL-ALLOWANCES and displayed.

Is This Answer Correct ?    6 Yes 0 No

can any one give good example for cond 88 level number and for renames pls urgent dudes ?..

Answer / prashanth somu

the simple eg. for Renames,

01 emp-rec.
05 emp-fnm pic x(10).
05 emp-lnm pic x(15).
66 emp-Nm renames emp-fnm thru emp-lnm.

Is This Answer Correct ?    2 Yes 0 No

can any one give good example for cond 88 level number and for renames pls urgent dudes ?..

Answer / mk naidu

WORKING-STORAGE SECTION.
01 EMP-GENDER PIC X.
88 MALE PIC 'M'.
88 FEMALE PIC 'F'.
PROCEDURE DIVISION.
ACCEPT EMP-GENDER.
IF MALE
DISPLAY 'YOU ARE Mr.'.
ELSE
DISPLAY 'YOU ARE Ms.'.

you can find a simple example prog for condition name.

01 EMP-REC.
02 EMP-INFO.
05 EMP-NO PIC X(10) VALUE 'SACHIN'.
05 EMP-NAME PIC X(10) VALUE 'GUNTUR'.
02 EMP-ALLOWANCE.
05 HR PIC 9999 VALUE '1500'.
05 PF PIC 9999 VALUE '1000'.
66 EMP-SAL-ALLOWANCE EMPNO THRU PF.
PROCEDURE DIVISION.
DISPLAY EMP-SAL-ALLOWACE.

o/p:- all details from emp-no to pf will be grouped as
EMP-SAL-ALLOWANCES and displayed.

you can find a simple example for renames also.

Is This Answer Correct ?    0 Yes 4 No

Post New Answer

More COBOL Interview Questions

How do you define a table/array in COBOL?

5 Answers   Hexaware,


what is call by value and call by reference ?

3 Answers   Infosys, ITC Indian Tobacco Company,


01 a pic 9(3) value is 123 01 b pic 9(6) move a to b wht will be the value ? and 01 a pic x(6) value is abc 01 b pic x(3) move a to b wht will be the value ?

7 Answers   Patni,


how can we find total no of records in a file ....is there any utility......?

3 Answers   IBM,


what is scope terminator

2 Answers   IBM,






have in 100 records in a flat file i want to move records like 1,3,5,7,9,11,.. to Output file1 and 2,4,6,8,10,12,14 .. records moved to Output file2..Pls Provide real time answer..

5 Answers   TCS,


how do you define single dimensional array and multidimensional array in your cobol?

0 Answers  


What is the difference between working storage copybook and linkage section copybook?

5 Answers   TCS,


how do you reference the esds vsam file formats from cobol programs

0 Answers  


how can we apply for HSBC exam(Mainframe) in India??? i went to their site and was told to submit my CV ,. etc..( totally confusing...)

0 Answers   HSBC, Quest,


How do you submit JCL via a Cobol program?

5 Answers   IBM,


HI THIS IS ANIL. HOW TO PASS A RECORDS OF A FILE(PS OR PDS) TO AN ARRAY?

2 Answers  


Categories