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: 8796
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

Senior Member


Joined: 29 Apr 2008
Posts: 2144
Location: USA

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 Copy only TEXT or String from a record SYNCSORT 4
No new posts Use Copy Utility DB2 7
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts VB to VB copy - Full length reached SYNCSORT 8
No new posts Remove leading zeroes SYNCSORT 4
Search our Forums:

Back to Top