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 

Outrec fields

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


Joined: 20 Apr 2006
Posts: 88
Topics: 22

PostPosted: Fri Jul 25, 2014 11:08 am    Post subject: Outrec fields Reply with quote

i have input file with several fields. i am doing a sortsum, then i want to skip one of the fields when getting my output.
when using the outrec fields, do i have to write out every field that i want in the output, or can i cover a range to avoid this.
for example input file is 500. policy number is in position 3 to 11
can i put
outrec fields = (1,2,
14,387)

some of the fields in bytes 14 thru 500 are zd, pd, bi.

i was told this would outrec fields would create a file 489 long by skipping policy number.
Back to top
View user's profile Send private message
William Collins
Supermod


Joined: 03 Jun 2012
Posts: 437
Topics: 0

PostPosted: Fri Jul 25, 2014 11:13 am    Post subject: Reply with quote

Don't use OUTREC FIELDS. Use OUTREC BUILD. Or even INREC BUILD (probably).

Code:
  INREC BUILD=(1,2,14,387)


Will give you the first two bytes of the current record, then from byte 14 for a length of 387 (it does not matter how the fields are actually defined "underneath" all that).

That'll give you a new current record of 389 bytes. This is short of some bytes, but I'm sure you can fix that.

So, yes, you can drop parts of a record without having to detailed definitions of other parts of the record.
Back to top
View user's profile Send private message
newcobol
Beginner


Joined: 20 Apr 2006
Posts: 88
Topics: 22

PostPosted: Fri Jul 25, 2014 11:54 am    Post subject: Reply with quote

ok, prior to reading ur response, i ran it, and it got code 0. i reran it with 14,487, not 14,387(my mistake there). it seems to have worked. it wrote out all the fields except for policy number and created a 489 byte output file. why did u say not to use outrec fields? any info appreciated
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Fri Jul 25, 2014 12:07 pm    Post subject: Reply with quote

newcobol wrote:
why did u say not to use outrec fields? any info appreciated


There is nothing wrong with using FIELDS. It is just FIELDS was the early syntax and now the BUILD and OVERLAY give you much more flexibility and understandability than FIELDS.
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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