MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Create as many output files as different Account numbers

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
seekaysk
Beginner


Joined: 31 Aug 2007
Posts: 49
Topics: 15

PostPosted: Thu Sep 27, 2007 12:53 pm    Post subject: Create as many output files as different Account numbers Reply with quote

Hi,

I have some unique requirement.

My Input file (FB) is somewhat like this:

Code:
some1 records.............
 1234 ...................
some2 records.............
*************************
some3 records.............
 2345 ...................
some4 records.............
*************************
some5 records.............
 1234 ...................
some6 records.............
*************************
some7 records.............
 4567 ...................
some8 records.............
*************************


The marker "some records" are not constants. I mean, they may be 1 record or 2 records or more.

The only thing fixed is : the Account numbers (e.g. 1234, 2345, etc..) location and the record breakers "*************".

The requirement is to create different output files for different account numbers.

the output should be like:

output 1:

Code:
some1 records.............
 1234 ...................
some2 records.............
*************************
some5 records.............
 1234 ...................
some6 records.............
*************************


output 2:

Code:
some3 records.............
 2345 ...................
some4 records.............
*************************


output 3:

Code:
some7 records.............
 4567 ...................
some8 records.............
*************************


Can anybody help me with this.

Thanks.
Back to top
View user's profile Send private message
CICS Guy
Intermediate


Joined: 30 Apr 2007
Posts: 292
Topics: 3

PostPosted: Thu Sep 27, 2007 1:47 pm    Post subject: Reply with quote

How many different "Account numbers" can you have?
Back to top
View user's profile Send private message
seekaysk
Beginner


Joined: 31 Aug 2007
Posts: 49
Topics: 15

PostPosted: Thu Sep 27, 2007 2:02 pm    Post subject: Reply with quote

It can be many. Even I don't know. Depends on how the input file comes to me. Is this really necessary ?
_________________
Thanks.
Back to top
View user's profile Send private message
CraigG
Intermediate


Joined: 02 May 2007
Posts: 202
Topics: 0
Location: Viginia, USA

PostPosted: Thu Sep 27, 2007 2:27 pm    Post subject: Reply with quote

seekaysk wrote:
It can be many. Even I don't know. Depends on how the input file comes to me. Is this really necessary ?

If you receive a file with 5000 account numbers you will create 5000 files. Is this really necessary?
Back to top
View user's profile Send private message
seekaysk
Beginner


Joined: 31 Aug 2007
Posts: 49
Topics: 15

PostPosted: Thu Sep 27, 2007 2:32 pm    Post subject: Reply with quote

CraigG, thanks.

1. Actually I need to send these files via emails. so I need them as different output files.

2. I can say the different no. of Account numbers will be max. 50. But then does it really need hard-coding of 50 output files ?

Thanks.
_________________
Thanks.
Back to top
View user's profile Send private message
CICS Guy
Intermediate


Joined: 30 Apr 2007
Posts: 292
Topics: 3

PostPosted: Thu Sep 27, 2007 5:45 pm    Post subject: Reply with quote

seekaysk wrote:
Actually I need to send these files via emails. so I need them as different output files.
Thanks....Now you have to look at the problem from a different direction....
Instead of seperate files, why not wrap the data with the email stuff and create one output that is then emailed (SPAM? Shocked ).....
Back to top
View user's profile Send private message
hchinnam
Beginner


Joined: 04 Feb 2005
Posts: 31
Topics: 10

PostPosted: Fri Sep 28, 2007 5:23 am    Post subject: Reply with quote

Why don't you go for a program.
Back to top
View user's profile Send private message
vkphani
Intermediate


Joined: 05 Sep 2003
Posts: 483
Topics: 48

PostPosted: Fri Sep 28, 2007 5:33 am    Post subject: Reply with quote

Do you have * as delimiter?
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group