I am trying to generate an extract, a part of the process requires calculation of future date using the number of months, which are taken from another position in the same record itself.
An example input record is as below (this record is for illustration only, the actual record layout positions, data differ from this):
2014059ASHFOASHFOUH36KSDGFSDGFSB
2013268ASGFIDGSAIFG48SDKFAGDSFGF
2015348AHDSOFHSODHA59ASIUFHISHFU
2010289SBKDFHAKSFHU10DSAHFKDSHFD
2013268ASGFIDGSAIFG48SDKFAGDSFGF
2015348AHDSOFHSODHA59ASIUFHISHFU
2010289SBKDFHAKSFHU10DSAHFKDSHFD
Here starting 7 bytes are date in Y4T format, 2 bytes from 20th position are the number of months to be used for calculation of future date.
The way I'd attempted this was doing it in two steps, first converting Julian to Greg Y4T format, then trying to use 'DATE2+m' form to calculate the future date.
The point where I am stuck is - how to pass the number of months, from my record as shown above, to 'm' for calculation of the date.
When I pass the position in place of 'm', as (20,2,ZD), the job goes for a toss as it expects 'm' to be a numeric value.
If I have it figured the right way then 'DATE2+m', won't be of much help here and I might have to use some other workaround to get this done.
A thought please.
Thanks.