I need to insert headers into a Report using SYNCSORT. Here is my Code and Control Cards:
Control cards are attached. What I need it to look like is attached. Can you tell me how to do this?
Thanks!----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
********************************* Top of Data **********************************
1BACKORDERED PARTS WITH NO SDI 11:05 Friday, May 15, 2020
EMER
PART NUMBER B/O DATE ORDERS LINES
------------------ -------- ------ -----
5M6Z 8501A 2020/01/14 Y 9
KK4Z 17F774CD 2020/02/03 Y 2
KS7Z 54021A46A 2020/02/17 1
1S7Z 8125E 2020/02/17 1
FL1Z 2001E 2020/03/03 198
Inserting headers into a Report
Inserting headers into a Report
You do not have the required permissions to view the files attached to this post.
- sergeyken
- Posts: 458
- Joined: Wed Jul 24, 2019 10:12 pm
- Skillset: Assembler, JCL, Utilities, PL/I, C/C++, DB2, SQL, REXX, COBOL, etc. etc. etc.
- Referer: Internet search
Re: Inserting headers into a Report
Code tags!!!!!
No attachments!!!!!
No attachments!!!!!
Javas and Pythons come and go, but JCL and SORT stay forever.
Re: Inserting headers into a Report
Code: Select all
//*
SORT FIELDS=(1,80,CH,A)
//*
OUTFIL OUTREC=(2:18, UNPACKED PART NUMBER
20:5X, FILLER
25:25,10, PDT_YMD
35:5X, FILLER
40:37,1, EMERGENCY ORDER FLAG
41:7X, FILLER
48:45,5, P_LINES
53:29,X), FILLER
HEADER1=(1/30:'1BACKORDERED PARTS WITH NO SDI',/,
2/38:'EMER',/,
5:'PART NUMBER',25:'B/O DATE',38:'ORDERS',48:'LINES',/,
2:'------------------',25:'----------',38:'------',
48:'-----'),
*;
Code: Select all
********************************* Top of Data **********************************
1BACKORDERED PARTS WITH NO SDI 11:05 Friday, May 15, 2020
EMER
PART NUMBER B/O DATE ORDERS LINES
------------------ -------- ------ -----
5M6Z 8501A 2020/01/14 Y 9
KK4Z 17F774CD 2020/02/03 Y 2
KS7Z 54021A46A 2020/02/17 1
1S7Z 8125E 2020/02/17 1
FL1Z 2001E 2020/03/03 198
CN1Z 1A401B 2020/03/09 Y 1
CODED PROPERLY
-
- Global moderator
- Posts: 3025
- Joined: Sun Jul 04, 2010 12:13 am
- Skillset: JCL, PL/1, Rexx, Utilities and to a lesser extent (i.e. I have programmed using them) COBOL,DB2,IMS
- Referer: Google
- Location: Pushing up the daisies (almost)
Re: Inserting headers into a Report
then why post in the JCL section and not in the SYNCSORT section of the forum? Moved.using SYNCSORT
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
Regards
Nic
Re: Inserting headers into a Report
The output is from our current source code, written in SCSAS. I am converting this to SYNCSORT And need to return the system date in the format HH:MM, Day of week, and Alpha Month, day, year as shown in the upper right corner of the report. How can I do this?
-
- Global moderator
- Posts: 3025
- Joined: Sun Jul 04, 2010 12:13 am
- Skillset: JCL, PL/1, Rexx, Utilities and to a lesser extent (i.e. I have programmed using them) COBOL,DB2,IMS
- Referer: Google
- Location: Pushing up the daisies (almost)
Re: Inserting headers into a Report
So what is your difficuty? What have you tried? Have you referred to the Syncsort manual?
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
Regards
Nic
Re: Inserting headers into a Report
Yes, I have referred to the SYNCSORT Manual. My first issue is that it doesn't specify how to take a system date and time and put it out like this: 11:59 Friday, May 15,2020. I can convert the time but I am unsure how to convert the rest of it.
Thanks!
Thanks!
- sergeyken
- Posts: 458
- Joined: Wed Jul 24, 2019 10:12 pm
- Skillset: Assembler, JCL, Utilities, PL/I, C/C++, DB2, SQL, REXX, COBOL, etc. etc. etc.
- Referer: Internet search
Re: Inserting headers into a Report
rryan60 wrote:Yes, I have referred to the SYNCSORT Manual. My first issue is that it doesn't specify how to take a system date and time and put it out like this: 11:59 Friday, May 15,2020. I can convert the time but I am unsure how to convert the rest of it.
Thanks!
1) RTFM carefully
2) http://google.com/
Good luck!
Javas and Pythons come and go, but JCL and SORT stay forever.
Re: Inserting headers into a Report
Let me try to explain this again. Here is my code:
Here is what I need the output to look like:
Here is what I am getting:
What am I doing wrong? Please advise. Thanks!
Code: Select all
//STEP0022 EXEC SSORT
//*
//SYSOUT DD SYSOUT=*
//*
//SORTIN DD DSN=PA.TEST.BTR.PA000770.NOSDIRPT.D200425,
// DISP=SHR
//SORTOUT DD DSN=PA.TEST.BTR.PA000770.NOSDIRMD.D200424,
// DISP=(,CATLG,DELETE),
// DCB=(LRECL=81,RECFM=FBA),
// SPACE=(TRK,(10,5),RLSE)
//* SYSIN DD *
//*
SORT FIELDS=(1,18,CH,A)
//*
*OUTREC FIELDS=OUT,
OUTREC BUILD=(1:2X, FILLER
3:1,18, UNPACKED PART NUMBER
21:4X, FILLER
25:25,10, PDT_YMD
35:5X, FILLER
40:37,1, EMERGENCY ORDER FLAG
41:7X, FILLER
48:45,5, P_LINES
53:28X, FILLER
81:'1'), SPACE HOLDER
HEADER1=(1/30:'1BACKORDERED PARTS WITH NO SDI',52:&TIME=(12),
58:&WEEKDAY=CHAR9,',',69:&MONTH=CHAR9,','&DATE(D,4),
',',81:'1')
3/38:'EMER',/,
5:'PART NUMBER',25:'B/O DATE',38:'ORDERS',48:'LINES',/,
2:'------------------',25:'----------',38:'------',
48:'-----')
//* SYSOUT DD SYSOUT=*
/*
//*
Here is what I need the output to look like:
Code: Select all
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
********************************* Top of Data **********************************
1BACKORDERED PARTS WITH NO SDI 11:05 Friday, May 15, 2020
EMER
PART NUMBER B/O DATE ORDERS LINES
------------------ -------- ------ -----
5M6Z 8501A 2020/01/14 Y 9
KK4Z 17F774CD 2020/02/03 Y 2
KS7Z 54021A46A 2020/02/17 1
1S7Z 8125E 2020/02/17 1
FL1Z 2001E 2020/03/03 198
Here is what I am getting:
Code: Select all
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
********************************* Top of Data **********************************
BA8Z 7000ERM 2020/03/24 1
DG1Z 5A972H 2020/04/14 Y 9
FL1Z 2001E 2020/03/30 198
KK4Z 17F774CD 2020/02/03 Y 2
5M6Z 8501A 2020/02/20 9
CN1Z 1A401B 2020/03/09 Y 1
HC3Z 2A635Y 2020/04/06 1
HG9Z 19835D 2020/04/06 Y 1
JC3Z 99112A15CSP 2020/04/06 Y 1
JM5Z 7P184B 2020/04/06 Y 1
JU5Z 15604CX 2020/04/24 Y 2
What am I doing wrong? Please advise. Thanks!
- sergeyken
- Posts: 458
- Joined: Wed Jul 24, 2019 10:12 pm
- Skillset: Assembler, JCL, Utilities, PL/I, C/C++, DB2, SQL, REXX, COBOL, etc. etc. etc.
- Referer: Internet search
Re: Inserting headers into a Report
Done for you!
There are definitely syntax errors in your SORT statements. Cannot run successfully.
So, the presented results are a sort of a fake, not real run output.
There are definitely syntax errors in your SORT statements. Cannot run successfully.
So, the presented results are a sort of a fake, not real run output.
rryan60 wrote:Let me try to explain this again. Here is my code:Code: Select all
//STEP0022 EXEC SSORT
//*
//SYSOUT DD SYSOUT=*
//*
//SORTIN DD DSN=PA.TEST.BTR.PA000770.NOSDIRPT.D200425,
// DISP=SHR
//SORTOUT DD DSN=PA.TEST.BTR.PA000770.NOSDIRMD.D200424,
// DISP=(,CATLG,DELETE),
// DCB=(LRECL=81,RECFM=FBA),
// SPACE=(TRK,(10,5),RLSE)
//* SYSIN DD *
//*
SORT FIELDS=(1,18,CH,A)
//*
*OUTREC FIELDS=OUT,
OUTREC BUILD=(1:2X, FILLER
3:1,18, UNPACKED PART NUMBER
21:4X, FILLER
25:25,10, PDT_YMD
35:5X, FILLER
40:37,1, EMERGENCY ORDER FLAG
41:7X, FILLER
48:45,5, P_LINES
53:28X, FILLER
81:'1'), SPACE HOLDER
HEADER1=(1/30:'1BACKORDERED PARTS WITH NO SDI',52:&TIME=(12),
58:&WEEKDAY=CHAR9,',',69:&MONTH=CHAR9,','&DATE(D,4),
',',81:'1')
3/38:'EMER',/,
5:'PART NUMBER',25:'B/O DATE',38:'ORDERS',48:'LINES',/,
2:'------------------',25:'----------',38:'------',
48:'-----')
//* SYSOUT DD SYSOUT=*
/*
//*
Here is what I need the output to look like:Code: Select all
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
********************************* Top of Data **********************************
1BACKORDERED PARTS WITH NO SDI 11:05 Friday, May 15, 2020
EMER
PART NUMBER B/O DATE ORDERS LINES
------------------ -------- ------ -----
5M6Z 8501A 2020/01/14 Y 9
KK4Z 17F774CD 2020/02/03 Y 2
KS7Z 54021A46A 2020/02/17 1
1S7Z 8125E 2020/02/17 1
FL1Z 2001E 2020/03/03 198
Here is what I am getting:Code: Select all
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
********************************* Top of Data **********************************
BA8Z 7000ERM 2020/03/24 1
DG1Z 5A972H 2020/04/14 Y 9
FL1Z 2001E 2020/03/30 198
KK4Z 17F774CD 2020/02/03 Y 2
5M6Z 8501A 2020/02/20 9
CN1Z 1A401B 2020/03/09 Y 1
HC3Z 2A635Y 2020/04/06 1
HG9Z 19835D 2020/04/06 Y 1
JC3Z 99112A15CSP 2020/04/06 Y 1
JM5Z 7P184B 2020/04/06 Y 1
JU5Z 15604CX 2020/04/24 Y 2
What am I doing wrong? Please advise. Thanks!
Javas and Pythons come and go, but JCL and SORT stay forever.
-
- Similar Topics
- Replies
- Views
- Last post
-
- 1
- 1606
-
by willy jensen
View the latest post
Fri Aug 04, 2023 12:52 pm
-
-
Continuation of report in ICETOOL
by schintala » Sat Dec 24, 2022 10:32 pm » in DFSORT/ICETOOL/ICEGENER - 7
- 2563
-
by sergeyken
View the latest post
Fri Dec 30, 2022 12:27 am
-
-
- 11
- 5495
-
by Misha786
View the latest post
Wed Mar 10, 2021 11:56 pm
-
-
To get a migrated dataset report from MCDS
by maincen » Thu Aug 03, 2023 7:15 pm » in DFSORT/ICETOOL/ICEGENER - 4
- 1448
-
by sergeyken
View the latest post
Sat Aug 05, 2023 8:43 pm
-
-
- 0
- 986
-
by biswajit
View the latest post
Mon Mar 03, 2025 8:54 pm