View previous topic :: View next topic
|
Author |
Message |
ragava_b
New User
Joined: 06 May 2010 Posts: 29 Location: Hyderabad
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
You mean with the editor, or what? |
|
Back to top |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
With ISPF editor
Code: |
x all;f all ' ' 1;del all nx |
|
|
Back to top |
|
|
ragava_b
New User
Joined: 06 May 2010 Posts: 29 Location: Hyderabad
|
|
|
|
Hi,
I need to do with this in jcl... using like the dfsort or any other utility |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
ragava_b
New User
Joined: 06 May 2010 Posts: 29 Location: Hyderabad
|
|
|
|
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 |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Are you asking a different question now? |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Ta Daa!
A miracle has happened. You've been "healed". . .
d |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
ragava_b
New User
Joined: 06 May 2010 Posts: 29 Location: Hyderabad
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Do you mean the columns do not start in fixed positions/have fixed widths? If so, are they seperated by blanks? |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Quote: |
The reports are generated from sas
|
So tell SAS to only print the name column. |
|
Back to top |
|
|
ragava_b
New User
Joined: 06 May 2010 Posts: 29 Location: Hyderabad
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
And to Peter's suggestion? Why can't you just output the one column from the SAS program? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
ragava_b
New User
Joined: 06 May 2010 Posts: 29 Location: Hyderabad
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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:
|
|
Back to top |
|
|
|