Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Query on JCL

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

Active User


Joined: 14 Sep 2009
Posts: 174
Location: Coimbatore

PostPosted: Wed Oct 16, 2019 7:02 pm    Post subject: Query on JCL
Reply with quote

Hi,

I do have a doubt in JCL. I go the below input file using joinkeys logic. Now I have a problem in bringing them in same line.

Input File:
-------------
20191021
20191022

Expected Output file:
-----------------------
20191021 20191022

Can you please let me know how to bring it same line. I tried ICETOOL but could not get the correct logic.
Back to top
View user's profile Send private message

sergeyken

Active Member


Joined: 29 Apr 2008
Posts: 603
Location: Maryland

PostPosted: Wed Oct 16, 2019 7:07 pm    Post subject: Re: Query on JCL
Reply with quote

abdulrafi wrote:
Hi,

I do have a doubt in JCL. I go the below input file using joinkeys logic. Now I have a problem in bringing them in same line.

Input File:
-------------
20191021
20191022

Expected Output file:
-----------------------
20191021 20191022

Can you please let me know how to bring it same line. I tried ICETOOL but could not get the correct logic.

Your problem has nothing to do with JCL.

Try to understand the issue a little bit better.

Unless you presented an example of your code nobody here would even understand your problems, to say nothing about providing you with some help.
Back to top
View user's profile Send private message
sergeyken

Active Member


Joined: 29 Apr 2008
Posts: 603
Location: Maryland

PostPosted: Wed Oct 16, 2019 7:28 pm    Post subject: Re: Query on JCL
Reply with quote

abdulrafi wrote:
Hi,

I do have a doubt in JCL. I go the below input file using joinkeys logic. Now I have a problem in bringing them in same line.

Input File:
-------------
20191021
20191022

Expected Output file:
-----------------------
20191021 20191022

Can you please let me know how to bring it same line. I tried ICETOOL but could not get the correct logic.

Besides of all, what are you "joining" in this example???????

The values "20191021" and "20191022" cannot be joined normally (e.g. as INNER JOIN). They can be joined as FULL OUTER JOIN, but it would work only for one single pair; in that case it would be much-much easier to do this manually, by hand, using paper and ink instead of any DFSORT, and even without computer!!!
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 2298
Location: NY,USA

PostPosted: Wed Oct 16, 2019 7:49 pm    Post subject:
Reply with quote

There are many ways to combine 2 or more records into 1. You can try IFTHEN=(WHEN=GROUP=.... ,SPLICE or RESIZE ( most simple one).

RESIZE operator
Back to top
View user's profile Send private message
sergeyken

Active Member


Joined: 29 Apr 2008
Posts: 603
Location: Maryland

PostPosted: Wed Oct 16, 2019 8:35 pm    Post subject:
Reply with quote

Rohit Umarjikar wrote:
There are many ways to combine 2 or more records into 1. You can try IFTHEN=(WHEN=GROUP=.... ,SPLICE or RESIZE ( most simple one).

RESIZE operator

1) In this case it would be not JOIN/JOINKEYS operation, but instead - virtual APPEND/CONCAT. This is the first thing the TS must understand the difference between.

2) I doubt it is possible to use WHEN=GROUP in that case, at least without sophisticated tricks.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 2298
Location: NY,USA

PostPosted: Wed Oct 16, 2019 10:09 pm    Post subject:
Reply with quote

Quote:
2) I doubt it is possible to use WHEN=GROUP in that case, at least without sophisticated tricks.
Something like this...
Code:
//STEP01   EXEC  PGM=SORT                                   
//SYSOUT  DD SYSOUT=*                                       
//SORTLIST DD SYSOUT=*                                     
//SORTIN  DD *                                             
20191016                                                   
20191015                                                   
//SORTOUT     DD SYSOUT=*                                       
//SYSIN   DD *                                             
 OPTION COPY                                               
 INREC IFTHEN=(WHEN=GROUP,RECORDS=2,PUSH=(71:1,8,81:SEQ=1))
 OUTFIL INCLUDE=(81,1,ZD,EQ,2),BUILD=(71,8,X,1,8)

Output
Code:
20191016 20191015
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 DB2 Query runs very long John F Dutcher DB2 21 Wed Aug 21, 2019 11:44 pm
No new posts Query to Truncate value in table bhaskar_kanteti DB2 2 Mon Aug 12, 2019 3:26 pm
No new posts Verify WITH UR present inside program... priyankakir CLIST & REXX 23 Wed Jun 12, 2019 3:37 pm
No new posts Query on updating the control cards. abdulrafi DFSORT/ICETOOL 2 Tue Feb 26, 2019 2:23 pm
This topic is locked: you cannot edit posts or make replies. Query on updating the control cards. abdulrafi JCL & VSAM 2 Mon Feb 25, 2019 7:43 pm

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