Rexx Code to resolve the GDG version

Sunday, March 31, 20131comments

Here is a Rexx program which accepts the relative GDG version as used in a JCL and returns the exact GDG version which is going to be resolved to by the JES interpreter.

parse var gdgbase "(" gdggen ")" rest
gdgbae = "'" || gdgbase || "'"
if gdggen > 0 then do
   say 'Only Negative Generations Allowed'
   exit
end
x=outtrap(list.)
"listc ent("gdgbase")"
x=outtrap(off)
if rc > 0 then do                                     
    say 'The GDG doesn't exist'
    Exit
end
gdggen = (gdggen * 2) - 1
gdggen = list.0 + gdggena = pos('NONVSAM',list.gdggen)
if A <= 0 then do
    say 'The generation of GDG doesn't exist' 
    Exit
end
else do
  a=a+13
  dsn = strip(substr(list.gdggen,a,44))  
  say dsn
end
drop list.
Share this article :

+ comments + 1 comments

March 26, 2016 at 9:33 PM

Is it possible to get the GDG version by giving the value of DATE of Creation???

Post a Comment

 
Support : Creating Website | Johny Template | Mas Template
Copyright © 2011. Atom's Arena - All Rights Reserved
Template Created by Creating Website Published by Mas Template
Proudly powered by Blogger