Posted: Thu May 09, 2019 10:39 am Post subject: ESP SCHEDULER - HELP
Hi,
I never coded script for ESP scheduler. With help of google I have done coding and achieved 70 percent of my desired result. For completion I am not able to find any help from google. If someone aware of ESP scheduler please help me out.
I have to generate monthly report for different carriers. Carriers are identified using JOBNAMES. Instead of PL/I program I opted ESP script. Planned to schedule the new JOB to run on First day of every month.
In TSID2513 member in control librarey I have coded as below
Code:
REPORT
TITLE '%CE(THE XXXXX & XXXXXX MIDT FTP TIMES FOR %MONTH %YEAR)'
HISTFILE HIST1
GENTIME FWM FIRST DAY OF MONTH STARTING TODAY
FROM 7AM %FWMDATE TO 11PM TODAY
CRITERIA JOBNAME EQ 'jobname'
:
:
CRITERIA JOBNAME EQ 'jobname'
DISPLAY JOBNAME JOBQUAL JOBNO APPLSYS EXECSDATE EXECST 10 ENDT 10 CMPC 9
SORT JOBNAME EXECSDATE
ENDR
I am getting the result as below
Code:
ESP VER 11.4 BATCH INTERFACE 10.11.02 THURSDAY MAY 9TH, 2019 PAGE 1
REPORT
TITLE '%CE(THE xxxxx & xxxxxx MIDT FTP TIMES FOR %MONTH %YEAR)'
ESP VER 11.4 BATCH INTERFACE 10.11.02 THURSDAY MAY 9TH, 2019 PAGE 2
THE xxxxx & xxxxxx MIDT FTP TIMES FOR MAY 2019
HISTFILE HIST1
GENTIME FWM FIRST DAY OF MONTH STARTING TODAY
FROM 7AM WEDNESDAY MAY 1ST, 2019 TO 11PM TODAY
CRITERIA JOBNAME EQ 'jobname'
:
CRITERIA JOBNAME EQ 'jobname'
DISPLAY JOBNAME JOBQUAL JOBNO APPLSYS EXECSDATE EXECST 10 ENDT 10 CMPC 9
SORT JOBNAME EXECSDATE
ENDR
ESP VER 11.4 BATCH INTERFACE 10.11.02 THURSDAY MAY 9TH, 2019 PAGE 3
THE xxxxx & xxxxxx MIDT FTP TIMES FOR MAY 2019
JOBNAME JOBQUAL JOB APPLSYS START EXEC EXEC COMP
NO DATE START END CODE
ABA005U 11538 ABA005 WED 1MAY19 19.48.34 19.48.48 0
ABA005U 31749 ABA005 THU 2MAY19 20.13.49 20.14.35 0
ABA005U 21217 ABA005 FRI 3MAY19 23.17.45 23.18.19 0
ABA005U 2431 ABA005 SAT 4MAY19 19.53.18 19.53.36 0
ABA005U 19893 ABA005 SUN 5MAY19 19.46.35 19.46.47 0
ABA005U 6270 ABA005 MON 6MAY19 20.07.58 20.08.41 0
SID026 12006 SID002 TUE 7MAY19 02.14.07 02.16.40 0
SID026 32605 SID002 WED 8MAY19 02.11.42 02.17.23 0
ESP VER 11.4 BATCH INTERFACE 10.11.02 THURSDAY MAY 9TH, 2019 PAGE 4
THE xxxxx & xxxxxx MIDT FTP TIMES FOR MAY 2019
My requirement is to get the Actual OUTPUT from PAGE 3 onwards to separate DATASET. I tried different ways but not successfull. Please help out on this.
2. If First 3 characters are ABA I need to put Title 2 as
Code:
THE ABA MIDT FTP TIMES FOR MAY 2019 FOR CARRIER NAME
If first 3 characters are SID I need to put Title 2 as
Code:
THE SID MIDT FTP TIMES FOR MAY 2019 FOR CARRIER NAME
Title 2 Left justified for each JOB based on JOB name.
3. Requirement number 3
Need page break for each new JOB.
4. Can we do this using SORT? I mean copying the actual output from the file mentioned in 1 requirement and reformat as mentioned in requirements 2 & 3.
Please advise. If possible using SORT please help me out with sample CODE.
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Thu May 09, 2019 11:34 am Post subject:
tvssv,
Your topic title says you need help with ESP scheduler. But the requirement is SORT related. If you have report you can run it thru sort and get the desired records and add the titles.
What is the LRECL and RECFM of the report that you generated from ESP? You should have shown desired output too.
Guessing by your requirements is this what you want as final report?
Code:
THE ABA MIDT FTP TIMES FOR MAY 2019 FOR CARRIER NAME PAGE: 1
Actually I have got the OUTPUT from ESP script. If possible I need help on ESP script to get the desired result. Also OUTPUT is mixed with the SCRIPT. Any advise to be able to split the output to separate file using ESP script.
If not with ESP script, using SORT is also fine.
Please help me out with sample SORT code to get the report.
The LRECL and RECFM of the report generated from ESP are as below
Code:
LRECL = 133 & RECFM=FBA
The REPORT FORMAT is as below.
Code:
THE ABA MIDT FTP TIMES FOR MAY 2019 FOR CARRIER NAME PAGE: 1
In the Title if first 3 characters of JOBNAME are ABA it should be ABA or if SID it should be SID in Title. The carrier name will be decided based on JOBNAME. I mean for each JOBNAME there is a carrier associated. That carrier name should be displayed in CARRIER NAME part of TITILE based on JOBNAME.
From the ESP OUTPUT only START DATE and EXEC END columns are taken into the REPORT. From EXEC END column only HOURS & MINUTES are taken. MONTH in title can be picked from ESP OUTPUT or FROM START DATE field.
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Fri May 10, 2019 12:29 pm Post subject:
tvssv wrote:
Hi Kolusu,
Thank You.
Actually I have got the OUTPUT from ESP script. If possible I need help on ESP script to get the desired result. Also OUTPUT is mixed with the SCRIPT. Any advise to be able to split the output to separate file using ESP script.
Tvssv,
I have no idea about the ESP script, so can't help there.
tvssv wrote:
If not with ESP script, using SORT is also fine.
Please help me out with sample SORT code to get the report.
The LRECL and RECFM of the report generated from ESP are as below
Code:
LRECL = 133 & RECFM=FBA
In the Title if first 3 characters of JOBNAME are ABA it should be ABA or if SID it should be SID in Title. The carrier name will be decided based on JOBNAME. I mean for each JOBNAME there is a carrier associated. That carrier name should be displayed in CARRIER NAME part of TITILE based on JOBNAME.
From the ESP OUTPUT only START DATE and EXEC END columns are taken into the REPORT. From EXEC END column only HOURS & MINUTES are taken. MONTH in title can be picked from ESP OUTPUT or FROM START DATE field.
Please help me out with SAMPLE SORT CODE.
Forgot to mention, records from ESP output need to be included only COMP CODE is zero in REPORT.
Use the following DFSORT JCL which will give you the desired results. I am treating the Return code as unsigned free format numeric. so as long as you have numeric data in the return code , you would get right results. But lets say you have some kind of text like "user abend" then that record will also get picked.
The requirement changed. Now the ESP SCHEDULER output is as below.
Code:
ESP VER 11.4 BATCH INTERFACE 08.49.35 THURSDAY MAY 16TH, 20
REPORT
TITLE '%CE(THE SABRE & ABACUS MIDT FTP TIMES FOR %MONTH %YEAR)'
ESP VER 11.4 BATCH INTERFACE 08.49.35 THURSDAY MAY 16TH, 20
THE SABRE & ABACUS MIDT FTP TIMES FOR
HISTFILE HIST1
GENTIME FWM FIRST DAY OF MONTH STARTING TODAY
FROM 7AM WEDNESDAY MAY 1ST, 2019 TO 11PM TODAY
CRITERIA JOBNAME EQ 'SID028'
CRITERIA JOBNAME EQ 'SID024A'
CRITERIA JOBNAME EQ 'SID024C'
CRITERIA JOBNAME EQ 'SID026'
CRITERIA JOBNAME EQ 'SID033'
CRITERIA JOBNAME EQ 'SID045'
CRITERIA JOBNAME EQ 'ABA5DB'
DISPLAY JOBNAME 25 'JOB NAME',EXECSDATE 20 'FTP DATE',ENDT 10 'FTP TIME'
CMPC 15 'RETURN' 'CODE'
SORT JOBNAME EXECSDATE
BREAK JOBNAME 6 SPACE 1
ENDR
ESP VER 11.4 BATCH INTERFACE 08.49.35 THURSDAY MAY 16TH, 20
THE SABRE & ABACUS MIDT FTP TIMES FOR
JOB NAME FTP DATE FTP TIME RETURN
CODE
ABA005U WED 1MAY19 19.48.48 0
ABA005U THU 2MAY19 20.14.35 0
ABA005U FRI 3MAY19 23.18.19 0
ABA005U SAT 4MAY19 19.53.36 0
ABA005U SUN 5MAY19 19.46.47 0
ABA005U MON 6MAY19 20.08.41 0
ABA005U TUE 7MAY19 20.13.07 0
ABA005U WED15MAY19 20.17.55 0
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Thu May 16, 2019 11:20 am Post subject:
tvssv wrote:
Hi Kolusu,
The requirement changed.
This will be the INPUT file. I tried in ESP scheduler but did not succeeded.
Could you please provide help using SORT for the desired reports.
Client provided the below format.
FORMAT 1:
If first 3 characters are ABA Heading should be 'The ABAXXX MIDT FTP TIMES' centered.
The side Headdings are fixed since the job names come in same order in input file. The side headings are based on JOBNAME.
Code:
IF JOBNAME = ABA005U THEN 'NORTHXXXXXXXXXXXXXXX'. simillarly for other headings also. But the order of the side headings is fixed.
If return code is not zero that record can be omitted. Return code variable is CMPC.
Can we create this report using SORT?
Please advise. If possible using SORT please help me out with sample CODE.
Thanks & Regards
Wow you went from simple extract of data to full formatted excel spread sheet format. It can be done, but currently I don't have that much time, to spend on this.
tvssv wrote:
The side Headdings are fixed since the job names come in same order in input file. The side headings are based on JOBNAME.
IF JOBNAME = ABA005U THEN 'NORTHXXXXXXXXXXXXXXX'. simillarly for other headings also. But the order of the side headings is fixed.
You show exactly 3 different jobnames ABA005U ABA5DB SID024A, but you show 10 different titles for them. Do you expect me magically look into your data? or read your mind?
I can't guess the left side titles unless you provide a 1 to 1 mapping of what each jobname translates to.
Since now you are looking for excel spread sheet format report with array of the start and end times , what happens if a particular job did NOT run on a specific day? Like lets say the Job ABA005U did not run on May 4th, 7th and 9th. What data would put in there for these dates? _________________ Kolusu
www.linkedin.com/in/kolusu
The report from ESP scheduler script generates complete list of jobs and there FTP times with dates. It has combined jobs list report of two systems SAXXX and ABAXXX. The report should split the two with Headings and generate the single report.
SAXXX jobs listed first and ABAXXX jobs next in ESP script output.
In the Heading Month should be pick from Month from Date column from ESP report. Side heading I mean first column names are fixed and relation between jobs and names is as below
Code:
For SABER
SID028 Amadeus
SID024A Travelport - combined
SID024C Travelport - Intl
SID026 Travelport - Domestic
SID033 Worldspan (For NWA)
SID045 DOB Systems
For ABACUS
ABA51A AMADEUS
ABA5TP TRAVELPORT.
ABA005U NORTHWEST AIRLINES(VIA WORLDSPAN)
ABA5DB DOB systems.
Based on JOB name respective Heading should be displayed.
FTP times column 3rd column in ESP report prints time as "20.11.29". We need to display only first 5 characters "hh.mm" in our final report under the date.
The ESP report generates only the JOB run dates and FTP time for the run date. If JOB is not run the Date will not come into the report.
The Dates will be common to FIRST (SABER) PART and different for SECOND(ABACUS) part but dates in ABACUS will be same.
The ESP report generates all the JOB runs 4th column in report. In final report we need include only the jobs Return code is ZERO only.
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Tue May 21, 2019 3:53 pm Post subject:
tvssv wrote:
The report format is finalized.
Tvssv,
Too bad , the requirements are still clear as mud.
Earlier I asked you a very simple question and yet you don't have an answer for it
kolusu wrote:
Since now you are looking for excel spread sheet format report with array of the start and end times , what happens if a particular job did NOT run on a specific day? Like lets say the Job ABA005U did not run on May 4th, 7th and 9th. What data would put in there for these dates?
And you simply answered this with
tvssv wrote:
The ESP report generates only the JOB run dates and FTP time for the run date. If JOB is not run the Date will not come into the report.
You don't seem to realize the effect of missing date records.
As you can see above for the job ABA005U you don't have data for the dates 8 thru 14. You just cannot put the May15 data into May08th slot as it does not have the data for May 8th. My question was what do you fill it up with ? zeros ? or spaces?
Understand the requirements properly before you simply copy and paste the code that is provided here. Your job should be able to handle all the scenarios and not just some sample data.
Another question is that can you ever have data spanning across months?
Lets say your report start date is May 21st and can it have from June/July too? If so how do you plan to handle the headers and dates? Now your array will be bigger than 31. Do you need to handle that ?
Either way assuming that you got ALL the requirements right, then you would need at least 2 passes of the data (may be more), to handle each and every scenario.
Since you know the requirements and have access to the data, I suggest you write a simple COBOL program to handle it. _________________ Kolusu
www.linkedin.com/in/kolusu
kolusu wrote:
Since now you are looking for excel spread sheet format report with array of the start and end times , what happens if a particular job did NOT run on a specific day? Like lets say the Job ABA005U did not run on May 4th, 7th and 9th. What data would put in there for these dates?
Hi Kolusu,
ESP report will contain only the Dates on which JOB had run. It does not contain the dates when JOB is not run. So my assumption is we can pull the dates from dates column for ABACUS & SABRE separately for Dates heading. The execution dates will be common in ABACUS and SABRE. We need to display only FTP times from the execution dates. No need to display the dates on which job did not run. So basicaly we need to read all the dates in input file that is FTP DATE column and display as row DATES heading. And after reading each job we need to put side heading and display 5 characters from column 3 that is FTP TIME from input file and write under respective date column.
Quote:
Another question is that can you ever have data spanning across months?
Lets say your report start date is May 21st and can it have from June/July too? If so how do you plan to handle the headers and dates? Now your array will be bigger than 31. Do you need to handle that ?
No data spanning across months. It will have only one month data and need to display only the jobs for which RETURN CODE field in input file that is esp report have zero only. No need to report if it have non zero.
We do not have access to COBOL. We work only on JCL and files and ESP scheduler. But I see few programs in PLI in our libraries. But I do not know PLI. Please help me out doing this with SORT.
Please let me know the way to put the input file that is output of ESP report through which we need to generate report.
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
Posted: Wed May 22, 2019 3:50 am Post subject:
Maybe you should look at using Rexx instead of COBOL or PL/I. Also, please supply what you think your report should look like if a job is not run on a particular day as I am still confused by your answer. _________________ Utility and Program control cards are NOT, repeat NOT, JCL.
Maybe you should look at using Rexx instead of COBOL or PL/I. Also, please supply what you think your report should look like if a job is not run on a particular day as I am still confused by your answer.
Hi,
If job is not run on a particular day it should be blank i.e., no FTP time for that date in the report.
But, the ESP report generates only the JOB run dates in the report. I am assuming that the dates will be picked from FTP Date column from input file and written as headings. The job run dates will same in the SABER group and ABACUS group.
If the dates in the month written as constant headings and if the job did not run on that date ftp time can be left blank in the report.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum