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
 

 

remove the empty spaces
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
ragava_b

New User


Joined: 06 May 2010
Posts: 26
Location: Hyderabad

PostPosted: Mon Apr 30, 2012 4:09 pm    Post subject: remove the empty spaces
Reply with quote

Hi,

can any one help me on this ....i want to remove the empty spaces in between them

like my i/p is like this
01/03/12 41

02/03/12 41

04/03/12 41

05/03/12 41

06/03/12 41

the o/p must be like

01/03/12 41
02/03/12 41
04/03/12 41
05/03/12 41
06/03/12 41

Kindly help me on this
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Mon Apr 30, 2012 4:19 pm    Post subject: Reply to: remove the empty spaces
Reply with quote

You mean with the editor, or what?
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 785
Location: Chennai, India

PostPosted: Mon Apr 30, 2012 4:22 pm    Post subject:
Reply with quote

With ISPF editor
Code:
x all;f all '           ' 1;del all nx
Back to top
View user's profile Send private message
ragava_b

New User


Joined: 06 May 2010
Posts: 26
Location: Hyderabad

PostPosted: Mon Apr 30, 2012 4:29 pm    Post subject: remove the empty spaces
Reply with quote

Hi,

I need to do with this in jcl... using like the dfsort or any other utility
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Mon Apr 30, 2012 4:33 pm    Post subject: Reply to: remove the empty spaces
Reply with quote

If your records are a fixed length, this should get you going (untested).

Code:
  OPTION COPY
  OMIT COND=(1,1,CH,EQ,C' ')


If variable

Code:
  OPTION COPY
  OMIT COND=(5,1,CH,EQ,C' ')


Unless you have the "magic" zero-length records (which only have an RDW, no data) but that is unlikely....
Back to top
View user's profile Send private message
ragava_b

New User


Joined: 06 May 2010
Posts: 26
Location: Hyderabad

PostPosted: Mon Apr 30, 2012 6:46 pm    Post subject:
Reply with quote

Hi,

i need to extract the particular column in the ps file ...
i dont know the column filelds

like my I/P is

sno name age
1 sab 12
2 ram 18
3 ken 34

so now i need to copy the column name from my i/p file to the o/p file

o/p file look like

name

sab
ram
ken

Kindly help me on this issue
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 645
Location: Pennsylvania

PostPosted: Mon Apr 30, 2012 7:06 pm    Post subject:
Reply with quote

Quote:
Kindly help me on this issue


You NEED to state your requirements better.

Your first post was so very unclear:
Did you mean blank spaces or empty lines?
Why did you post in TSO/ISPF when you really wanted a sort solution?
Is this next 'requirement' related to the previous one?
Is this to be done in sort as well?
Is the name column always start in the same place? Where?
Is this name field always the same length? How long?

The help you really need is to learn how to be very specific in a industry that requires it.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon Apr 30, 2012 7:06 pm    Post subject:
Reply with quote

Are you asking a different question now?
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Mon Apr 30, 2012 7:28 pm    Post subject: Reply to: remove the empty spaces
Reply with quote

If your records are a fixed length, this should get you going (untested).

Code:
  OPTION COPY
  INREC BUILD=(colstart,collength')


If variable

Code:
  OPTION COPY
  INREC BUILD=(1,4,colstart+4,collength')

EDIT: Please use the Code tags.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Apr 30, 2012 9:05 pm    Post subject:
Reply with quote

Hello,

Which sort product is used on the system (probably DFSORT ICE+ messages or Syncsort WER+ messages)?

Your topic will be moved when we know where to place it. . .
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Mon Apr 30, 2012 10:11 pm    Post subject: Re: Reply to: remove the empty spaces
Reply with quote

Quote:

EDIT: Please use the Code tags.


Physician heal thyself.

Note to self. Don't "paste" and expect the Code tags to still be there. Again, use Preview, even when you know it's not needed, because it often is anyway :-)
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Apr 30, 2012 11:01 pm    Post subject: Reply to: remove the empty spaces
Reply with quote

Ta Daa!

A miracle has happened. You've been "healed". . . icon_cool.gif

d
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Mon Apr 30, 2012 11:12 pm    Post subject: Reply to: remove the empty spaces
Reply with quote

Hi Dick,

Thanks. Appreciate it.

Is there anything you can do about my Secondary School French homework? It needed a miracle then, and didn't get one. Maybe now? :-)
Back to top
View user's profile Send private message
ragava_b

New User


Joined: 06 May 2010
Posts: 26
Location: Hyderabad

PostPosted: Tue May 01, 2012 1:02 pm    Post subject:
Reply with quote

Hi

I want to copy the particular column using column name ...

The reports are generated from sas ....the column positon are not permanent so it need to be extract using only column name

i/p is like
sno name age
1 sab 12
2 ram 18
3 ken 34

the name column is not start at the same place and its not permanent

my requirement to copy only the name column

o/p is like

name

sab
ram
ken

can we do this by sort or any other mainframe utility ?
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Tue May 01, 2012 1:15 pm    Post subject: Reply to: remove the empty spaces
Reply with quote

Do you mean the columns do not start in fixed positions/have fixed widths? If so, are they seperated by blanks?
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Tue May 01, 2012 1:18 pm    Post subject:
Reply with quote

Quote:

The reports are generated from sas


So tell SAS to only print the name column.
Back to top
View user's profile Send private message
ragava_b

New User


Joined: 06 May 2010
Posts: 26
Location: Hyderabad

PostPosted: Tue May 01, 2012 1:25 pm    Post subject:
Reply with quote

Hi BIll,

yes the columns do not start in fixed position but it have the fixed width and it seperated by blanks
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Tue May 01, 2012 1:36 pm    Post subject: Reply to: remove the empty spaces
Reply with quote

And to Peter's suggestion? Why can't you just output the one column from the SAS program?
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue May 01, 2012 9:27 pm    Post subject:
Reply with quote

Hello,

Maybe you should show some sample input data and the output you want from that sample input.

You still have not mentioned which sort product is in use on your system.

If i understand what you want (and it is possible that i do not), it is rather basic and straightforward. It sounds like you are adding unnecessary complexity. . .
Back to top
View user's profile Send private message
ragava_b

New User


Joined: 06 May 2010
Posts: 26
Location: Hyderabad

PostPosted: Wed May 02, 2012 11:09 am    Post subject:
Reply with quote

Hi Dick,

I want to copy the particular column using column name ... because the position of the column is not fixed but the length is fixed

so i need to be extract or copy using only column name

I have dfsort and icetool in my system

The sample I/P is

sno name age
1 sab 12
2 ram 18
3 ken 34

my requirement to copy only the name column only

o/p file look like

name

sab
ram
ken

it can be done by sort or any other utility kindly advice me
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 -> TSO/ISPF All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts To trim spaces in a pipe delimited da... Nish84 COBOL Programming 16 Mon Oct 10, 2016 1:54 pm
No new posts Removing Extra Spaces in a comma sepa... Puspojit DFSORT/ICETOOL 3 Tue Sep 13, 2016 7:46 am
No new posts Remove Special Characters from Mainfr... Rodger Zhang All Other Mainframe Topics 6 Wed Jul 06, 2016 1:12 am
This topic is locked: you cannot edit posts or make replies. how to find if file is empty or not. abdulrafi DFSORT/ICETOOL 5 Tue May 17, 2016 4:39 pm
No new posts Remove header only knobi SYNCSORT 5 Mon Feb 15, 2016 10:42 pm


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