IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Blank in VB file after the length of the record


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sudhirk63

New User


Joined: 08 Oct 2006
Posts: 19
Location: Bangalore

PostPosted: Fri Nov 16, 2007 10:41 pm
Reply with quote

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
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Fri Nov 16, 2007 11:33 pm
Reply with quote

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
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Fri Nov 16, 2007 11:37 pm
Reply with quote

Why are you filling the record with anything, just set the record length to 452, that is reason for VB files.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Nov 16, 2007 11:46 pm
Reply with quote

Are you looking at the record in EDIT mode from TSO/ISPF ???

Because if you are, that is the problem.
Back to top
View user's profile Send private message
sudhirk63

New User


Joined: 08 Oct 2006
Posts: 19
Location: Bangalore

PostPosted: Sat Nov 17, 2007 12:17 am
Reply with quote

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
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Sat Nov 17, 2007 12:56 am
Reply with quote

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
View user's profile Send private message
sudhirk63

New User


Joined: 08 Oct 2006
Posts: 19
Location: Bangalore

PostPosted: Sat Nov 17, 2007 12:56 am
Reply with quote

Sorry guys, I found the mistake in my code.

100 lashes to me.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Nov 17, 2007 10:13 am
Reply with quote

Well, you've whipped yourself, so we shouldn't icon_smile.gif

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Store the data for fixed length COBOL Programming 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top