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 All times are GMT + 6 Hours
Forum Index -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts IBM IMU Utility for Easytrieve Code t... IBM Tools 0
No new posts Identify and write records containing... SYNCSORT 11
No new posts To Unstring spaces in a field COBOL Programming 3
No new posts Identify Number of Multivolume Dataset All Other Mainframe Topics 5
No new posts IBM HPU 5.2 - Converting EBCDIC Chara... DB2 0
Search our Forums:


Back to Top