Hello,
I have a dataset name in a variable, source_dsn.
Let's say source_dsn is P12345.T43X.Z0009.DATA.SOME. I am logically designating the five segments as <1.XP>.<2.XP>.<3.XP>.<4.XP>.<5.XP>
so that <1.XP> stands for P12345
<2.XP> stands for T43X
<3.XP> stands for Z0009 and so on...
I have another variable, target_dsn.
Let's say I am specifying the content of target_dsn as B1678NG.<4.XP>.<2.XP>.DATA
Now I want this target_dsn to be calculated finally as : B1678NG.DATA.T43X.DATA (as <4.XP> stands for DATA and <2.XP> stands for T43X according to previous conventions. I want static part to remain as it is. e.g. B1678NG should be same as previous.)
There is one more restriction.
If I specify my target_dsn as B1678NG.<4.XP>.<2.XP>.<D.XP>.<T.XP>
then <D.XP> should be replaced by current date and <T.XP> should be replaced by current time. In short the target_dsn would look like following :
B1678NG.DATA.T43X.D201143.T020305
Kindly tell me how could this be done in COBOL.
Regards,
Vinod.