View previous topic :: View next topic
|
Author |
Message |
subhadrasn
New User
Joined: 01 Mar 2022 Posts: 6 Location: India
|
|
|
|
Hi All,
Is it possible to subtract constant value from a variable that, we receive dynamically thru parm in jcl/or using fileaid batch.
To explain clearly, I need to generate a week report. So i get the current date from OPC Scheduler. But the challenge is my vsam file date field is in 9's compliment of julian date. that is 9999999-yyyyddd.
Can this be done in jcl or file-aid batch.
Thank you |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1305 Location: Bamberg, Germany
|
|
|
|
FILEAID is not an IBM utility. Show something of your input and what you wanna see as desired output. |
|
Back to top |
|
|
subhadrasn
New User
Joined: 01 Mar 2022 Posts: 6 Location: India
|
|
|
|
For example - todays julian date in YYYYDDD format is 2023030.
So my 9's compliment for todays julian date will be 9999999-2023030 = 7976969.
I will key in this date to my vsam file to fetch data.
Please note that - i have more than 10 vsam files as input for different regions.
This report needs to be run on weekly basis, so i have to fetch all the records from vsam file for current date - 7 days.
So now i need to get the current date and do this conversion and fetch the data from all the vsam files.
Hope I have made it clear. Please help with your suggestions. |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1305 Location: Bamberg, Germany
|
|
|
|
Why not using some SORT utility for the date extraction maneuver? |
|
Back to top |
|
|
subhadrasn
New User
Joined: 01 Mar 2022 Posts: 6 Location: India
|
|
|
|
Can you please guide me how can i get date with 9's complement thru JCL sort. Dynamically Subtracting from 9999999 thru sort.
Thank you in advance. |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2117 Location: USA
|
|
|
|
subhadrasn wrote: |
Can you please guide me how can i get date with 9's complement thru JCL sort. Dynamically Subtracting from 9999999 thru sort.
Thank you in advance. |
1) SORT is not JCL, in any manner
2) Why not to read/search some initial information about the suggested tool,???
3) FYI: The "Dynamically Subtracting" in SORT is performed via operation code SUB. |
|
Back to top |
|
|
subhadrasn
New User
Joined: 01 Mar 2022 Posts: 6 Location: India
|
|
|
|
Thank you for your reply, will definitely do check |
|
Back to top |
|
|
dneufarth
Active User
Joined: 27 Apr 2005 Posts: 420 Location: Inside the SPEW (Southwest Ohio, USA)
|
|
|
|
Curiosity question - How do you handle run/rerun outside of the actual current date? This may be important in constructing your solution. |
|
Back to top |
|
|
|