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

IEBGENER to copy from FB to VB and remove trailing blanks


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Mike.Fulton

New User


Joined: 11 Jun 2014
Posts: 22
Location: Canada

PostPosted: Sat Aug 24, 2019 7:20 am
Reply with quote

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

Global Moderator


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

PostPosted: Sat Aug 24, 2019 7:18 pm
Reply with quote

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

Active Member


Joined: 29 Apr 2008
Posts: 924
Location: Maryland

PostPosted: Mon Aug 26, 2019 6:36 pm
Reply with quote

Code:
 SORT FIELDS=COPY
 OUTFIL FTOV,VLTRIM=C' '
Back to top
View user's profile Send private message
Mike.Fulton

New User


Joined: 11 Jun 2014
Posts: 22
Location: Canada

PostPosted: Tue Aug 27, 2019 12:27 am
Reply with quote

Thanks @expat! I will look and see if wort is free with the OS or if you have to buy it.
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 -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts Revoke on DB2 to remove an user DB2 4
No new posts REMOVE DUPLICATE RECORDS BASED ON A S... DFSORT/ICETOOL 4
This topic is locked: you cannot edit posts or make replies. Copy list of files from PS to another... CLIST & REXX 11
No new posts How to remove this shortcut bar? TSO/ISPF 3
No new posts VSAM Open During Copy-Excessive EXCP ... JCL & VSAM 1
Search our Forums:

Back to Top