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

To add four spaces at the end of each record in a VB file


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Vinay N.G

New User


Joined: 15 Sep 2008
Posts: 36
Location: Bangalore

PostPosted: Wed Jul 01, 2009 4:53 pm
Reply with quote

Here i have a requirement that i would like to add only 4 spaces at the end of each record for variable record length file using sort .

If the record in the file is equal to LRECL of that file then it should not add spaces.

4 Spaces to be added at the end of every record and then after padding 4 spacess it should have blanks until the LRECL.
Back to top
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Wed Jul 01, 2009 7:22 pm
Reply with quote

Vinay N.G wrote:
If the record in the file is equal to LRECL of that file then it should not add spaces.
Are you aware that each variable length record has a 4 byte RDW in the front? Therefore, the record size is probably equal to the LRECL (counting the extra 4 bytes).

You don't see the RDW prefix when viewing in ISPF so the record may appear to be short 4 bytes.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Jul 01, 2009 7:28 pm
Reply with quote

Quote:
4 Spaces to be added at the end of every record and then after padding 4 spacess it should have blanks until the LRECL.
Could you please explain what this means? Let us assume LRECL=604 so maximum record size is 600 bytes. The record is 307 bytes long. According to what you said, the last 293 bytes all need to be set to spaces (in case you are not aware, "blanks" is another term for "spaces" and both refer to hex '40' character of EBCDIC).
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Wed Jul 01, 2009 7:35 pm
Reply with quote

Just wondering the reason behind adding spaces / blanks at the end of a VB record.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Jul 01, 2009 7:41 pm
Reply with quote

expat, maybe somebody wants to test the FTPTRAILINGBLANKS option of TCPIP?
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Jul 02, 2009 12:52 pm
Reply with quote

/Bad-Day-Start on

Robert Sample wrote:
expat, maybe somebody wants to test the FTPTRAILINGBLANKS option of TCPIP?
This thought seems to be so distant from this thread per se. The way original question is posed it's hard to believe some one could think this intelligent.

/About off..not sure
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Jul 02, 2009 4:47 pm
Reply with quote

Quote:
The way original question is posed it's hard to believe some one could think this intelligent.
Anuj, methinks thou doth presume too much. icon_smile.gif Intelligent? No. Make-work? Possible. Reserving space for an upcoming change? Maybe.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top