Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Can we add headings dynamically?

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

New User


Joined: 16 Mar 2007
Posts: 9
Location: pune

PostPosted: Fri Nov 16, 2007 3:01 pm    Post subject: Can we add headings dynamically?
Reply with quote

Hi..
Can we add headings dynamically?
I want to prepare month sheet. & headings are dates.
eg. 01020304...
Please give solutions for this.
Thanks.
Back to top
View user's profile Send private message

CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Fri Nov 16, 2007 3:17 pm    Post subject: Re: Can we add headings dynamically?
Reply with quote

anjani33 wrote:
Hi..
Can we add headings dynamically?
Yes, headings are just data and can be changed dynamically.....
Back to top
View user's profile Send private message
anjani33
Currently Banned

New User


Joined: 16 Mar 2007
Posts: 9
Location: pune

PostPosted: Fri Nov 16, 2007 4:41 pm    Post subject: Reply to: Can we add headings dynamically?
Reply with quote

hi murmohk1

ok. I am specify the details about my question.
The format is like

no. name. 01 02 03 04 & upto 30.

here we want increment & display both simultaneously for date.
this is heading for report. & it is presentee report.

eg.
Code:
no.name     01 02 03 04 05
01 abc       p  p  p  p  p
02 bca       p  a  p  p  p
03 cba       p  p  a  p  p
04 xyz       p  a  p  p  p


I think this explain is fine.

Thanks
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sat Nov 17, 2007 6:46 am    Post subject:
Reply with quote

Hello Anjani and welcome to the forums,

Quote:
I think this explain is fine.
Not yet.

Please post your example using the "Code" tag near the top of the reply panel. Also, please post more detail about your requirement. What you want to do is not clear.

When you post "data" it is a good idea to click Preview to see how your post will appear to the forum (rather than the screen where you type). When you are satisfied with the appearance and content, then click Submit.
Back to top
View user's profile Send private message
anjani33
Currently Banned

New User


Joined: 16 Mar 2007
Posts: 9
Location: pune

PostPosted: Mon Nov 19, 2007 2:08 pm    Post subject: Reply to: Can we add headings dynamically?
Reply with quote

Hi,
I had given the code according to my thinking.
I want to increase count & display it on same line.
Here every time value is displayed on next line.

IDENTIFICATION DIVISION.
PROGRAM-ID. SIMPLE.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 GROUP1.
05 DATES PIC 9(2) OCCURS 15.
05 CNT PIC 9(2) VALUE 1.

PROCEDURE DIVISION.
MOVE 1 TO DATES(CNT).
PERFORM VARYING CNT FROM 1 BY 1 UNTIL DATES(CNT) > 30
MOVE CNT TO DATES(CNT)
DISPLAY DATES(CNT)
END-PERFORM.
STOP RUN.

Thanks.
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Mon Nov 19, 2007 4:12 pm    Post subject:
Reply with quote

Anjani,

Quote:
PERFORM VARYING CNT FROM 1 BY 1 UNTIL DATES(CNT) > 30
MOVE CNT TO DATES(CNT)
DISPLAY DATES(CNT)
END-PERFORM.

Remove 'display' inside 'perform' loop. Provide DISPLAY DATES after 'end-perform' statement.
Back to top
View user's profile Send private message
VinayCM

New User


Joined: 06 Nov 2007
Posts: 36
Location: Bengaluru

PostPosted: Mon Nov 19, 2007 4:42 pm    Post subject:
Reply with quote

Quote:
05 DATES PIC 9(2) OCCURS 15.
Also i think you need to increase this clause to 30.... otherwise data overwritten may happen.....
correct me if i'm wrong...
Back to top
View user's profile Send private message
balakrishna reddy

Active User


Joined: 13 Jul 2007
Posts: 130
Location: Guntur

PostPosted: Mon Nov 19, 2007 4:43 pm    Post subject:
Reply with quote

Hi anjani,

Why don't you try with some header like

Code:


Working-storage section.
01 hd1.
     05 No   pic x(2) value "NO".
     05 Name pic x(15) value "NAME".
     05 d1 pic x(2).
     05 filler pic x(2) value spaces.
     05 d2 pic x(2).
     05 filler pic x(2) value spaces.
     ..
     ..
     ..
     

Which ever date you want move it into the day field, name and no according to your requirement.
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Mon Nov 19, 2007 4:46 pm    Post subject:
Reply with quote

Vinay,

Quote:
Also i think you need to increase this clause to 30.... otherwise data overwritten may happen.....
correct me if i'm wrong...


Good point Vinay.
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 Changing sort Card Dynamically vickey_dw DFSORT/ICETOOL 5 Sat Aug 19, 2017 2:33 pm
No new posts how to DYNAMICALLY write sort cond to... mohamedmubee COBOL Programming 13 Fri Aug 26, 2016 11:46 pm
No new posts PL/I: opening file w/ dynamically det... Sam Dodgers PL/I & Assembler 6 Wed Jul 27, 2016 4:05 pm
No new posts Changing UID dynamically in ACF2 newroad CA Products 2 Sat Oct 31, 2015 1:17 am
No new posts Pass data from panel to rexx dynamically tvinodkumar7 TSO/ISPF 8 Tue Jul 21, 2015 5:24 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us