View previous topic :: View next topic |
Author |
Message |
Sqlcode Intermediate
Joined: 15 Dec 2006 Posts: 157 Topics: 38
|
Posted: Fri Feb 13, 2009 8:07 pm Post subject: Entire file as Instream data with hardcoded data |
|
|
Is it possible to supply physical file in instream data along with hardcoded data?
Code: |
//SYSIN *
FASTUNLOAD
SHRLEVEL CHANGE
LOAD-CONTROL DB2LOAD
SQL-ACCESS EXTENSION
...
...
...
VSAM-BUFFERS 360
SELECT COL1
FROM TABLE1
WHERE COL2 IN (
// DSN=INPUT.FILE.WITH.COL2.VALUES,DISP=SHR
);
/*
|
|
|
Back to top |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Fri Feb 13, 2009 8:32 pm Post subject: |
|
|
Code: | //SYSIN DD *
blah blah blah
/*
// DD DSN=...,DISP=...
// DD *
more blah blah blah
/* |
_________________ New members are encouraged to read the How To Ask Questions The Smart Way FAQ at http://www.catb.org/~esr/faqs/smart-questions.html. |
|
Back to top |
|
|
Sqlcode Intermediate
Joined: 15 Dec 2006 Posts: 157 Topics: 38
|
Posted: Fri Feb 13, 2009 9:12 pm Post subject: |
|
|
Hi,
Thanks for reply, I am using Platinum to unload table.
When I submit a job using the way you have specified, job abends and doesn't produce error/sysout message. It creates SYSDUMP only.
Below is the card I am using
Code: | FASTUNLOAD
SHRLEVEL CHANGE
LOAD-CONTROL DB2LOAD
SQL-ACCESS EXTENSION
PRINT-OPTIONS PTIMSG
VSAM-BUFFERS 360
SELECT COL1
FROM TABLE
WHERE COL2 IN (
/*
// DD DSN=MY.INPUT.FILE,DISP=SHR
// DD *
)
;
/*
//* |
|
|
Back to top |
|
|
Sqlcode Intermediate
Joined: 15 Dec 2006 Posts: 157 Topics: 38
|
Posted: Fri Feb 13, 2009 9:13 pm Post subject: |
|
|
Forgot to mention that everything is under //SYSIN DD * |
|
Back to top |
|
|
Sqlcode Intermediate
Joined: 15 Dec 2006 Posts: 157 Topics: 38
|
Posted: Fri Feb 13, 2009 9:16 pm Post subject: |
|
|
Oh.. my bad..
I gave wrong card,
Updated card
Code: |
//SYSIN DD *
FASTUNLOAD
SHRLEVEL CHANGE
LOAD-CONTROL DB2LOAD
SQL-ACCESS EXTENSION
PRINT-OPTIONS PTIMSG
VSAM-BUFFERS 360
SELECT COL1
FROM TABLE1
WHERE COL2 IN (
/*
// DD DSN=My.input.file,DISP=SHR
// DD *
)
;
/*
//* |
|
|
Back to top |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Fri Feb 13, 2009 9:25 pm Post subject: |
|
|
the my.input.file should have DCB attributes that are compatible with an inline file, for example, Fixed Block 80 records. You can also add a DCB=(LRECL=80,RECFM=FB) on the DD * statements. That may be a bit inaccurate since I can't test it right now, but hopefully the idea is right. You might want to verify that the read is OK by using the technique with IEBGENER first and make sure it can read what you are passing in. _________________ New members are encouraged to read the How To Ask Questions The Smart Way FAQ at http://www.catb.org/~esr/faqs/smart-questions.html. |
|
Back to top |
|
|
Sqlcode Intermediate
Joined: 15 Dec 2006 Posts: 157 Topics: 38
|
Posted: Fri Feb 13, 2009 9:55 pm Post subject: |
|
|
you were right, my input file has LRECL of 20.
I changed it to 80 bytes and it worked.
Thanks for your help. |
|
Back to top |
|
|
|
|