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

Breaking variable length string deleimiting by spaces


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

New User


Joined: 06 Aug 2007
Posts: 42
Location: chennai

PostPosted: Tue Apr 29, 2008 11:48 am
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
PeD

Active User


Joined: 26 Nov 2005
Posts: 459
Location: Belgium

PostPosted: Tue Apr 29, 2008 11:51 am
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: 8797
Location: Welsh Wales

PostPosted: Tue Apr 29, 2008 11:51 am
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
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: 459
Location: Belgium

PostPosted: Tue Apr 29, 2008 12:07 pm
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
Reply with quote

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

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Tue Apr 29, 2008 12:53 pm
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 Developer


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

PostPosted: Tue Apr 29, 2008 9:14 pm
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
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 Store the data for fixed length COBOL Programming 1
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top