View previous topic :: View next topic
|
Author |
Message |
anjani33 Currently Banned New User
Joined: 16 Mar 2007 Posts: 9 Location: pune
|
|
|
|
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 |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
anjani33 wrote: |
Hi..
Can we add headings dynamically? |
Yes, headings are just data and can be changed dynamically..... |
|
Back to top |
|
|
anjani33 Currently Banned New User
Joined: 16 Mar 2007 Posts: 9 Location: pune
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
anjani33 Currently Banned New User
Joined: 16 Mar 2007 Posts: 9 Location: pune
|
|
|
|
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 |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
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 |
|
|
VinayCM
New User
Joined: 06 Nov 2007 Posts: 36 Location: Bengaluru
|
|
|
|
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 |
|
|
balakrishna reddy
Active User
Joined: 13 Jul 2007 Posts: 128 Location: Guntur
|
|
|
|
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 |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
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 |
|
|
|