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

DFSORT - Matching records for various Conditions


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

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Sep 09, 2010 12:25 pm
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
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
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: 8797
Location: Welsh Wales

PostPosted: Thu Sep 09, 2010 12:44 pm
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
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts To fetch records that has Ttamp value... DFSORT/ICETOOL 2
No new posts ICETOOL returns no records JCL & VSAM 1
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
Search our Forums:

Back to Top