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

Need help in TRIM Function in Eazytrieve


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
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
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

Moderator Emeritus


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

PostPosted: Wed Sep 22, 2010 8:34 am
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
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: 2481
Location: Netherlands, Amstelveen

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

RTFM
CA-Easytrieve/Plus Reference Guide Chapter 13
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: Wed Sep 22, 2010 7:20 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts Calling an Open C library function in... CICS 1
No new posts DATE2 function SYNCSORT 15
No new posts Help on PL/I jsonPutValue function PL/I & Assembler 8
No new posts how to use Tso outtrap external function All Other Mainframe Topics 8
Search our Forums:

Back to Top