View previous topic :: View next topic
|
Author |
Message |
sudhirk63
New User
Joined: 08 Oct 2006 Posts: 19 Location: Bangalore
|
|
|
|
Hello,
I am trying to write data to a VB file. The record length is known to me.
My problem is I get X'40' after the length of the record. I need to get X' ' after the length of the record.
I am initializing the varaible with Initialize keyword and am using string to move the data into the last variable.
Still I keep getting the X'40' after the record length.
The file is of length 1000 and the record length is 452. Hence I should not be seeing X'40' after 453 position.
I have only two variables for any record to be written out to the VB file.
01 RECORD-ID PIC 9(4)
01 RECORD-DATA PIC X(996)
Could any one suggest what am I missing to achive the result.
Thanks.
Sudhir |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
sudhirk63 wrote: |
Hello,
I am trying to write data to a VB file. The record length is known to me.
My problem is I get X'40' after the length of the record. I need to get X' ' after the length of the record.
I am initializing the varaible with Initialize keyword and am using string to move the data into the last variable.
Still I keep getting the X'40' after the record length.
The file is of length 1000 and the record length is 452. Hence I should not be seeing X'40' after 453 position.
I have only two variables for any record to be written out to the VB file.
01 RECORD-ID PIC 9(4)
01 RECORD-DATA PIC X(996)
Could any one suggest what am I missing to achive the result.
Thanks.
Sudhir |
X'40' is what intialize would put in the record. Try
MOVE ALL 'X' TO RECORD-DATA. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
Why are you filling the record with anything, just set the record length to 452, that is reason for VB files. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Are you looking at the record in EDIT mode from TSO/ISPF ???
Because if you are, that is the problem. |
|
Back to top |
|
|
sudhirk63
New User
Joined: 08 Oct 2006 Posts: 19 Location: Bangalore
|
|
|
|
Even when i am in browse mode I can see trailing spaces. In the input file when I put hex on , value is X' '.
I am not sure I got this :
MOVE ALL 'X' TO RECORD-DATA.
This will put the literal 'X' in all the places. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
sudhirk63 wrote: |
Even when i am in browse mode I can see trailing spaces. In the input file when I put hex on , value is X' '.
I am not sure I got this :
MOVE ALL 'X' TO RECORD-DATA.
This will put the literal 'X' in all the places. |
There is not such thing as x'' or x' '! The hex representation of any single byte value consists of of TWO character from the set of '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'. |
|
Back to top |
|
|
sudhirk63
New User
Joined: 08 Oct 2006 Posts: 19 Location: Bangalore
|
|
|
|
Sorry guys, I found the mistake in my code.
100 lashes to me. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Well, you've whipped yourself, so we shouldn't
Thank you for posting that you've found/fixed the problem. If you mention what the fix was, it may help someone else later.
d |
|
Back to top |
|
|
|