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

What is the purpose of Identification Division?

1 Answers  


Why we need to use redefine clause when we can define the variable seperately... what is actual need....

5 Answers   Accenture,


I know my query will return more than one row but I don't want cursor what should I do?

1 Answers  


how will you define vsam file in select clause?

3 Answers   Patni,


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

0 Answers  






IDENTIFICATION DIVISION. PROGRAM-ID. MOVEPGM. DATA DIVISION. WORKING-STORAGE SECTION. 01 WS-I PIC 9(2). PROCEDURE DIVISION. A1000-MAIN-PARA. PERFORM PARA-X WITH TEST BEFORE UNTIL WS-I= 5 STOP RUN. PARA-X. DISPLAY "BEST2". I m getting error s722,while executing the program, seems getting in loop, can anybody tell me why

3 Answers  


How to resolve the soc4 & soc7 other than following answers. Soc4 can resolved using mispleed dd name and dd name is not matching with file and soc7 check the sysdump and copy the offest address then correct it in the program.

10 Answers   ADP, Amdocs, Cap Gemini, Keane India Ltd, Super Value, 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,


what is the use of filler in cobol programing?

4 Answers   MAT,


what happens if parmparameter passes zero bytes to the program

0 Answers   HSBC,


Name the divisions in a COBOL program ?

7 Answers  


i have 10 names in an array and my name is one of them also array is not in sorted order i need to display my name using index how will i do this

0 Answers  


Categories