NOENIMIES
asked on
NEED TO REMOVE SPACE BEFORE THE TAB DELIMITER
THE CODE ATTACHED INSERTS THE TAB CHARACTER BEWTEEN THE FIELDS BUT IT IS PRECEEDED BY A SPACE (IT ACTUALLY TURNS OUT TO BE X"0009".
HOW DO I ELIMINATE THE SPACE?
HOW DO I ELIMINATE THE SPACE?
You're including FIELD-1 by size. It seems that perhaps the non-null characters in FIELD-1 are one character less than the actual size of FIELD-1 so the trailing character in FIELD-1 is X'00'. Try changing DELIMITED BY SIZE to DELIMITED BY X'00' and see if that corrects your issue.
How are field-1 and field-2 defined?
~bp
~bp
ASKER
Defined as PIC X.
I also tried to redefine as s9 display, neither worked
I also tried to redefine as s9 display, neither worked
ASKER
Sorry I misunderstood, the fields in the string are PIC X or literals
ASKER
01 HEX-09-CREATE.
02 FILLER VALUE +09 PIC S9(02) COMP.
01 HEX-09X REDEFINES HEX-09-CREATE.
02 HEX-09 PIC X(01).
02 FILLERXX PIC X(01).
Put the above code in Working Storage, then in the Procedure Division simply
MOVE HEX-09 TO SOME-FIELD.
I found the abov eon your WEBSITE but it doesn't work either....
02 FILLER VALUE +09 PIC S9(02) COMP.
01 HEX-09X REDEFINES HEX-09-CREATE.
02 HEX-09 PIC X(01).
02 FILLERXX PIC X(01).
Put the above code in Working Storage, then in the Procedure Division simply
MOVE HEX-09 TO SOME-FIELD.
I found the abov eon your WEBSITE but it doesn't work either....
On Line 4 you spelled SIZE wrong.
ASKER
that was pseudo code to make the illustration, the actual code has no compiler errors
What is the exact entry in the data division for field-1 (including its picture) and what value does field-1 have at the start of the STRING statement?
...the fields in the string are PIC X or literals
I don't quite understand that statement. If it's a "field", then it can't also be a "literal". Which is it?
The actual STRING statement and the data definitions are needed. Pseudo-code isn't useful here.
What platform are you compiling on? What compiler are you running?
Tom
I don't quite understand that statement. If it's a "field", then it can't also be a "literal". Which is it?
The actual STRING statement and the data definitions are needed. Pseudo-code isn't useful here.
What platform are you compiling on? What compiler are you running?
Tom
ASKER
cobol32 on windows/xp
ASKER
micro focus..not fujitsu
Did you try it this way?:
01 HEX-09-CREATE.
02 FILLER VALUE +09 PIC S9(02) COMP.
01 HEX-09X REDEFINES HEX-09-CREATE.
02 FILLERXX PIC X(01).
02 HEX-09 PIC X(01).
FWIW, I don't see any code attached to the first post, but it seems like others do, so maybe it's just me somehow.
James
James
I don't see any code attached to the first post...
I see a data definition; but so far there is no code to show what is being done, as far as I can see. That would explain some confusion that I have. I simply can't see any attached code.
Tom
I see a data definition; but so far there is no code to show what is being done, as far as I can see. That would explain some confusion that I have. I simply can't see any attached code.
Tom
BTW, note that X"0009" is a valid (Unicode) value for a (horizontal) TAB character.
Tom
Tom
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.