Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

SYNCSORT - Pushing the data onto next page.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT
View previous topic :: :: View next topic  
Author Message
mistah kurtz

Active User


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

PostPosted: Wed Apr 30, 2014 3:02 pm    Post subject: SYNCSORT - Pushing the data onto next page.
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: 1219
Location: Israel

PostPosted: Fri May 02, 2014 1:39 am    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Fri May 02, 2014 1:44 am    Post subject: Reply to: SYNCSORT - Pushing the data on next section.
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7226

PostPosted: Fri May 02, 2014 2:13 am    Post subject: Reply to: SYNCSORT - Pushing the data on next section.
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: 1219
Location: Israel

PostPosted: Fri May 02, 2014 11:45 am    Post subject:
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: 1219
Location: Israel

PostPosted: Fri May 02, 2014 11:49 am    Post subject:
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: 268
Location: Room: TREE(3). Hilbert's Hotel

PostPosted: Fri May 02, 2014 1:14 pm    Post subject:
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: 268
Location: Room: TREE(3). Hilbert's Hotel

PostPosted: Mon May 05, 2014 6:32 pm    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7226

PostPosted: Mon May 05, 2014 6:43 pm    Post subject: Reply to: SYNCSORT - Pushing the data on next section.
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7226

PostPosted: Mon May 05, 2014 6:52 pm    Post subject: Reply to: SYNCSORT - Pushing the data on next section.
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    IBMMAINFRAMES.com Support Forums -> SYNCSORT All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am
No new posts How to move a long alphanumeric data ... lind sh COBOL Programming 6 Mon Dec 05, 2016 7:51 pm
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 6 Fri Dec 02, 2016 9:47 am
No new posts ODPP(Optim Data privacy Provider) Iss... Rama kishore IBM Tools 1 Mon Nov 07, 2016 5:46 pm
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us