Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Is there any way to display a counter in the spool area

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
jwell rymbei

New User


Joined: 14 Dec 2005
Posts: 22
Location: India

PostPosted: Wed Mar 01, 2006 1:11 pm    Post subject: Is there any way to display a counter in the spool area
Reply with quote

Hi,
Is there any way to display a counter in the spool area. I want to display how many records my cobol program has processed. The counter should keep on increasing but it sould not be displayed in the next line in spool area. In a loop if we use display we can see the output in the spool area but in multiple lines.
Back to top
View user's profile Send private message

nuthan

Active User


Joined: 26 Sep 2005
Posts: 146
Location: Bangalore

PostPosted: Wed Mar 01, 2006 1:21 pm    Post subject:
Reply with quote

Hi,
I didnt got ur question . U can use the display of counter outside the loop. so that u can get the total no of records processed.
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Wed Mar 01, 2006 3:21 pm    Post subject: Re: display counter
Reply with quote

Quote:
Is there any way to display a counter in the spool area.

Yes, use simple DISPLAY statement.

Quote:
I want to display how many records my cobol program has processed. The counter should keep on increasing but it sould not be displayed in the next line in spool area. In a loop if we use display we can see the output in the spool area but in multiple lines.

I interpreted this text as, you want to print INPUT Counter at the end of the program, not every time counter get incremented.
So for this dont put DISPLAY statement inside the READ PARA.
DISPLAY ther final recoerd counter at the end of the program.

Regards,
Priyesh.
Back to top
View user's profile Send private message
jsk

New User


Joined: 20 Feb 2006
Posts: 12

PostPosted: Wed Mar 01, 2006 3:22 pm    Post subject:
Reply with quote

Hi,

You can use Display " ws-counter".
Ws-counter should be defined in the working storage section as pic 9(xx)
xx depends on your choise( no: of records in the file)
As what nuthan suggests if you use the counter outside the loop (where you read ) the final value accumulated will alone be displayed in the spool area.

Quote:
The counter should keep on increasing but it sould not be displayed in the next line in spool area

can you make clear what you meant by next line in spool area.

Corrections Welcomed
Back to top
View user's profile Send private message
jwell rymbei

New User


Joined: 14 Dec 2005
Posts: 22
Location: India

PostPosted: Wed Mar 01, 2006 3:55 pm    Post subject: Re: display counter
Reply with quote

Evrytime counter is incremented i want to display it but the in sysout there should not be multiple lines. Lets my pgm reads a file and based on some condtions it creates report. Say input file contains 100 records. out of it only 10 records matches the conditon. Now if i want to display a counter which should get incremented each time the pgm processes new records. Say pgm has processed 5 th record then sysout should look like
counter=5 not like below
counter=1
counter=2
counter=3
counter=4
counter=5

[/right]
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Wed Mar 01, 2006 4:17 pm    Post subject: Re: display counter
Reply with quote

Quote:
Evrytime counter is incremented i want to display it but the in sysout there should not be multiple lines.

How can it be possible... you want to display the counter every time it gets incremented and on the other hand you dont want to see multiple Lines..... You'll have to give up either one.....

I hope as per your need you should not DISPLAY counter after every READ INPUT.... Get it DISPLAYed at the end of the file.

Regards,
Priyesh.
Back to top
View user's profile Send private message
tksvv

New User


Joined: 17 Mar 2006
Posts: 6

PostPosted: Fri Mar 24, 2006 7:05 pm    Post subject: Re: Is there any way to display a counter in the spool area
Reply with quote

I think what the O/P wants is a display similar to the clock or odometer. The digits are replaced instead of displayed one below the other in a clock or odometer.

That is not possible in the spool as the spool is written sequentially.
Back to top
View user's profile Send private message
vicky10001
Warnings : 1

Active User


Joined: 13 Jul 2005
Posts: 136

PostPosted: Fri Mar 24, 2006 7:29 pm    Post subject:
Reply with quote

You can diaplay counter value after close file .then u will get processed record count
Back to top
View user's profile Send private message
vicky10001
Warnings : 1

Active User


Joined: 13 Jul 2005
Posts: 136

PostPosted: Fri Mar 24, 2006 7:35 pm    Post subject:
Reply with quote

Please check ur PM
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts Display FTP Session Count within TSO Yolanda Harvey TSO/ISPF 3 Fri Mar 10, 2017 10:31 pm
No new posts To display values of multiple rows in... vinu78 DB2 2 Thu Mar 09, 2017 1:20 pm
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am
No new posts Display ZEDLMSG without Pressing F1 &... anandgbe CLIST & REXX 8 Thu Dec 15, 2016 4:20 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us