View previous topic :: View next topic
|
Author |
Message |
Mike.Fulton
New User
Joined: 11 Jun 2014 Posts: 22 Location: Canada
|
|
|
|
Hi
I have been reading: www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.idau100/u1127.htm and have had success in copying an FB dataset to a VB dataset (actually, an HFS file - but I think the problem is common to both an HFS file and VB dataset).
I have:
Code: |
//COPY EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=FULTONM.USER.JCL(FILE),DISP=SHR
//SYSUT2 DD PATH='/tmp/f',FILEDATA=TEXT,LRECL=84,RECFM=VB,BLKSIZE=32720
//SYSIN DD *
GENERATE MAXFLDS=1
RECORD FIELD=(80,1,,1)
/*
|
This works, but the records are padded out to 80 bytes (not surprisingly). Is there a way, short of writing a user exit, to instruct IEBGENER to truncate all trailing blanks when copying to a VB dataset? If not, is there an alternate utility I could use (other than the Unix System Services cp, which has other problems), to do this truncation? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
I would recommend using the SORT product at your site.
There are loads of examples of doing this and the other way round in the forum. |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2144 Location: USA
|
|
|
|
Code: |
SORT FIELDS=COPY
OUTFIL FTOV,VLTRIM=C' ' |
|
|
Back to top |
|
|
Mike.Fulton
New User
Joined: 11 Jun 2014 Posts: 22 Location: Canada
|
|
|
|
Thanks @expat! I will look and see if wort is free with the OS or if you have to buy it. |
|
Back to top |
|
|
|