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

consider the following progrm statements MOVE 0 TO SW.NO.OF.REC PERFORM PRI-OUT UNTIL SW=1 DISPALY NO.OF.REC STOP RUN PRE-OUT READ IN-FILE AT END MOVE 1 TO SW WRITE OUO-REC FROM IN-REC ADD 1 TO NO.OF REC if the IN-FILE contains 1000 records what value will be displayedafter the PERFORM is over?assume that N0.OF.REC has PIC 9(4) a.1000 b.1001 c.1 d.none of the above since there is a syntex error

4 Answers   TCS,


What are differences between COBOL and java ? why we are giving more preference to COBOL ?

3 Answers   TCS,


I have a table with 3 dimensions like this : 01 ws-table 04 ws-page occurs 3 08 ws-column occurs 2. 12 ws-record occurs 20 pic x(40). How to code with PERFORM varying with 3 dimension...I forgot..

2 Answers   EDS,


If I want to increase the Limit in GDG. What should I do?

2 Answers   IBM,


What are various search techniques in cobol? Explain.

0 Answers  






What is the use of LINKAGE SECTION?

1 Answers  


suppose there is one PF having two members PF1 PF2.PF has one unique key Emp ID.could you tell me uniqueness in PF will be effective across members as well ? assume emp iD 3333 is in member PF1 would same Emp id be exist also in member PF2 ?

2 Answers   Tesco HSC, Wipro,


Why is it necessary that file needs to be opened in I-O mode for REWRITE?

0 Answers  


how you read control card into array?

3 Answers   HCL,


PERFORM ACCUMULATE-TOTALS VARYING A FROM 1 BY 2 UNTIL A >2 AFTER B FROM1 BY 1 UNTIL B>2 AFTER C FROM 2 BY -1 UNTIL C<2 How many times the paragraph ACCUMULATE-TOTALS would be exicuted?

5 Answers   TCS,


If by mistake we MOVE a working storage variable into LINKAGE area. What will happen??

4 Answers   Accenture,


in cobol main pgm is calling sub pgm but sub pgm does not exists , what abend i get if submit the job?

2 Answers   HSBC,


Categories