Convert text to hexadecimal11/26/2023 ![]() ![]() Replace this X'0A' by X'2B' ? (if yes, why ?) Now things get a bit messy and you have to explain exactly what you need to do (not what you want). This string contains some text, and each time the user hit the enter key there is a X'0A' (line feed) in the text. This program receives as input a 1000 bytes long string. ![]() Take a deep breath, gather your thoughts, then talk to us again. Please vardhan0007, you need to relax first. So (for example), if the 1000-byte area had equaled all SPACES (X'40'), the 2000-byte area now contains all C'40' (X'F4F0'). INSPECT WS-2000-BYTE-REC CONVERTING X'FAFBFCFDFEFF' You can probably experiment and convert 8-bytes to 16-bytes at a time, but that's up to you. This will convert the hex-values in a 1000-byte area (on the fly) to their 2-byte equivilent in a 2000-byte area, one byte at a time. If yes, again I am putting a hex value X'2B' but I need to put 2B (char) Why not just search the input for X'0A' and replace it with X'2B'?Ĭan I directly inspect the 1000 byte field(chare field) for X'0A' and replace with X'2B' Please let me know if you require mor info. So what i need to do is i need replace that special charector to the word 2B. I did a hex on and observed that "0A" is in that. In text which is comming to cobol code i can its comming as some special charector. Meaning when the user ahs pressed enter key. SdfkhaskfjhalshdfjsdhfhlafjladsfhkjdshafkdlashfkjsdhĢ)lsdhfdsfyuidhuiaseyrefuioerfefrefhsdhfu435927894fewjfioedfcsdjlf I am recieving 1000 bytes of text from front end appplication as below.ġ)asdaskldjaskldjaskjdaslfjljflasdhfhafhljsfhkjsfhlafkasfhsdkjf You need to clarify your requirement - using acceptable IT terms,īefore anyone can provide you with ideas on how to accomplish your task.Īctually my requirement is. Or are you talking about converting ansii to ebcdic? Now, do you mean that you want to display in two bytes, Methinks a little more explanation would be nice.Ĭonvert the text in to hexadecimal format Why do you want to double the number of bytes used to store the data again. Why does it need to be represented in 'X format. Now i need convert the data which is in ws-input-text to hexadecimal and move it to another file. Input text : abcdefghijklmnhguookansjdkaksĠ1 ws-input-text pic x(1000) values spaces. Please anyone let me know whether there is any function in cobol will do this. I will be recieving around 1000 bytes o f text from front end (may be from windows text box) i need to convert the text in to hexadecimal format. I have a rquirement to convert text to hexadecimal format. How to convert text to hexadecimal format. ErrorsĬonvert a numerical or enumeration value to a string.Ĭalculate numerical/enumerated value of a string.Ĭonvert integer to string with binary representation.How to convert text to hexadecimal format. only the cnt rightmost nibbles are taken into account) To have a complete representation of a Longint-type value, 8 nibbles are needed, i.e. HexStr returns a string with the hexadecimal representation of Value. HexStr Ĭonvert integer value to string with hexadecimal representation.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |