View previous topic :: View next topic
|
Author |
Message |
Aravinth Kumar
New User
Joined: 20 May 2022 Posts: 6 Location: India
|
|
|
|
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 |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2119 Location: USA
|
|
|
|
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 |
|
|
Aravinth Kumar
New User
Joined: 20 May 2022 Posts: 6 Location: India
|
|
|
|
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 |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2119 Location: USA
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10879 Location: italy
|
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1307 Location: Bamberg, Germany
|
|
|
|
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 |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1307 Location: Bamberg, Germany
|
|
|
|
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 |
|
|
m_a_n_u
New User
Joined: 04 Apr 2023 Posts: 3 Location: france
|
|
Back to top |
|
|
|