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
 
Using Header3 subparameter of syncsort

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Using Header3 subparameter of syncsort
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: 6968
Location: porcelain throne

PostPosted: Wed May 19, 2010 5:19 pm    Post subject:
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    Post subject:
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    Post subject: Group n records of a file using syncsort
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

Senior Member


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

PostPosted: Wed May 19, 2010 7:09 pm    Post subject:
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:

http://www.ibmmainframes.com/viewtopic.php?t=41470&highlight=sections
http://www.ibmmainframes.com/viewtopic.php?t=41708&highlight=sections
http://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    Post subject:
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

Site Director


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

PostPosted: Wed May 19, 2010 7:43 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Wed May 19, 2010 7:46 pm    Post subject:
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: 683
Location: Pennsylvania

PostPosted: Wed May 19, 2010 7:48 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 7 Sat Jan 21, 2017 4:02 am
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am

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