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: 4
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: 4
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 S0C7 - Field getting overlayed COBOL Programming 2
No new posts Masking variable size field - min 10 ... DFSORT/ICETOOL 4
This topic is locked: you cannot edit posts or make replies. Construct new record using specific f... DFSORT/ICETOOL 6
No new posts COBOL Ascending and descending sort n... COBOL Programming 5
No new posts Split large FB file based on Key coun... DFSORT/ICETOOL 4
Search our Forums:

Back to Top