What is COUNTERS in PL/1? How to assign the COUNTER
variables? WHich Data Type it can be used for this?

Answers were Sorted based on User's Feedback



What is COUNTERS in PL/1? How to assign the COUNTER variables? WHich Data Type it can be used for ..

Answer / nygrande

COUNT is a Builtin in PL/1.

SYNTAX:

I = COUNT (file-name);

EXAMPLE:

I = COUNT (PAYROLL);

It returns the number of data items transfered during the
last GET or PUT of the file PAYROLL.

Is This Answer Correct ?    1 Yes 0 No

What is COUNTERS in PL/1? How to assign the COUNTER variables? WHich Data Type it can be used for ..

Answer / sravan

To count number of operations occured we use counters.
DCL I FIXED BIN(15); /* DECLARATION of counter */
DCL eof bit(1) initial ('1'b);
DCL 1 var_b,
2 inrec char(2);
read file(filename) into(var_b);
Do while(!eof);
put skip list('Hi');
i = i + 1;
read file(filename) into(var_b);
end;

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More IBM MainFrame AllOther Interview Questions

can alternate index use in ESDS since it does not contain primary index? if yes can you explain?

2 Answers   iGate, Temenos,


what optimum values can we find for freespace, ci etc?

0 Answers   IBM,


Explain eib?

0 Answers  


WHAT ARE THE RETRIVAL ORDER OF FILES IN RPG&sql?

1 Answers  


When are scope terminators compulsory?

0 Answers  






tell me about impact analysis ?

1 Answers   IBM, Tech Mahindra,


What is meant by a bolt dispute?

0 Answers  


suppose I have 1000 rows in a db2 table. I want to update first 100 records, how do I do it?

0 Answers   IBM,


Explain foreign keys?

0 Answers  


how do we prepare test data using file-aid tool?

0 Answers   Syntel,


How an empty file to be checked?

0 Answers  


What is the meaning of a (new, catalog, keep) disposition mean?

0 Answers  


Categories