How to read a string byte by byte in a job
For example my input string will have a value of SACHIN, I want to read S first, A second, C third so on..
I want to take S character convert into binary, take A, convert into binary and add both binary numbers and take C convert into binary add the value to previous so on..The lenght of the input string is not fixed, I may get N number of bytes.
How to read byte by byte in DS
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Surely this is the simplest of C functions to write?
Initialize a integer to 0, step through your string from postion 0 to len-1 taking the character value and incrementing your integer.
Initialize a integer to 0, step through your string from postion 0 to len-1 taking the character value and incrementing your integer.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.