View previous topic :: View next topic
|
Author |
Message |
Vinay N.G
New User
Joined: 15 Sep 2008 Posts: 36 Location: Bangalore
|
|
|
|
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 |
|
|
Bill Dennis
Active Member
Joined: 17 Aug 2007 Posts: 562 Location: Iowa, USA
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Just wondering the reason behind adding spaces / blanks at the end of a VB record. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
expat, maybe somebody wants to test the FTPTRAILINGBLANKS option of TCPIP? |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
/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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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. Intelligent? No. Make-work? Possible. Reserving space for an upcoming change? Maybe. |
|
Back to top |
|
|
|