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
 

 

DFSORT - Matching records for various Conditions

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Sep 09, 2010 12:25 pm    Post subject:
Reply with quote

Perhaps it would be of more help to post the output which actually shows the syntax error.
Back to top
View user's profile Send private message

xknight

Active User


Joined: 22 Jan 2008
Posts: 117
Location: Liberty city

PostPosted: Thu Sep 09, 2010 12:27 pm    Post subject: @EXPAT
Reply with quote

Code:
ICE143I 0 BLOCKSET     COPY  TECHNIQUE SELECTED                                 
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AN
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R10 - 08:25 ON THU SE
           JOINKEYS FILE=F1,                                                   
                    FIELDS=(001,001,A,002,012,A,074,003,A)                     
           JOINKEYS FILE=F2,                                                   
                    FIELDS=(275,001,A,276,012,A,288,3,A)                       
           REFORMAT FIELDS=(F1:001,369,F2:001,680)                             
            SORT     FIELDS=COPY                                               
            OUTFIL   FNAMES=MATCHED,                                           
                     INCLUDE=(001,001,CH,NE,C' ',AND,                           
                              275,001,CH,NE,C' ',AND,                           
                              002,012,CH,NE,C'           ',AND,                 
                              276,012,CH,NE,C'           ',AND,                 
                              074,003,CH,NE,C'   ',AND,                         
                              288,003,CH,NE,C'   ')                             
                     OUTREC=(001:001,680)                                       
                           $                                                   
ICE007A 1 SYNTAX ERROR                                       
ICE751I 0 C5-K51707 C6-K51707 C7-K54603 C8-K51707 E7-K51707 
ICE052I 3 END OF DFSORT
Back to top
View user's profile Send private message
xknight

Active User


Joined: 22 Jan 2008
Posts: 117
Location: Liberty city

PostPosted: Thu Sep 09, 2010 12:38 pm    Post subject:
Reply with quote

If someone could re-write my SYNCSORT could be really helpful for the moment.

Due to lack of knowledge in SYNCSORT, i couldnt debug it.

Please suggest.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Sep 09, 2010 12:44 pm    Post subject:
Reply with quote

xavierrajnaveen wrote:
If someone could re-write my SYNCSORT could be really helpful for the moment.
Well actually you are using DFSORT and NOT SYNCSORT.

Also, please learn to use the code tags to make your post easier to read and debug
Code:
 [code] your post goes here [/code]

Topic moved to correct forum.
Back to top
View user's profile Send private message
smijoss

Active User


Joined: 30 Aug 2007
Posts: 114
Location: pune

PostPosted: Thu Sep 09, 2010 12:56 pm    Post subject:
Reply with quote

u missed a comma before outrec
Back to top
View user's profile Send private message
xknight

Active User


Joined: 22 Jan 2008
Posts: 117
Location: Liberty city

PostPosted: Thu Sep 09, 2010 1:15 pm    Post subject:
Reply with quote

Thanks smijoss for rightly pointing out
Quote:

INPUT FILE: A - LRECL: 369

Key Position: (1,1) (2,12), (74,3)

INPUT FILE: B - LRECL: 680

Key Position: (275,1) (276,12), (288,3)


And i have a query, how i shall write the output with the same format - LRECL - 680 ( Matching record should be written in the output as same as present in input FILEB)

Please suggest
Back to top
View user's profile Send private message
xknight

Active User


Joined: 22 Jan 2008
Posts: 117
Location: Liberty city

PostPosted: Thu Sep 09, 2010 2:08 pm    Post subject:
Reply with quote

Finally i have figured out by customizing the REFORMAT fields

Code:

//MTCHFILE EXEC PGM=SORT                                   
//SORTJNF1 DD  DSN=AJNAX.B.OLDPLAN.SORTED,DISP=SHR         
//SORTJNF2 DD  DSN=AJNAX.B.OLDMOD.SORTED,DISP=SHR         
//SYSIN    DD  *                                           
 JOINKEYS FILE=F1,                                         
          FIELDS=(001,001,A,002,012,A,074,003,A)           
 JOINKEYS FILE=F2,                                         
          FIELDS=(275,001,A,276,012,A,288,3,A)             
 REFORMAT FIELDS=(F2:001,680)                             
  SORT     FIELDS=COPY                                     
  OUTFIL   FNAMES=MATCHED,                                 
           OUTREC=(001:001,680)                           
/*                                                         


Now the output looks good.
Back to top
View user's profile Send private message
xknight

Active User


Joined: 22 Jan 2008
Posts: 117
Location: Liberty city

PostPosted: Thu Sep 09, 2010 2:11 pm    Post subject:
Reply with quote

@ smijoss @expat

Thank you very much for kind opinions and suggestions !!!
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 Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts Matching with Key at different postions. rajatbagga DFSORT/ICETOOL 12 Wed Nov 09, 2016 10:58 am
No new posts How to get the remainder and quotient... vnktrrd DFSORT/ICETOOL 2 Mon Oct 31, 2016 10:59 am
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm


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