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

Creating Report using SORT


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

New User


Joined: 20 May 2022
Posts: 6
Location: India

PostPosted: Mon May 29, 2023 11:33 pm
Reply with quote

Hello Guys,
I have a requirement to create Report using only JCL SORT. Below is the input and expected output report. I tried but couldn't get any idea. Can you guys please help me. Thanks!!

Input file layout:
Project-ID PIC 9(6)
Filler PIC X
Project-Code PIC X(3)
Filler PIC X
Project-Type PIC X(13)
Filler PIC X
Deployed-Status PIC X(3)
Filler PIC X(52)

Input File:
Code:

----+----1----+----2----+----3---   
123456 AAA Development   Yes         
234511 CCC Bug Fix       Yes         
246800 DDD Automation    No         
135790 JJJ Enhancement   Yes         
322010 AAA Development   No         
654321 AAA Development   No         
864200 CCC Bug Fix       No         
975310 JJJ Enhancement   Yes         
112233 DDD Automation    Yes         
987654 AAA Development   Yes         
098765 JJJ Enhancement   No         


Expected Output Report:
Code:

----+----1----+----2----+----3----+----4----+----5----+---
                PROJECT AND CODE DETAILS
   PROJECT  PROJECT        NUMBER    DEPLOYED   DEPLOYED     
   CODE     TYPE           OF CODE   YES        NO
   AAA      DEVELOPMENT     4        2          2         
   CCC      BUG FIX         2        1          1         
   DDD      AUTOMATION      2        1          1           
   JJJ      ENHNANCEMENT    3        2          1         
                           ===========================       
   TOTAL:                   11       6          5         
[/code]
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2119
Location: USA

PostPosted: Tue May 30, 2023 12:14 am
Reply with quote

Did you read this - www.ibm.com/docs/en/zos/2.1.0?topic=reports-creating-outfil

Or some other info about SORT, anything at all?

What did you try so far?

This is a HELP FORUM, not DO-MY-JOB-FOR-ME forum.

P.S.
SORT is not JCL, and JCL is not SORT; the two absolutely different tools.
What exactly is your "requirement" - "using only JCL SORT"?
Back to top
View user's profile Send private message
Aravinth Kumar

New User


Joined: 20 May 2022
Posts: 6
Location: India

PostPosted: Tue May 30, 2023 12:21 am
Reply with quote

I want this to be in SORT. I am not sure on how to get the count of respective “Deployed Status” for each type. Any help would be appreciated. Thanks!
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2119
Location: USA

PostPosted: Tue May 30, 2023 2:23 am
Reply with quote

Aravinth Kumar wrote:
I want this to be in SORT. I am not sure on how to get the count of respective “Deployed Status” for each type. Any help would be appreciated. Thanks!

Try to reach your goal step by step, not all together.

1. Learn how to reorder your data, to group similar lines together. Investigate and test SORT FIELDS=(…) statement.

2. Learn how to find totals for the whole data. Investigate and test OUTFIL …COUNT=… parameters

3. Learn how to find totals for specific groups of your data. Investigate and test OUTFIL …SECTIONS=(…),… sub-parameters (COUNT=, and others if needed)

4. Learn how to use OUTFIL NODETAIL parameter, to get rid of original data in you report, besides the totals you calculated in #3.

DO NOT TRY TO DO MORE THAN ONE TASK AT THE SAME TIME.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10879
Location: italy

PostPosted: Tue May 30, 2023 3:31 am
Reply with quote

a good idea could be to read and meditate on

www.ibm.com/support/pages/smart-dfsort-tricks

old but still pretty useful for a beginner
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1307
Location: Bamberg, Germany

PostPosted: Wed May 31, 2023 2:51 pm
Reply with quote

The original formatting is uncomforting and should be changed. Align to the right boundaries, and prepare for a safe amount of digits.

Code:
****** **************************** Datenanfang ********************
000001                 PROJECT AND CODE DETAILS                     
000002    PROJECT  PROJECT        NUMBER    DEPLOYED   DEPLOYED     
000003    CODE     TYPE           OF CODE   YES        NO           
000004    AAA      Development      15       13          2         
000005    CCC      Bug Fix           2        1          1         
000006    DDD      Automation        2        1          1         
000007    JJJ      Enhancement       3        2          1         
000008                            =============================     
000009    TOTAL:                    22       17          5         
****** **************************** Datenende **********************
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1307
Location: Bamberg, Germany

PostPosted: Wed May 31, 2023 6:09 pm
Reply with quote

Aravinth Kumar wrote:
I am not sure on how to get the count of respective “Deployed Status” for each type.

Translate Yes/No to Ones and Zeroes, it's not that difficult. I would prefer BUILD/OVERLAY's CHANGE for this task. I used it in my sample.
Back to top
View user's profile Send private message
m_a_n_u

New User


Joined: 04 Apr 2023
Posts: 3
Location: france

PostPosted: Mon Jun 12, 2023 9:27 pm
Reply with quote

In this case, i think that the DISPLAY operator proposed by ICETOOL can fit.

For more explanation, go to the page 594 - DISPLAY examples - of the DFSORT application programming guide
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 SORT CARD meaning please DFSORT/ICETOOL 3
No new posts Add condition to a FINDREP SORT card DFSORT/ICETOOL 4
No new posts Sort based on the record type DFSORT/ICETOOL 1
No new posts SORT JCL to merge multiple tow into s... DFSORT/ICETOOL 6
No new posts To Omit records based n SORT condition DFSORT/ICETOOL 6
Search our Forums:

Back to Top