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

remove the empty spaces


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ragava_b

New User


Joined: 06 May 2010
Posts: 29
Location: Hyderabad

PostPosted: Mon Apr 30, 2012 4:09 pm
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Apr 30, 2012 4:19 pm
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: 792
Location: Chennai, India

PostPosted: Mon Apr 30, 2012 4:22 pm
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: 29
Location: Hyderabad

PostPosted: Mon Apr 30, 2012 4:29 pm
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Apr 30, 2012 4:33 pm
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: 29
Location: Hyderabad

PostPosted: Mon Apr 30, 2012 6:46 pm
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: 792
Location: Pennsylvania

PostPosted: Mon Apr 30, 2012 7:06 pm
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

Superior Member


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

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

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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Apr 30, 2012 7:28 pm
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

Moderator Emeritus


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

PostPosted: Mon Apr 30, 2012 9:05 pm
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Apr 30, 2012 10:11 pm
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

Moderator Emeritus


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

PostPosted: Mon Apr 30, 2012 11:01 pm
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Apr 30, 2012 11:12 pm
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: 29
Location: Hyderabad

PostPosted: Tue May 01, 2012 1:02 pm
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue May 01, 2012 1:15 pm
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: 2481
Location: Netherlands, Amstelveen

PostPosted: Tue May 01, 2012 1:18 pm
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: 29
Location: Hyderabad

PostPosted: Tue May 01, 2012 1:25 pm
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue May 01, 2012 1:36 pm
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

Moderator Emeritus


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

PostPosted: Tue May 01, 2012 9:27 pm
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: 29
Location: Hyderabad

PostPosted: Wed May 02, 2012 11:09 am
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
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed May 02, 2012 12:10 pm
Reply with quote

This is with DFSORT. Try it with your own Sort product, which you are keeping secret from us, for some reason.

Code:
//PARSEIT  EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTOUT  DD SYSOUT=*
//SYSIN DD *
  OPTION COPY
  INREC PARSE=(%=(ENDBEFR=BLANKS),
               %01=(ENDBEFR=BLANKS,FIXLEN=30)),
        BUILD=(%01)
//SORTIN DD *
SNO NAME AGE
1 SAB 12
2 RAM 18
3 KEN 34


Output:

Code:
NAME
SAB
RAM
KEN
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 -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Remove leading zeroes SYNCSORT 4
No new posts leading spaces can be removed in trai... DFSORT/ICETOOL 1
No new posts Cobol program with sequence number ra... COBOL Programming 5
No new posts Insert trailer for non empty file only DFSORT/ICETOOL 6
Search our Forums:

Back to Top