Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Regarding DFSORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Regarding DFSORT
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

Site Director


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

PostPosted: Tue Oct 26, 2010 7:55 pm    Post subject:
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 Moderator


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

PostPosted: Tue Oct 26, 2010 8:23 pm    Post subject:
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:

http://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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to get the remainder and quotient... vnktrrd DFSORT/ICETOOL 2 Mon Oct 31, 2016 10:59 am
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm
No new posts DFSORT sorting only specific records akodakka DFSORT/ICETOOL 4 Thu Aug 04, 2016 11:24 am
No new posts Symbolic Parameters in SYSIN DD state... madishpa DFSORT/ICETOOL 3 Mon Jun 27, 2016 6:23 pm
No new posts DFSORT to match two files and write John F Dutcher DFSORT/ICETOOL 6 Thu May 12, 2016 5:17 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us