Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
IEBGENER to copy from FB to VB and remove trailing blanks

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
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    Post subject: IEBGENER to copy from FB to VB and remove trailing blanks
Reply with quote

Hi

I have been reading: https://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: 8784
Location: Welsh Wales

PostPosted: Sat Aug 24, 2019 7:18 pm    Post subject:
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: 541
Location: Maryland

PostPosted: Mon Aug 26, 2019 6:36 pm    Post subject:
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    Post subject: Reply to: IEBGENER to copy from FB to VB and remove trailing blanks
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    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Convert Numeric to Packed decimal and... anand1204 DFSORT/ICETOOL 5 Thu Aug 08, 2019 3:53 am
No new posts Copy physical Tape files to a Mainfra... Dadi Krishna Teja JCL & VSAM 11 Thu May 16, 2019 10:25 pm
No new posts To remove the spaces using SORT Card dharmaraok DFSORT/ICETOOL 1 Tue Apr 30, 2019 3:42 pm
No new posts How to copy\replace the members in pr... abdulrafi JCL & VSAM 6 Fri Mar 22, 2019 7:02 pm
This topic is locked: you cannot edit posts or make replies. Copy one file to possible multiple files dibyendumandal11111 SYNCSORT 9 Fri Mar 08, 2019 2:47 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us