by swd » Tue Apr 21, 2009 6:24 pm
Hmmmmmmmmmmm... sounds like a DB2 question to me (if I actually understand the post!)
I think you really want to know about the DB2 unload utility DSNTIAUL. This will have an SQL statement as the SYSIN input, along the lines of
SELECT * FROM DB2.TABLE
WHERE PK1 IN ('F1VALUE1', 'F1VALUE2' etc...)
I think you'll need a program to read through your F1 file and create the SQL SYSIN Parmfile which will be the SQL statement into the DB2 unload. The program can get the values you need from File F1 and put these into the SQL statement (F1VALUE1, F1VALUE2 etc..).
IKJEFT01 is the Program the will run the DSNTIAUL unload utility
//STP020 EXEC PGM=IKJEFT01,REGION=4096K,DYNAMNBR=20
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
DSN SYSTEM(DSN1)
RUN PROGRAM(DSNTIAUL) PLAN(DSNTIAUL) PARM('SQL') -
LIB('CSOFT.DSN1.RUNLIB.LOAD')
//SYSIN DD *
SELECT * FROM DB2.TABLE
WHERE PK1 IN ('F1VALUE1', 'F1VALUE2' etc...)
/*
This is my understanging of this post. I could be wrong....
Cheers
Steve