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

How to move blanks in Selcopy


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kedianirmal

New User


Joined: 08 Feb 2008
Posts: 82
Location: Bangalore, India

PostPosted: Mon Aug 17, 2009 9:27 pm
Reply with quote

Hi,

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.

Thanks,
Nirmal
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Aug 18, 2009 1:42 am
Reply with quote

Hello,

X'40' is a blank.

Quote:
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.
Back to top
View user's profile Send private message
Nick Jones

New User


Joined: 28 Apr 2009
Posts: 13
Location: UK

PostPosted: Mon Sep 28, 2009 4:05 pm
Reply with quote

SELCOPY will truncate trailing blanks when writing to a RECFM=VB format data set if parameter TRUNC is specified on WRITE.

Code:
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**.
Email: support@cbl.com
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 COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts How to move the first field of each r... DFSORT/ICETOOL 5
No new posts Delete file row if blanks in the firs... DFSORT/ICETOOL 5
No new posts How to move DB2 Installation HLQ DB2 4
No new posts How to move values from single dimens... COBOL Programming 1
Search our Forums:

Back to Top