Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

removing trailing zeros while copying from vsam to a vb file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: removing trailing zeros while copying from vsam to a vb file
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: 8593
Location: Back in jolly old England

PostPosted: Mon Jun 08, 2009 5:32 pm    Post subject:
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    Post subject: Reply to: removing tariling zeros while copying from vsam to
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: 8593
Location: Back in jolly old England

PostPosted: Mon Jun 08, 2009 5:37 pm    Post subject:
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    Post subject:
Reply with quote

expat wrote:
In EDIt, VIEW or BROWSE ?


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

Site Director


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

PostPosted: Tue Jun 09, 2009 5:47 am    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Tue Jun 09, 2009 11:04 am    Post subject:
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: 2161
Location: @my desk

PostPosted: Tue Jun 09, 2009 11:18 am    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Tue Jun 09, 2009 11:21 am    Post subject:
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    Post subject:
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: 2161
Location: @my desk

PostPosted: Tue Jun 09, 2009 12:01 pm    Post subject:
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    Post subject:
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: 2161
Location: @my desk

PostPosted: Tue Jun 09, 2009 11:21 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us