what is subscript in cobol?give realtime example?

Answer Posted / jagan kumar

it is a number of occrances of array data name. subscript is
coded in working-storage section with separate variable.
example.
01 g1.
02 ele pic x(3) occurs 10 times.
01 i pic 99.
procedure division.
perform varying i from 1 by 1 until i > 10
accept ele(i)
display ele(i)
end-perform.
in this is case i is a subscript variable

Is This Answer Correct ?    9 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Whats the difference between search & search ALL?

5233


How to get the last record in vsam file in cluster? And how can you get the ksds file records into your cobol program?

639


What is the default value(s) for an initialize and what keyword allows for an override of the default?

682


INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?

404


System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..

1577






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

725


Explain how you can characterize tables in cobol?

634


Can you please let me know the centre name of INS certification in Kolkata.

1706


Write down the divisions of cobol program?

659


how to refer the data field?

1793


Write a program to explain size error.

665


What is the compute verb? How is it used?

649


Our issue is there seems to be a disconnect, or no link, between our SELECT statement and our SD. We had SELECT SORT-FILE and SELECT SORT-FILE ASSIGN TO SORTWRK. ASSIGN TO SORTWRK1 SORTWRK2 SORTWRK3 SORTWRK4. with SD SORT_FILE RECORD CONTAINS 7833 CHARACTERS. In either case, at run time, the system ignored our SORTWRK# DD statements and allocated 16 sort works with the SORTWK## naming convention. Any ideas why the system does not recognize the connection? We do not even need the SORTWRK DD statements. Thanks

2320


I have one ps file in which there are 3 fileds emp_no,emp_name and leave_app.this ps file information give the detail of employee which is going to apply for leave.suppose emp_no=113430,emp_name=ajay,leave_app=1 that means he is going to apply for 1 day leave.and accordingling the table in db2 will be updated means if he has that no of leave in his account then he will get dat leave and updated acc. in table(leave_balance=previous leave present in table-leave_app).Now i want to check whther the updated result is correct or not by comparing the two ps file using IEBCOMPARE or icetool so what is going to be the two ps file and how its is going to be compare.

1998


How can we find that module can be called – whether DYNAMICALLY or STATICALLY?

701