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

Count the number of characters in a field in Easytrieve


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Jag Badal

New User


Joined: 25 Jun 2020
Posts: 6
Location: UK

PostPosted: Fri Nov 04, 2022 5:52 pm
Reply with quote

Hello,

I'm new to easytrieve and I'm trying to figure out a way to count the number of characters in a field.

For Example - We have a XYZ field with 10 Characters. If the the data in this field is less than 5 characters i.e. 12345 then the O/P should look like XXXXXXXX45. If it has 10 characters i.e. ABCD567890 then the O/P should look like ABXX5XXX90.

Using Cobol, this would have been an easy ask - I would have used inspect and reference modification to achieve my goal. However, I need to write this piece of logic using easytrieve.

Is there a way to count the number of characters in a field in Easytrieve ?
Back to top
View user's profile Send private message
Jag Badal

New User


Joined: 25 Jun 2020
Posts: 6
Location: UK

PostPosted: Fri Nov 04, 2022 7:47 pm
Reply with quote

Never mind, resolved it.

Used a workaround for it i.e. arrays, looping and concatenation.

Thank you.
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 To get the count of rows for every 1 ... DB2 3
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Substring number between 2 characters... DFSORT/ICETOOL 2
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts To find whether record count are true... DFSORT/ICETOOL 6
Search our Forums:

Back to Top