report creation in sort.



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

report creation in sort.

Postby luckyboyroh » Wed Mar 20, 2013 4:54 pm

hey guys,

Need your help. My requirement is currently there is a report which needs to be changed. The Current report does not have header information and the new report should have the header details. can this be acheived through sort?
===============================================================
Current Report [Doesnt have header details]

ABC COMPANY PAGE : 1
XXXXXXXXXXXXXXXXXXXXX
YYYYYYYYYYYYYYYYYYYYY

BCD COMPANY PAGE : 2
ZZZZZZZZZZZZZZZZZZZZZZ
AAAAAAAAAAAAAAAAAAA
===============================================================
New Report [header details needs to be added]

Report date:
Report ID :
Run Date :

ABC COMPANY PAGE : 1
XXXXXXXXXXXXXXXXXXXXX
YYYYYYYYYYYYYYYYYYYYY

Report date:
Report ID :
Run Date :

BCD COMPANY PAGE : 2
ZZZZZZZZZZZZZZZZZZZZZZ
AAAAAAAAAAAAAAAAAAA
===============================================================

The thing is the header details needs to be inserted for every page. Please help me whether this can be acheived through sort. Thanks

Thanks,
Rohit
luckyboyroh
 
Posts: 35
Joined: Wed Jan 16, 2013 4:05 pm
Has thanked: 3 times
Been thanked: 0 time

Re: report creation in sort.

 

Re: report creation in sort.

Postby luckyboyroh » Wed Mar 20, 2013 5:18 pm

I am using the below sort card but getting error .

SORT FIELDS=(COPY)
OUTFIL HEADER2=(001:'REPORT DT:',
012:&DATE=(MD4/),
001:'REPORT ID: ',
012:AAAAAA',/,
001:'Run Date:
012:&DATE=(MD4/))
TRAILER1=LINES=55

ERROR
TRAILER1=LINES=55
*
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE

plz help..
luckyboyroh
 
Posts: 35
Joined: Wed Jan 16, 2013 4:05 pm
Has thanked: 3 times
Been thanked: 0 time

Re: report creation in sort.

Postby BillyBoyo » Wed Mar 20, 2013 6:27 pm

Have a look at your manual for syntax and examples of TRAILER1. Search for examples here. Google. Experiment. Correct.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: report creation in sort.

Postby bodatrinadh » Thu Mar 21, 2013 10:42 am

Hi Rohit,

You may try this code -

//STEP01 EXEC PGM=SORT
//SYSPRINT DD SYSOUT=*
//SYSOUT   DD SYSOUT=*
//SORTOUT  DD SYSOUT=*
//SORTIN   DD *       
ABC COMPANY PAGE : 1 
XXXXXXXXXXXXXXXXXXXXX
YYYYYYYYYYYYYYYYYYYYY
                     
BCD COMPANY PAGE : 2 
ZZZZZZZZZZZZZZZZZZZZZZ
AAAAAAAAAAAAAAAAAAA   
                     
AZA COMPANY PAGE : 3 
TTTTTTTTTTTTTTTTTTTTTT
QQQQQQQQQQQQQQQQQQQ   
//SYSIN   DD *
  INREC IFTHEN=(WHEN=GROUP,BEGIN=(13,4,SS,EQ,C'PAGE'),PUSH=(81:ID=4),
                            END=(1,1,CH,EQ,C' '))
  SORT FIELDS=COPY
  OUTFIL REMOVECC,OUTREC=(1,80),SECTIONS=(81,4,
          HEADER3=(001:'REPORT DT:',012:&DATE=(MD4/),/,
                   001:'REPORT ID:',012:'AAAAAA',/,
                   001:'RUN DATE: ',012:&DATE=(MD4/)),SKIP=L)


Output:-

REPORT DT: 03/21/2013
REPORT ID: AAAAAA     
RUN DATE:  03/21/2013
ABC COMPANY PAGE : 1 
XXXXXXXXXXXXXXXXXXXXX
YYYYYYYYYYYYYYYYYYYYY
                     
REPORT DT: 03/21/2013
REPORT ID: AAAAAA     
RUN DATE:  03/21/2013
BCD COMPANY PAGE : 2 
ZZZZZZZZZZZZZZZZZZZZZZ
AAAAAAAAAAAAAAAAAAA   
                     
REPORT DT: 03/21/2013
REPORT ID: AAAAAA     
RUN DATE:  03/21/2013
AZA COMPANY PAGE : 3 
TTTTTTTTTTTTTTTTTTTTTT
QQQQQQQQQQQQQQQQQQQ   
Thanks
-3nadh
User avatar
bodatrinadh
 
Posts: 67
Joined: Thu Jan 12, 2012 9:05 pm
Has thanked: 0 time
Been thanked: 4 times

Re: report creation in sort.

Postby luckyboyroh » Thu Mar 21, 2013 1:04 pm

thanks mate! i tired this but getting the below error. please help. also would like to know the significance of "PUSH" field as why (81:ID=4) mentioned. thanks in advance.
INREC IFTHEN=(WHEN=GROUP,BEGIN=(121,4,SS,EQ,C'PAGE'),PUSH=(134:ID=4),
*
END=(1,1,CH,EQ,C' '))
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
luckyboyroh
 
Posts: 35
Joined: Wed Jan 16, 2013 4:05 pm
Has thanked: 3 times
Been thanked: 0 time

Re: report creation in sort.

Postby bodatrinadh » Thu Mar 21, 2013 1:24 pm

I guess your sort control cards (INREC IFTHEN..) in SYSIN DD * is starting from Position 1. It should be from Position 2. Show us your complete JCL what you have tried...

also would like to know the significance of "PUSH" field as why (81:ID=4) mentioned.


Here PUSH is used to define the input field, sequence number, or identifier that will be overlaid for each group’s records.

ID=n Specifies a printable Zoned Decimal (ZD) identifier n bytes long, which will be added to every record of each group.
For the first group,the identifier will start at 1 and for each subsequent group it will be increased by 1. The number n can be from 1 to 15.
Thanks
-3nadh

These users thanked the author bodatrinadh for the post:
luckyboyroh (Thu Mar 21, 2013 1:26 pm)
User avatar
bodatrinadh
 
Posts: 67
Joined: Thu Jan 12, 2012 9:05 pm
Has thanked: 0 time
Been thanked: 4 times

Re: report creation in sort.

Postby luckyboyroh » Thu Mar 21, 2013 1:31 pm

thanks! It worked. It was a silly one. Didnt notice it properly. just one more question. i dont want the Cariage return variable. how to modify the same?
luckyboyroh
 
Posts: 35
Joined: Wed Jan 16, 2013 4:05 pm
Has thanked: 3 times
Been thanked: 0 time

Re: report creation in sort.

Postby bodatrinadh » Thu Mar 21, 2013 1:44 pm

i dont want the Cariage return variable. how to modify the same?


Cariage return variable ? No clue on that...Can you show the sample???
Thanks
-3nadh
User avatar
bodatrinadh
 
Posts: 67
Joined: Thu Jan 12, 2012 9:05 pm
Has thanked: 0 time
Been thanked: 4 times

Re: report creation in sort.

Postby BillyBoyo » Fri Mar 22, 2013 3:59 am

You print the Printer Control Codes in position one on the output? That's what the REMOVECC should do, so provide the information -3nadh asked for.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: report creation in sort.

Postby luckyboyroh » Fri Mar 22, 2013 11:54 am

Sorry. Jus now logged in. Yes 3Nadh. Billyboyo is correct . Thats what i was looking for. I tried the same REMOVE CC yesterday and it worked. Thanks a lot 3nadh! thanks again.
luckyboyroh
 
Posts: 35
Joined: Wed Jan 16, 2013 4:05 pm
Has thanked: 3 times
Been thanked: 0 time


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post