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

SYNCSORT - Pushing the data onto next page.


IBM Mainframe Forums -> SYNCSORT
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mistah kurtz

Active User


Joined: 28 Jan 2012
Posts: 316
Location: Room: TREE(3). Hilbert's Hotel

PostPosted: Wed Apr 30, 2014 3:02 pm
Reply with quote

I have two files which I have to merge after adding the headers in both of them.

The files should be merged in such a way that data from 2nd file should always start from a new page.

Input File 1: 1st PART OF THE REPORT
Code:
AAA        10
BBB        20
CCC        30


Input File 2: 2nd PART OF THE REPORT
Code:
XXX        10
YYY        20
ZZZ        30


Final Report:
Code:
CODE      COUNT
AAA        10
BBB        20
CCC        30




<NEW PAGE>
ACCOUNT   COUNT
XXX        10
YYY        20
ZZZ        30

2nd part of the report should start from new page. All files are LRECL =133 and FB. And eac page has 55 lines.

I'm able to add headers, but not sure how to push the 2nd file on next page. I'm using SYNCSORT FOR Z/OS 1.4.1.0R

Thanks.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Fri May 02, 2014 1:39 am
Reply with quote

Define the output file as LRECL =133 and FBA.
The A in FBA means the printer expects that the first of the 133 character is a control code (such as SPACE for a single space, 1 for new page and so on...).

Browse a SYSPRINT file in SDSF (easily found in compile jobs), then hit the PF10 key (hopefully assigned to LEFT), you will see the control character appear.

So maybe you just need that output:
Code:
1CODE      COUNT
 AAA        10
 BBB        20
 CCC        30
1ACCOUNT   COUNT
 XXX        10
 YYY        20
 ZZZ        30
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Fri May 02, 2014 1:44 am
Reply with quote

the only problem that might emerge is that
the first page might not print correctly ...
it will probably have 56 lines ( 1 added line + the existing 55 )
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri May 02, 2014 2:13 am
Reply with quote

Write two separate reports and use a stapler.

Write two separate reports to DSNs and concatenate those where you need them as one report.

Are the headings to repeat on each page? If so, that would be a problem doing it in one shot anyway. It could be arranged, but why complicate it? Why do they need to actually be together in one dataset (spool or otherwise)?
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Fri May 02, 2014 11:45 am
Reply with quote

Hi Bill,
icon_question.gif
So many questions?
icon_wink.gif
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Fri May 02, 2014 11:49 am
Reply with quote

title wrote:
SYNCSORT - Pushing the data on next section.

What do you mean by that?
Back to top
View user's profile Send private message
mistah kurtz

Active User


Joined: 28 Jan 2012
Posts: 316
Location: Room: TREE(3). Hilbert's Hotel

PostPosted: Fri May 02, 2014 1:14 pm
Reply with quote

Hi All,

Thanks for your responses. Yesterday we had a holiday here in India. Sorry for replying late.

Quote:
SYNCSORT - Pushing the data on next section.

Sorry, that was a mistake. I meant on next page.

Quote:
Why do they need to actually be together in one dataset (spool or otherwise)?

It's the business requirement. Basically the reports are stored in a repositery and will be printed on a need to know basis.

Thanks for provinding the pointers. I will post the final solution once I got it working.
Back to top
View user's profile Send private message
mistah kurtz

Active User


Joined: 28 Jan 2012
Posts: 316
Location: Room: TREE(3). Hilbert's Hotel

PostPosted: Mon May 05, 2014 6:32 pm
Reply with quote

Hi,

I used the method sugegsted by Marso. But they want balnk lines to be explicitily added till the next page.

So as Bill suggested, I created two SORT step. In first file no of records will always be fixed. Apart from adding HEADER1, I also added TRAILER1=n/, to insert required blank lines in order to move the data from 2nd file on next page.

Thanks again for your help.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon May 05, 2014 6:43 pm
Reply with quote

The Repository may have/should have the ability to produce output of a "logical report" which consists of two (or more) "physical" reports.

If it can say "give me all the month-end reports" then it can say "give me the periodic-request-only-need-to-know-reports" which are defined as being your two reports. With or without wrappers produced by the Repository.

Hit the docs, ask the vendor. You may get lucky that way. If not, you may want to consider another Repository that can be easily customised:-)
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon May 05, 2014 6:52 pm
Reply with quote

Hi Marso,

Sorry, I also was away.

Yes. If something can be dealt with by simply not doing anything, I want to know why someone wants to do something to do it.

Someone came to me with a similar requirement once. I went to the user. They received three reports daily. It was the first and third report they wanted to be joined together. I asked why. They said they never used the second report, so had to throw it away. If the first and third reports were joined together, they could just ignore the second report rather than throwing it away, because throwing it away is a waste :-)

We just took the second report off their distribution list. Then they rang up the following day to thank us for joining up the two reports so quickly.

We do get asked to do stupid things at times, but that doesn't mean we always have to stupidly do them :-)
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 -> SYNCSORT

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
No new posts JCL EXEC PARM data in C Java & MQSeries 2
Search our Forums:

Back to Top