View previous topic :: View next topic
|
Author |
Message |
TS70363
New User
Joined: 07 Apr 2010 Posts: 94 Location: Bangalore, India
|
|
|
|
Hi,
I want to prepare a report where in 'N' records are reported in every section and 'M' sections in a Page.
I have coded as
Code: |
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL REMOVECC,
HEADER1=(30X;'SYNCSORT';30X),
HEADER2=(/,'DATE: ';DATE(DM4-),40X,'PAGE: ',PAGE=(M10,LENGTH=2)),
SECTIONS=(1,1,SKIP=P, *
HEADER3=(/,'ID',5X,'NAME',/))
/* |
For this sort card to work, I need to have a field which is common to every record. But my input file does not have any records in common.
How do I accomplish this task?? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Quote: |
I need to have a field which is common to every record. |
Quote: |
But my input file does not have any records in common. |
do you need common fields or common records.
from your comment, one can not tell. |
|
Back to top |
|
|
TS70363
New User
Joined: 07 Apr 2010 Posts: 94 Location: Bangalore, India
|
|
|
|
There are no duplicate records.....
How do we create SECTIONS for a report? |
|
Back to top |
|
|
TS70363
New User
Joined: 07 Apr 2010 Posts: 94 Location: Bangalore, India
|
|
|
|
Hi,
I have an input file (FB/LRECL =80) which has some 100s of records,
with no field values in common (no duplication of records).
The record can be maximum of 45 characters and rest all spaces.
I want to make a group of 15records and give a common label to those records at 72nd column say a sequence number.
Hence 1-15 records will have 00000001 from 72nd column, 16-30 will have 00000002 and so on.
I want to achieve this using SYNCSORT.
I just have an idea that this can be done using the INREC BUILD option but I am not sure how to do it. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
Back to top |
|
|
TS70363
New User
Joined: 07 Apr 2010 Posts: 94 Location: Bangalore, India
|
|
|
|
Hi Anuj,
I had gone through all the related post before posting my requirement.
Still any of the post does not meet my requirement.
I have already said that none of the records have any of the fields value in common.
also there is no such field which can be assumed as the key field which is required for SECTIONS
And even if we consider as per my example : ID as the key field, it does not have any values in common (Unique key sort of). And hence I am getting only single record on each section and one section on 1 page. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
How do I accomplish this task?? |
How would you do this if you had to write actual code? |
|
Back to top |
|
|
TS70363
New User
Joined: 07 Apr 2010 Posts: 94 Location: Bangalore, India
|
|
|
|
This is my input file
Code: |
10000ZZZZZZZZ
20000YYYYY
30000XXXXXX
35000BBBBBB
45000CCCCCCCC
66666DDDDDDD
70000EEEE
77777FFFFFF
88888DFDDFSDF
90000DFDFASGGF
95000DDDADF
99999KDKEI |
O/P what I get
Code: |
***************************** Top of Data ******************************
SYNCSORT
DATE: 19-05-2010 PAGE: 1
ID NAME
10000ZZZZZZZZ
DATE: 19-05-2010 PAGE: 2
ID NAME
20000YYYYY
DATE: 19-05-2010 PAGE: 3
ID NAME
30000XXXXXX
35000BBBBBB
DATE: 19-05-2010 PAGE: 4
ID NAME
45000CCCCCCCC
DATE: 19-05-2010 PAGE: 5
ID NAME
66666DDDDDDD
DATE: 19-05-2010 PAGE: 6
ID NAME
70000EEEE
77777FFFFFF
DATE: 19-05-2010 PAGE: 7
ID NAME
88888DFDDFSDF
DATE: 19-05-2010 PAGE: 8
ID NAME
90000DFDFASGGF
95000DDDADF
99999KDKEI |
Where as I want to make a group of 10 records and have one section, next 10 records in 2 section and so on........
And have 2 sections per page. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
It may also help to see what the expected output looks like. |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
How many records would you want in a section?
Why would you want those records in the same section if they are unique (different)?
Based on the information you have provided:
1) One record per section is correct
or 2) You do not need sections at all
or 3) something else |
|
Back to top |
|
|
|