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

removing trailing zeros while copying from vsam to a vb file


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
shaktiprasad

New User


Joined: 20 Aug 2006
Posts: 34
Location: chennai

PostPosted: Mon Jun 08, 2009 5:12 pm
Reply with quote

Hi ,

I want to copy a vsam file(which has same avg record length and max record length) to a vb sequential file.

This vsam file has been copied from another vb file.I am doing some processing in the vsam and then want to copy it to another vb file.
so while copying trailing spaces are being copied to the vb file .
But don't want those trailing spaces.
How to do this while copying from vsam to vb file?
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Mon Jun 08, 2009 5:32 pm
Reply with quote

How do you verify that there are trailing spaces.
What do you use to copy the files.
Please show us examples.
Back to top
View user's profile Send private message
shaktiprasad

New User


Joined: 20 Aug 2006
Posts: 34
Location: chennai

PostPosted: Mon Jun 08, 2009 5:35 pm
Reply with quote

I am able to see the trailing spaces when I put HEX ON.it's showing 4040 while normal vb file it's showing nothing.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Mon Jun 08, 2009 5:37 pm
Reply with quote

In EDIt, VIEW or BROWSE ?
Back to top
View user's profile Send private message
shaktiprasad

New User


Joined: 20 Aug 2006
Posts: 34
Location: chennai

PostPosted: Mon Jun 08, 2009 5:42 pm
Reply with quote

expat wrote:
In EDIt, VIEW or BROWSE ?


In BROWSE.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Tue Jun 09, 2009 5:47 am
Reply with quote

Hello,

Quote:
I am doing some processing in the vsam and then want to copy it to another vb file.
so while copying trailing spaces are being copied to the vb file .
How did you create the copy?
Back to top
View user's profile Send private message
shaktiprasad

New User


Joined: 20 Aug 2006
Posts: 34
Location: chennai

PostPosted: Tue Jun 09, 2009 10:55 am
Reply with quote

dick scherrer wrote:
Hello,

Quote:
I am doing some processing in the vsam and then want to copy it to another vb file.
so while copying trailing spaces are being copied to the vb file .
How did you create the copy?


1st I copied from vb to vsam using sort with VTOF option in control card(when i am not using VTOF the job is abending showing in sysout that no RDW specified).
Then I am copying from vsam to another vb file using sort fields=copy.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Tue Jun 09, 2009 11:04 am
Reply with quote

VTOF converts the file from VB to FB. That could go a little way to explaining why you have the spaces at the end.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Tue Jun 09, 2009 11:18 am
Reply with quote

shaktiprasad,
Quote:
1st I copied from vb to vsam using sort with VTOF option in control card

You said you copied from VB to VSAM using VTOF; but VTOF as mentioned above is to convert from Variable To Fixed.
Can you tell what kind of "processing" you're doing here.

You can give a try adding this to your card to copy the file back to VB.
Code:
OUTFIL FTOV,VLTRIM=C' '
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Tue Jun 09, 2009 11:21 am
Reply with quote

And post some code and information regarding the VSAM and PS files.
LRECL, RECFM etc. etc.
Back to top
View user's profile Send private message
shaktiprasad

New User


Joined: 20 Aug 2006
Posts: 34
Location: chennai

PostPosted: Tue Jun 09, 2009 11:43 am
Reply with quote

what is this VLTRIM=C' ' exactly do?

hi my vb file has lrecl of 600 and vsam file has lrecl of 596.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Tue Jun 09, 2009 12:01 pm
Reply with quote

SyncSort for z/OS 1.2 Manual wrote:
VLTRIM Parameter (Optional)
The VLTRIM parameter defines a byte to be deleted from the end of a variable-length record. All prior occurrences of this byte will also be deleted until a byte that is not equal to the trim byte is found. The resulting records are decreased in record length. However, VLTRIM will not delete the first data byte, the ANSI carriage control character, or the Record Descriptor Word (RDW).
shaktiprasad,

If you're still facing issues, post the requested info before we proceed any further.
Back to top
View user's profile Send private message
shaktiprasad

New User


Joined: 20 Aug 2006
Posts: 34
Location: chennai

PostPosted: Tue Jun 09, 2009 3:00 pm
Reply with quote

Thanks Arun ,it worked.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Tue Jun 09, 2009 11:21 pm
Reply with quote

shaktiprasad wrote:
Thanks Arun ,it worked.
You're welcome
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Unable to interpret a hex value to De... COBOL Programming 4
No new posts how to eliminate null indicator value... DB2 7
No new posts VSAM LISTCAT INFORMATION JCL & VSAM 2
No new posts Format Binary file to EBCDIC JCL & VSAM 4
No new posts Binary File format getting change whi... All Other Mainframe Topics 7
Search our Forums:

Back to Top