I need to check a string in a GDG file, for example, to check 'ABCDEFG' in file : AAA.BBB.CCC.DDD(0).
IF YES, append this string 'ABCDEFG' to the bottom of a PDS member:
ABD.EFG.HIG(NAMES).
IF BOTH FILES ARE PSD FILES, there is no problem, while I changed to GDG and PDS member, it didn't work.
My Clist program can not allocate a gdg file, and also can not append to a member.It overided the member, when i allocated the file to SHR and OLD. MOD didn't work to a member file.
The clist can access a GDG but you have to convert the file name from a gdg relative reference (0) to a fully qualified dataset name. In your examble, you would need to reference the file as: AAA.BBB.CCC.DDD.G1234V00 (where G1234V00 is the most current version Identifier).
Typically you can do this by writing a routine to run a LISTCAT command on the dataset, SYSTRAPing the output and then parsing the fully qualified name into a CLIST variable.
Example:
Example output...
RAPP.RAP000.YQ.TAX.YQINFO.BK.G8203V00