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

How to remove spaces between variables using SORT?


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Selvarajars

New User


Joined: 21 Jun 2018
Posts: 7
Location: India

PostPosted: Fri Jul 27, 2018 3:58 pm
Reply with quote

Hi,

I need to remove spaces between variables. There is a possibility that single variable can have spaces in between, it should be removed.

Example:
I have a file which has records like below

123123 |ba12 12|jhajf afdjhsdakj asfdkjhkj |kashfdjhas |

My output should be something like this.

123123|ba12 12|jhajf afdjhsdakj asfdkjhkj|kashfdjhas|.


I have a delimiter as pipe symbol. The record length I am using is 1999, but still I will not get values upto 1999.

Could someone help me asap.

Thanks in advance.

Regards,
Selva N
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Fri Jul 27, 2018 4:15 pm
Reply with quote

What you want to do cannot be done by JCL. JCL does not manipulate data, it simply tells the OS that you want to run a program and the resources needed to do so. It is, also, not a VSAM question. Given those two points, why post in the JCL & VSAM part of the forum.
Topic moved to DFsort part of the forum because it can do what you want. If you do not have DFSort but have SyncSort then let us know and it will be moved to the taht part of the forum.

Look in the manual for something like "Spaces, Removing" in the index and SQZ.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3053
Location: NYC,USA

PostPosted: Fri Jul 27, 2018 4:48 pm
Reply with quote

Have you even tried once to Google this? If not then please do so since you will get many links and different ways how this is achieved.
Back to top
View user's profile Send private message
Selvarajars

New User


Joined: 21 Jun 2018
Posts: 7
Location: India

PostPosted: Fri Jul 27, 2018 4:51 pm
Reply with quote

Hi Nic,

Thanks for your guidance.

I tried with SQZ and it is not working. Can you please help me with the Manual you are referring.

Thanks.

Regards,
Selva N
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3053
Location: NYC,USA

PostPosted: Fri Jul 27, 2018 4:58 pm
Reply with quote

ibmmainframes.com/about65464.html
Back to top
View user's profile Send private message
Selvarajars

New User


Joined: 21 Jun 2018
Posts: 7
Location: India

PostPosted: Fri Jul 27, 2018 5:11 pm
Reply with quote

Hi Rohit,

Thanks a lot. Let me try this.

Regards,
Selva N
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Fri Jul 27, 2018 6:28 pm
Reply with quote

You might want to take a look at this one.

ibmmainframes.com/about47014.html
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2023
Location: USA

PostPosted: Fri Jul 27, 2018 10:58 pm
Reply with quote

Selvarajars wrote:
Hi Nic,

Thanks for your guidance.

I tried with SQZ and it is not working. Can you please help me with the Manual you are referring.

Thanks.

Regards,
Selva N

In this forum, people usually present their own solution they tried, including:
1) source code
2) input data
3) output data
4) clear explanation of initial requirements, what is wrong, and why?

And next step, they ask for help from the forum.

If there is none of above, you can rarely expect that only the most polite and very kind person would give you a ready-to-use solution.
Mostly the response will be: RTFM!
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top