Joined: 08 Feb 2008 Posts: 82 Location: Bangalore, India
I have a Variable blocked PS file of length 5264. We are increasing the record length of the file to 8264.
For data testing purpose i have to cut the file from 8264 to 5264, I am using a selcopy for the same.
In the file the last 1100 bytes length are not certain and is varies.
In the selcopy to clear the data of the record after writing to the new file of 5264 i am moving Spaces (' ') to the worklength.
As the file is VB the empty space at the end of each record is blanks but after moving spaces it showing as X'40'
Could you please help how to move blanks in the selcopy i.e. in hex mode also it will show as blank only.
Joined: 23 Nov 2006 Posts: 19270 Location: Inside the Matrix
X'40' is a blank.
As the file is VB the empty space at the end of each record is blanks
I suspect this is not the case. . .
The empty space at the end of th record is not space at all - those positions do not exist which may be why the file is variable. By moving spaces, you have made the record now contain all of those x'40's.
SELCOPY will truncate trailing blanks when writing to a RECFM=VB format data set if parameter TRUNC is specified on WRITE.
READ INVB8264 * Input record from RECFM=VB LRECL=8264 data set.
IF LRECL > 5264 * Length of last input record is >5264.
THEN LRECL=5264 * Restrict this record's length to 5264.
WRITE OTVB5264 TRUNC * Trailing blanks will be truncated up to max length 5264.
Please note that SELCOPY support is **free of charge**.