I have written this REXX to convert GDG generation name to GDG Base name. It works perfectly. I think this can easily be done by ICETOOL/DFSORT. Please help as I am not familiar with string operation using SORT.
Input and output files are FB/200. STARTPOS=1 & ENDPOS=44 for file name. There are other types of files in the input which doesn't require any change. GDG files can be identified by the 'GDG' string in the position 48 to 50.
********************************* TOP OF DATA **********************************
K002.K221.S01.G0005 ;G,GDG,VB, 500, 504,CYL,
K005.K223.S01 ;G,GDG,VB, 500, 504,CYL,
K001.K220.S01 ;G,GDG,VB, 500, 504,CYL,
U002.FL1A602.MASTER ,O,VSM,VB, 1546, 1550,CYL,
T003.INFO.MASTER.PAA ,P,VSM,FB, 200, 0,TRK,
E001.PRINT.ADVICE ,D,SEQ,VB, 23032, 23036,TRK,
J001.K320.S01 ;G,GDG,VB, 500, 504,CYL,
B005.CH001.DOWNLOAD ,D,SEQ,FB, 650, 0,TRK,
******************************** BOTTOM OF DATA ********************************
GDG genation with '(' are properly converted.
K002.K221.S01.G0005V00 is converted to K002.K221.S01.G0005 as per my control card. It should be stipped (trimmed) to K002.K221.S01. Please help.
Note I built ';' at position 45 to identify (testing) editied gdg name. Aslo trucated o/p to 80 length for testing. Later it can be corrected.