Page 1 of 1

Inserting headers into a Report

PostPosted: Sat May 16, 2020 1:12 am
by rryan60
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

Re: Inserting headers into a Report

PostPosted: Sat May 16, 2020 1:21 am
by sergeyken
Code tags!!!!!

No attachments!!!!!

Re: Inserting headers into a Report

PostPosted: Sat May 16, 2020 1:32 am
by rryan60
 //*                                                                    
 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:'-----'),                                            
*;              
 


 
********************************* 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

Re: Inserting headers into a Report

PostPosted: Sat May 16, 2020 2:28 am
by NicC
using SYNCSORT
then why post in the JCL section and not in the SYNCSORT section of the forum? Moved.

Re: Inserting headers into a Report

PostPosted: Mon May 18, 2020 8:30 pm
by rryan60
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?

Re: Inserting headers into a Report

PostPosted: Tue May 19, 2020 12:16 am
by NicC
So what is your difficuty? What have you tried? Have you referred to the Syncsort manual?

Re: Inserting headers into a Report

PostPosted: Tue May 19, 2020 12:23 am
by rryan60
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!

Re: Inserting headers into a Report

PostPosted: Tue May 19, 2020 3:05 am
by sergeyken
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!

Re: Inserting headers into a Report

PostPosted: Wed May 20, 2020 11:56 pm
by rryan60
Let me try to explain this again. Here is my code:
//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:
----+----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:
----+----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!

Re: Inserting headers into a Report

PostPosted: Thu May 21, 2020 2:52 am
by sergeyken
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.

rryan60 wrote:Let me try to explain this again. Here is my code:
//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:
----+----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:
----+----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!