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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

I have program P1 which calls file F1 which has 100 records and following structure 001 .................. 002 .................. 003 .................. 098 .................... 099 ................... 100 .................... Now I want to read these files and write these records in file F2 in following manner. 001 ...... 051 ..... 002 ...... 052 ..... 003 ...... 053 ..... .......... ....... .......... ....... .......... ....... 048 ........ 098 ...... 049 .......... 099 ....... 050 .... 100 ......

10628


Have you used comp and comp-3 in your project? And how?

2008


Name some of the examples of COBOl 11?

2686


When is inspect verb is used in cobol?

679


here is my requirement A1 is alphanumeric with value 'A1B2C3D4' as defined below 05 A1 PIC X(8) VALUE IS 'A1B2C3D4' but i need to have A2,A3 as ABCD & 1234 repectively...... A2 = ABCD A3 = 1234 Can you please explain me what are the different ways to do it?

6836






What are INPUT PROCEDURE and OUTPUT PROCEDURE?

691


What is the difference between goback, stop run and exit program in cobol?

932


What are the different types of condition in cobol and write their forms.

660


Why did you choose to work with ibm mainframe cobol programming?

631


What are literals?

632


I have to write to a outfile where the number of records in that file should be the header of that file using IMS.. can anyone help me in this issue

1933


Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?

720


What is a report item?

741


) How do u handle errors in BMS macro

1512


What is the difference between PIC 9.99 and 9v99 in COBOL?

734