MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Create VB file skipping some fields

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
sameermn
Beginner


Joined: 08 Aug 2005
Posts: 6
Topics: 3

PostPosted: Fri Sep 09, 2005 11:10 am    Post subject: Create VB file skipping some fields Reply with quote

Hi,

I have a 491 byte VB file as input.

I need to create an out put file of 487 bytes (in VB format) from input
by skipping values from input file in positions 264,265,266

The sort card i used is

SORT FIELDS=COPY
OUTREC FIELDS=(5:5,259,
264:267,225)

But this is not working. Please update me regarding how i should proceed now.

Thx for your support.
_________________
Sameer
Back to top
View user's profile Send private message
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Fri Sep 09, 2005 12:12 pm    Post subject: Reply with quote

Sameer,

Nothing much.
Whenever you deal with VB files, it is MANDATORY to include the RDW (first 4 bytes). Otherwise, the error message will clearly say that RDW is not included in OUTREC statement. (I don't remember the exact error message but it clearly conveys the message).

So, you need to change your card as
Code:

  SORT FIELDS=COPY
  OUTREC FIELDS=(1,4,           *  RDW *
                 5,259,267,225)


TIP: When the fields in the output record layout are contiguous, you don't have to break your head calculating the output positions (5:, 264: etc...). Just ignore them.

Hope this helps,

Thanks,
Phantom
Back to top
View user's profile Send private message
sameermn
Beginner


Joined: 08 Aug 2005
Posts: 6
Topics: 3

PostPosted: Fri Sep 09, 2005 1:06 pm    Post subject: Reply with quote

Problem solved. Even though i was awre that we need to add 4 bytes for VB files i was not awre that we need to put them at first during outrec.
Thank you so much for your help.
_________________
Sameer
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group