how to split based on specfied symbol?



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

how to split based on specfied symbol?

Postby pahi » Thu Aug 26, 2010 3:39 pm

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
pahi
 
Posts: 27
Joined: Wed Apr 01, 2009 3:27 pm
Has thanked: 0 time
Been thanked: 0 time

Re: how to split based on specfied symbol?

Postby dick scherrer » Fri Aug 27, 2010 12:08 am

Hello,

Not "with jcl". . .

You might do this with some utility or a program of your own.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: how to split based on specfied symbol?

Postby pahi » Fri Aug 27, 2010 3:10 pm

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
pahi
 
Posts: 27
Joined: Wed Apr 01, 2009 3:27 pm
Has thanked: 0 time
Been thanked: 0 time

Re: how to split based on specfied symbol?

Postby NicC » Fri Aug 27, 2010 8:44 pm

What programming language do you know? This may be more easily done using rexx - at least to get the design of the pogram.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: how to split based on specfied symbol?

Postby dick scherrer » Fri Aug 27, 2010 11:26 pm

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?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post