Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Build Dynamic Sort output and limit ',' character

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

Active User


Joined: 29 Jun 2005
Posts: 126

PostPosted: Sat Feb 02, 2019 4:40 am    Post subject: Build Dynamic Sort output and limit ',' character
Reply with quote

Hi Team,
I am building the Sort join card which match two input files which is of RECFM=FB and LRECL= 80 Bytes and creates the output file on Non matching records from File [F1] . This output will be used along with the SQL query with respect to condition on 'IN' Clause .

File F1 :
Code:


-----------------------------------
2018-01-19
2018-01-22
------------------------------------







File F2:-
Code:


-----------------------------------------------
2019-01-19 2018-01-20
2019-01-22 2018-01-22
-----------------------------------------------


SORT CARD:-

Code:


OPTION COPY
INREC OVERLAY=(25:C',')
JOINKEYS FILES=F1,FIELDS=(01,10,A)
JOINKEYS FILES=F2,FIELDS=(12,10,A)
JOIN UNPAIRED,F1,ONLY
REFORMAT FIELDS=(F1:01,10,?)
OUTFIL FNAMES=SORTOUT,INCLUDE=(11,1,CH,EQ,C'1'),NULLOFL=RC4,
REMOVECC,
HEADER1=(10:'('),
BUILD=(11:X'7D',
             12:01,10,
             22:X'7D',
             23:25,01,80:X),
TRAILER1=(10:')')




Is there a way not to add ',' if the count is not > 1 record and format the output with ',' character accordingly

Thanks
Balaji K
Back to top
View user's profile Send private message

sergeyken

Active User


Joined: 29 Apr 2008
Posts: 400
Location: Maryland

PostPosted: Sat Feb 02, 2019 7:24 pm    Post subject:
Reply with quote

First of all, re-order your statements in the sequence they are really used by SORT utility. Otherwise it takes long time trying to understand the actual behavior of your example, and the final result. It doesn't worth to spend so much time for others to analyze any dirty code.
Code:
 JOINKEYS ...
 JOINKEYS ...
 JOIN ...
 REFORMAT ...
 INREC OVERLAY=(25:C',')
 SORT FIELDS=COPY
 OUTFIL FNAMES=SORTOUT,
        INCLUDE=(11,1,CH,EQ,C'1'),
        NULLOFL=RC4,
        REMOVECC,
        HEADER1=(10:'('),
        BUILD=(11:X'7D',
               12:01,10,
               22:X'7D',
               23:25,01,80:X),
        TRAILER1=(10:')')
 END
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
This topic is locked: you cannot edit posts or make replies. PARAMETER 'F1' IS UNIDENTIFIED error ... Poha Eater DFSORT/ICETOOL 14 Fri Feb 01, 2019 2:39 pm
No new posts SORT INNER JOIN [F1] OUT OF SEQ ERROR balaji81_k DFSORT/ICETOOL 8 Wed Jan 30, 2019 3:21 am
No new posts Copy members from Input PDS to Output... Poha Eater JCL & VSAM 9 Tue Jan 29, 2019 3:56 pm
No new posts Dates compare on specific dates using... balaji81_k DFSORT/ICETOOL 2 Thu Jan 24, 2019 12:03 am
No new posts Joining 2 records to 1 using Sort cmuncan DFSORT/ICETOOL 1 Sat Dec 08, 2018 8:53 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us