Page 1 of 1

how to split based on specfied symbol?

PostPosted: Thu Aug 26, 2010 3:39 pm
by pahi
Hi,

Is it possible to split the file after every 3 @ symbol from my below file:
i/p file:
1email: <abc@gmail.com?
sdfgdfgfdgfgfs
shfghsgfhgfhg
sghfgshfghggh
fsgfhghfghfghgffdf

2email:<bcd@gmail.com>
ywretwretrt
eefwftwg
wefwtf
ewrwfr
wewyrfwffhd
wwgfhrfghf
wd

3email:<def@gmail.com>
ywretwretrt
eefwftwg
wefwtf
ewrwfr
wewyrfwffhd
wwgfhrfghf
wd

4email: <abc@gmail.com?
sdfgdfgfdgfgfs
shfghsgfhgfhg
sghfgshfghggh
fsgfhghfghfghgffdf

5email:<bcd@gmail.com>
ywretwretrt
eefwftwg
wefwtf
ewrwfr
wewyrfwffhd
wwgfhrfghf
wd


o/p file1:
1email: <abc@gmail.com?
sdfgdfgfdgfgfs
shfghsgfhgfhg
sghfgshfghggh
fsgfhghfghfghgffdf

2email:<bcd@gmail.com>
ywretwretrt
eefwftwg
wefwtf
ewrwfr
wewyrfwffhd
wwgfhrfghf
wd

3email:<def@gmail.com>
ywretwretrt
eefwftwg
wefwtf
ewrwfr
wewyrfwffhd
wwgfhrfghf
wd

o/p file2:
4email: <abc@gmail.com?
sdfgdfgfdgfgfs
shfghsgfhgfhg
sghfgshfghggh
fsgfhghfghfghgffdf

5email:<bcd@gmail.com>
ywretwretrt
eefwftwg
wefwtf
ewrwfr
wewyrfwffhd
wwgfhrfghf
wd

Re: how to split based on specfied symbol?

PostPosted: Fri Aug 27, 2010 12:08 am
by dick scherrer
Hello,

Not "with jcl". . .

You might do this with some utility or a program of your own.

Re: how to split based on specfied symbol?

PostPosted: Fri Aug 27, 2010 3:10 pm
by pahi
hi,

can I make use of Cobol program to do this? but I don't the cobol lang could u pls help me on this?

Regards,
Pallavi

Re: how to split based on specfied symbol?

PostPosted: Fri Aug 27, 2010 8:44 pm
by NicC
What programming language do you know? This may be more easily done using rexx - at least to get the design of the pogram.

Re: how to split based on specfied symbol?

PostPosted: Fri Aug 27, 2010 11:26 pm
by dick scherrer
Hello,

Yes, this could be done with COBOL (or another language).

How did this requirement originate?

Who involved with getting a solution is a programmer?