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

Regarding DFSORT


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
a69356

New User


Joined: 01 Dec 2006
Posts: 21
Location: Gurgaon

PostPosted: Tue Oct 26, 2010 4:27 pm
Reply with quote

Hi All,

There are two files let say A and B.

File A
field 1 Field 2
12345 XYZ

FILE B
field 1 Field 2
12345 ABC

I need to get an output file which have matching Field 1 and then need to add a character field X(02) whose constant value is CD.
I am doing it through Joinkeys which will match the records and put them in the third file.

Code:

  JOINKEYS FILE=F1,FIELDS=(1,5,A)
  JOINKEYS FILE=F2,FIELDS=(1,5,A)
  REFORMAT FIELDS=(F1:1,5,6:2C'CD')     
  SORT FIELDS=COPY   


But I am getting an error message
Code:
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1
              JOINKEYS FILE=F1,FIELDS=(1,5,A)             
              JOINKEYS FILE=F2,FIELDS=(1,5,A)             
              REFORMAT FIELDS=(F1:1,5,6:2C'CD')           
                                       $                   
ICE007A 1 SYNTAX ERROR                                     
              SORT FIELDS=COPY                             
ICE751I 0 C5-K51706 C6-K51706 C7-K54602 C8-K51706 E7-K51706
ICE052I 3 END OF DFSORT   


I am not able to figure it out. Any help will be highly appreciated.

Thanks,
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 Oct 26, 2010 7:55 pm
Reply with quote

Hello,

Suggest you post a few more sample input records and the output youwant from those input records using the Code Tag.

Show what should happen when there is a match, when there is not a match, and when (if possible) duplicates.

Mention the dsorg and lrecl of the files.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue Oct 26, 2010 8:23 pm
Reply with quote

a69356,

You cannot use 6:2C'CD' in the REFORMAT statement. The syntax for REFORMAT is F1:p,m to include fields from file F1 and/or F2:p,m to include fields from F2. However, once you've used REFORMAT to create the joined record, you can use INREC, OUTREC or OUTFIL to further format it, e.g.

Code:

  ...
  REFORMAT FIELDS=(F1:1,5)
  OUTREC BUILD=(1,5,6:2C'CD')


For complete details on the syntax for JOINKEYS, JOIN and REFORMAT, see:

www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000174
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts DFsort help with SUM() DFSORT/ICETOOL 12
No new posts DFSORT - VB file RDW getting overridden DFSORT/ICETOOL 3
Search our Forums:

Back to Top