Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ 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 & VSAM
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    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

PeD

Active User


Joined: 26 Nov 2005
Posts: 456
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: 8593
Location: Back in jolly old England

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: 456
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

Active Member


Joined: 22 Aug 2006
Posts: 755
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: 7130
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 11 Tue May 16, 2017 2:20 pm
No new posts Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Length of Tape file Mohan Kothakota JCL & VSAM 9 Thu Apr 20, 2017 10:24 pm
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us