IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Using Header3 subparameter of syncsort


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
TS70363

New User


Joined: 07 Apr 2010
Posts: 94
Location: Bangalore, India

PostPosted: Wed May 19, 2010 5:15 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed May 19, 2010 5:19 pm
Reply with quote

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
View user's profile Send private message
TS70363

New User


Joined: 07 Apr 2010
Posts: 94
Location: Bangalore, India

PostPosted: Wed May 19, 2010 5:57 pm
Reply with quote

There are no duplicate records.....

How do we create SECTIONS for a report?
Back to top
View user's profile Send private message
TS70363

New User


Joined: 07 Apr 2010
Posts: 94
Location: Bangalore, India

PostPosted: Wed May 19, 2010 6:16 pm
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed May 19, 2010 7:09 pm
Reply with quote

TS70363 wrote:
How do we create SECTIONS for a report?
Please search the "JCL" part of the forum on "SECTIONS" and work through the examples:

www.ibmmainframes.com/viewtopic.php?t=41470&highlight=sections
www.ibmmainframes.com/viewtopic.php?t=41708&highlight=sections
www.ibmmainframes.com/viewtopic.php?t=42022&highlight=sections
Back to top
View user's profile Send private message
TS70363

New User


Joined: 07 Apr 2010
Posts: 94
Location: Bangalore, India

PostPosted: Wed May 19, 2010 7:37 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Wed May 19, 2010 7:43 pm
Reply with quote

Hello,

Quote:
How do I accomplish this task??
How would you do this if you had to write actual code?
Back to top
View user's profile Send private message
TS70363

New User


Joined: 07 Apr 2010
Posts: 94
Location: Bangalore, India

PostPosted: Wed May 19, 2010 7:44 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed May 19, 2010 7:46 pm
Reply with quote

It may also help to see what the expected output looks like.
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Wed May 19, 2010 7:48 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Count Records with a crietaria in a f... DFSORT/ICETOOL 5
No new posts DFSORT/SYNCSORT/ICETOOL JCL & VSAM 8
No new posts Syncsort "Y2C" Function SYNCSORT 1
No new posts Arithmetic division using Syncsort SYNCSORT 6
Search our Forums:

Back to Top