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 

DFSort /add 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
kumar26fl
Beginner


Joined: 08 Apr 2010
Posts: 14
Topics: 9

PostPosted: Fri Apr 09, 2010 6:05 pm    Post subject: DFSort /add in Outrec fields Reply with quote

Hi,

I am using DFSORT and extracting 2 fields from an input file and writing to an output file. My sysin is:

Code:

  SORT FIELDS=COPY
  OUTREC FIELDS=(1:10,24,25:94,4,PD,TO=ZD)



The field at position 94 in the input file is s9(07) comp-3 date field. In our shop, the date formats are standard and defined as:

CYYMMDD where 'C' is century indicator. Where C = 0 implies 19 and C = 1 implies 20. However, I need to output date field in CCYYMMDD. We get CCYYMMDD by adding a value of '19000000' to the value at position 95.

So for example: a date value in comp-3 is '1100123' indicating Jan 23rd 2010. Adding 19000000 gives 20100123.

Need help in modifying my outrec fields to include the add and output in CCYYMMDD format.

Thanks
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Fri Apr 09, 2010 6:48 pm    Post subject: Reply with quote

You can use these DFSORT control statements:

Code:

  SORT FIELDS=COPY                                                   
  OUTREC BUILD=(1:10,24,25:94,4,PD,ADD,+19000000,TO=ZDF,LENGTH=8)   

_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kumar26fl
Beginner


Joined: 08 Apr 2010
Posts: 14
Topics: 9

PostPosted: Fri Apr 09, 2010 11:40 pm    Post subject: Reply with quote

Thank You Frank. It really helped.
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