Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Need help in TRIM Function in Eazytrieve

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
View previous topic :: :: View next topic  
Author Message
gayathrinag

New User


Joined: 16 Oct 2008
Posts: 37
Location: chennai

PostPosted: Wed Sep 22, 2010 8:14 am    Post subject: Need help in TRIM Function in Eazytrieve
Reply with quote

Hi,

This is my requirement.

VAR A W 04 A
VAR B W 04 A
VARC W 08 A

VAR A have values like " ABCD" or "ABC "

VAR B can have values like "1234" or "123 ".

If i concatenate VAR A + VAR B = VAR C

Then I will get

"ABCD1234"

and "ABC 123 ".

In the "ABC 123 " result i have leading spaces. I wanted to remove these spaces.

Please help in solving this issue.

Thanks
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: Wed Sep 22, 2010 8:34 am    Post subject:
Reply with quote

Hello,

Define two arrays and move bytes from one array to the other bypassing the unwanted spaces.
Back to top
View user's profile Send private message
gayathrinag

New User


Joined: 16 Oct 2008
Posts: 37
Location: chennai

PostPosted: Wed Sep 22, 2010 9:03 am    Post subject:
Reply with quote

Hi Dick,

Thanks for the response. Can i have an example for this?

Thanks
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


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

PostPosted: Wed Sep 22, 2010 9:57 am    Post subject:
Reply with quote

RTFM
CA-Easytrieve/Plus Reference Guide Chapter 13
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: Wed Sep 22, 2010 7:20 pm    Post subject:
Reply with quote

Hello,

You are familiar with an array?

Once the combined field is built, redefine it with an array of one-byte items.

Then copy the array with new names. Then write a loop to move one byte at a time from the "input" to the "output" (bypassing the unwanted spaces). When the end of the input array is reached, the output array will contain the value you describe.

We will help you if you have problems, but we won't do the work for you.

If you do not have the documentation and your organization is licensed to use the product, all of the material may be downloaded free from CA SUpport.
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 -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts What is the Extract Function in JCL dharmaraok JCL & VSAM 3 Wed Jun 14, 2017 9:12 am
This topic is locked: you cannot edit posts or make replies. RANDOM Function in COBOL swapnil781 COBOL Programming 2 Tue Nov 15, 2016 6:17 pm
No new posts Check System time(Minute) Using TIME1... balaji81_k DFSORT/ICETOOL 5 Fri Nov 11, 2016 10:53 am
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 Strange EXEC function call in z/VM Willy Jensen CLIST & REXX 3 Wed Oct 05, 2016 2:07 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us