I need to understand in this two strings the last character "}" and "{":
00000000000500000}
00000000000281000{
Googoling..., i have undertand is a correspondence of + and - in COBOL, but i need to be sure for tath.
Tks.
COBOL .txt file...
-
- Administrator
- Posts: 78235
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: COBOL .txt file...
As far as I can tell, 00000000000500000} means -000000000005000000, and 00000000000281000{ means +000000000002810000
See EBCDIC to ASCII Conversion of Signed Fields
See EBCDIC to ASCII Conversion of Signed Fields
Best wishes,
Hans
Hans
-
- PlatinumLounger
- Posts: 4334
- Joined: 26 Apr 2010, 17:36
Re: COBOL .txt file...
HansV wrote:As far as I can tell, 00000000000500000} means -000000000005000000, and 00000000000281000{ means +000000000002810000
See EBCDIC to ASCII Conversion of Signed Fields
OK.. tks.
and if i want to process this string in vb6 how to change dinamiclly the signs and transform the string?
with a select case on the last charcater, or with replace, or...?
-
- Administrator
- Posts: 78235
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: COBOL .txt file...
I think you'd need to do something like this:
but I'm not a COBOL expert...
Code: Select all
MyVar = ...
Select Case Right(MyVar, 1)
Case "{"
MyVar = "+" & Left(MyVar, Len(MyVar) - 1) & "0"
Case "}"
MyVar = "-" & Left(MyVar, Len(MyVar) - 1) & "0"
End Select
Best wishes,
Hans
Hans