Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Breaking variable length string deleimiting by spaces

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL
Author Message
scorp_rahul22
Currently Banned

New User


Joined: 06 Aug 2007
Posts: 42
Location: chennai

PostPosted: Tue Apr 29, 2008 11:48 am    Post subject: Breaking variable length string deleimiting by spaces
Reply with quote

I want to parse string from input file

INPUT FILE (VARIABLE LENGTH)
-----------------------------------------

a b c d e fg hikl

OUTPUT
---------
I need to break above line into number of lines whenever space is encountered.(It can be one space as well as many spaces)

I want output as

a
b
c
d
e
fg
hikl


I want to know is this possible in SORT
Back to top
View user's profile Send private message
References
PostPosted: Tue Apr 29, 2008 11:48 am    Post subject: Re: Breaking variable length string deleimiting by spaces Reply with quote

PeD

Active User


Joined: 26 Nov 2005
Posts: 184
Location: Belgium

PostPosted: Tue Apr 29, 2008 11:51 am    Post subject:
Reply with quote

is SORT the mandatory way?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 2186
Location: Brussels once more ...

PostPosted: Tue Apr 29, 2008 11:51 am    Post subject:
Reply with quote

Certainly possible in REXX
Back to top
View user's profile Send private message
scorp_rahul22
Currently Banned

New User


Joined: 06 Aug 2007
Posts: 42
Location: chennai

PostPosted: Tue Apr 29, 2008 11:57 am    Post subject: Reply to: Breaking variable length string deleimiting by spa
Reply with quote

its not mandatory to do in SORT, but i am looking either in SORT , COBOL, EASYTRIEVE only
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 184
Location: Belgium

PostPosted: Tue Apr 29, 2008 12:07 pm    Post subject:
Reply with quote

Check in REXX with Words
Back to top
View user's profile Send private message
scorp_rahul22
Currently Banned

New User


Joined: 06 Aug 2007
Posts: 42
Location: chennai

PostPosted: Tue Apr 29, 2008 12:22 pm    Post subject: Reply to: Breaking variable length string deleimiting by spa
Reply with quote

I dont want the code in REXX
Back to top
View user's profile Send private message
UmeySan

Senior Member


Joined: 22 Aug 2006
Posts: 498
Location: Germany

PostPosted: Tue Apr 29, 2008 12:53 pm    Post subject:
Reply with quote

Use Cobol and have look in the Cob-Section, where you posted the same question.

If you don't like Cobol. use Assembler !
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 3804
Location: San Jose, CA

PostPosted: Tue Apr 29, 2008 9:14 pm    Post subject:
Reply with quote

Rahul,

What is the RECFM and LRECL of your input file? What do you want for the RECFM and LRECL of your output file?

What is the maximum number of fields in a record - your example shows 7 fields - how many can there actually be?

What is the maximum length of a field?

Is there only one record in the input file or can there be more than one?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL All times are GMT + 6 Hours
Page 1 of 1