View previous topic :: View next topic
|
Author |
Message |
Amolondhe007 Warnings : 1 New User
Joined: 16 Apr 2007 Posts: 49 Location: Pune
|
|
|
|
I have 100 account numbers in a PS(flat file ). I have to check weather the account numbers are exist in the database or not.
Can we check in the database by executing a single Query in SPUFI flat file as input.
If yes what will be the Query? |
|
Back to top |
|
|
sandeep1dimri
New User
Joined: 30 Oct 2006 Posts: 76
|
|
|
|
I never got solution to this mannual job |
|
Back to top |
|
|
priyamnavada
New User
Joined: 24 Dec 2005 Posts: 52 Location: hyderabad
|
|
|
|
while running a query in SPUFI, we cant access flat file as input. Either the values should b specififed in the query or else through COBOL+DB2 program you can check it out. |
|
Back to top |
|
|
a027412
New User
Joined: 05 Jul 2007 Posts: 40 Location: Minneapolis, MN
|
|
|
|
Hi, you can try this option.
Code: |
//STEP010 EXEC DB2TBTLO,UTILITY=DSNTEP2
//SYSUDUMP DD SYSOUT=*
//ABNLIGNR DD DUMMY
//SYSIMAG DD DUMMY
//SYSPRINT DD SYSOUT=*
//SYSCTL DD DUMMY
//SYSIN DD *
SELECT * FROM OWNER.TABLE
WHERE account_num IN (
// DD DSN=FLAT.FILE.CONTAIN.ACC.NUMBER,DISP=SHR
/* |
Edit the dataset FLAT.FILE.CONTAIN.ACC.NUMBER containing the account number by
1:inserting commas in between two account numbers
2:end the flat file with
|
|
Back to top |
|
|
wanderer
Active User
Joined: 05 Feb 2007 Posts: 199 Location: Sri Lanka
|
|
|
|
a027412 wrote: |
Hi, you can try this option.
Code: |
//STEP010 EXEC DB2TBTLO,UTILITY=DSNTEP2
//SYSUDUMP DD SYSOUT=*
//ABNLIGNR DD DUMMY
//SYSIMAG DD DUMMY
//SYSPRINT DD SYSOUT=*
//SYSCTL DD DUMMY
//SYSIN DD *
SELECT * FROM OWNER.TABLE
WHERE account_num IN (
// DD DSN=FLAT.FILE.CONTAIN.ACC.NUMBER,DISP=SHR
/* |
Edit the dataset FLAT.FILE.CONTAIN.ACC.NUMBER containing the account number by
1:inserting commas in between two account numbers
2:end the flat file with
|
I don't think there is anything like this in the manual or I haven't seen yet. They did try an example based on a user defined function but nothing like this. But this thing works! Thanks a027412 for sharing. |
|
Back to top |
|
|
|