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

How to split file into multiple files dynamically


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

New User


Joined: 17 Aug 2005
Posts: 22
Location: Pune

PostPosted: Fri Oct 23, 2009 2:03 pm
Reply with quote

I have a report file which contains multiple reports. I have to split them into separate reports and send through email. Reports are separated by asterisks. Eg:
Report:1
Date:2009-10-23
Data: AAAAA
*********************************************
Report:2
Date:2009-10-22
Data: AAAAACCC
*********************************************
Report:3
Date:2009-10-21
Data: AAAAABBB
*********************************************

Problem is this report file is created daily and number of reports are not fixed. On one day I can have only 2 reports and second day I can have 10. Is there way I can split these reports dynamically and use exactly same number of steps to send them through email. I need separate email for each report.

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

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Fri Oct 23, 2009 2:11 pm
Reply with quote

Quote:
Problem is this report file is created daily and number of reports are not fixed. On one day I can have only 2 reports and second day I can have 10. Is there way I can split these reports dynamically and use exactly same number of steps to send them through email

The way you are trying to achive it, may not be possible.

You can used COBOL program to do so.



1:Use dynamic dataset allocation routine and write each report in one dataset.
2:Send that dataset as attachment via email.
3:Repeat 1 & 2 till report dataset ends.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Fri Oct 23, 2009 2:23 pm
Reply with quote

if the issue is recurring and is crucial to Your organization operations
I would advice against a in house solution
there are tools that can do that in a much more effective fashion

decollate/collate/merge reports in any combination , print them/ email them/ store them in the appropriate form

google along the lines of ... report management and distribution
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Fri Oct 23, 2009 7:19 pm
Reply with quote

do not double post, please ...
Your other topic on the same subject has been deleted
if it is clear that You are using DFSORT then this topic will be moved where it belongs
thank You
Back to top
View user's profile Send private message
Debabrata Pruseth

New User


Joined: 11 Dec 2008
Posts: 59
Location: Pune , India

PostPosted: Fri Oct 23, 2009 11:59 pm
Reply with quote

enrico-sorichetti wrote:

google along the lines of ... report management and distribution


I remember one case where the requirement was similar in our organization . We didn't had knowledge about any report management and distribution utility so We created a REXX utility to read the input file and dynamically allocate multiple output files . The tool also submitted a JCl for each of the output file thus created.

Hope it helps Rahul.
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 How to split large record length file... DFSORT/ICETOOL 10
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Write line by line from two files DFSORT/ICETOOL 7
Search our Forums:

Back to Top