View previous topic :: View next topic |
Author |
Message |
sub1 Beginner
Joined: 09 Dec 2005 Posts: 5 Topics: 2
|
Posted: Fri Dec 09, 2005 12:05 pm Post subject: Page Break using sort |
|
|
Hi,
I am using SYNCSORT. I want to know how to insert a page break in a file after a specific word.
Everypage in my file has "Page n of N" starting from 60th column. I want to insert a page break once i reach the line. The number of lines per page varies. So I cannot go by the LINES=XX
Could you please help
Thanks |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Fri Dec 09, 2005 12:28 pm Post subject: |
|
|
sub1,
You can use SKIP=P on the Sections Parm to write on a new page. Show us an example and I will show you the control cards.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
sub1 Beginner
Joined: 09 Dec 2005 Posts: 5 Topics: 2
|
Posted: Fri Dec 09, 2005 12:41 pm Post subject: |
|
|
Kolusu,
I have a report in a file. The report looks like
Code: |
Shop Name
Report Name
------------------------------------------------------------------
Company Ledger Account Price Quantity Date
------------------------------------------------------------------
CC1 LLL1 ACC1 1.1 20 12/09/2005
CC2 LLL2 ACC2 2.1 21 12/08/2005
Page 1 of 100
Shop Name
Report Name
------------------------------------------------------------------
Company Ledger Account Price Quantity Date
-------------------------------------------------------------------
CC3 LLL5 ACC3 1.1 20 12/09/2005
CC2 LLL2 ACC2 2.1 211 12/08/2005
CC1 LLL2 ACC2 2.1 211 12/08/2005
CC4 LLL2 ACC4 5.5 111 12/08/2005
Page 2 of 100 |
I want a page break after every "Page n of N". This value start in 60th column.
Thanks for your help |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Fri Dec 09, 2005 1:42 pm Post subject: |
|
|
sub1,
Assuming that you input file is 133 bytes and has a FBA recfm , the following JCL will give you the desired results.
Code: |
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=YOUR INPUT REPORT,
// DISP=SHR
//SORTOUT DD DSN=YOUR OUTPUT PAGEBRK REPORT,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(CYL,(X,Y),RLSE)
//SYSIN DD *
SORT FIELDS=COPY
OUTREC FIELDS=(1:60,4,CHANGE=(1,C'PAGE',C'1'),
NOMATCH=(C' '),
2,132)
/*
|
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
sub1 Beginner
Joined: 09 Dec 2005 Posts: 5 Topics: 2
|
Posted: Fri Dec 09, 2005 2:47 pm Post subject: |
|
|
Thanks alot kolusu. Your solution worked. |
|
Back to top |
|
|
|
|