View previous topic :: View next topic |
Author |
Message |
karavi2000 Beginner
Joined: 17 Aug 2003 Posts: 51 Topics: 26 Location: Chennai
|
Posted: Thu Nov 25, 2004 5:40 am Post subject: Reg: Mass catalog of SPUFI Output into a Dataset |
|
|
Hi,
I have a requirement like to take SPUFI output of some 200 key information into a Dataset. My query will accept only one key at a time and the output of that SQL query should be catalogued into a dataset.
I dont want to do this manually b'coz it might lead to a lot of mistakes and the review of the same might also take much time. I happen to know that this can done using REXX. I tried with a sample DB2 Rexx I found on this site. But this job abended with 'System Error: 66D. Reason:00000002'.
I couldnt find the Plan name for my 'RUN PROGRAM('DSN'). I gave the Plan name same as my Program Name. Will this be a reason for this abend. If yes, how can I find the Plan name for my PROGRAM('DSN').
Please let me know.
Thanks & Regards,
Ravishankar |
|
Back to top |
|
|
karavi2000 Beginner
Joined: 17 Aug 2003 Posts: 51 Topics: 26 Location: Chennai
|
Posted: Thu Nov 25, 2004 7:29 am Post subject: |
|
|
Hi,
I was able to execute the Rexx Now. I got the Plan name and the execution is fine now.
But I have some other problems.
The output is having a lot of Warning Error Messages. Is there any way I can suppress those. And the Output information is limited to 133 bytes. If I can some 2000 bytes of data in a single line, I am able to view only the first 133 bytes. Why is this so?
Please let me know.
Thanks & Regards,
Ravishankar |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Thu Nov 25, 2004 10:22 am Post subject: |
|
|
karavi2000,
Quote: |
And the Output information is limited to 133 bytes.
|
The defualt output LRECL of DSNTEP2 dataset is only 133 bytes. You cannot override that.
why don't you run the sql in batch mode? You can generate the unload JCL in the rexx it self and submit the job.
Another option is to generate the sql statement for alll the 200 keys and submit as one job.
ex:
Code: |
SELECT *
FROM TABLE
WHERE TABLE_KEY IN ('MY FIRST KEY',
..............
'MY LAST KEY')
;
|
You will be dynamically generating the '.........' key values.
Hope this helps....
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
karavi2000 Beginner
Joined: 17 Aug 2003 Posts: 51 Topics: 26 Location: Chennai
|
Posted: Fri Nov 26, 2004 1:19 am Post subject: |
|
|
Hi Kolusu,
Thanks for that information. Nice to have that.
After having your reply I searched this forum for 'SQL and 'Batch'. I came across 'DSNTEP2', 'DSNTIAUL' and DSNTIAD.
I tried DSNTEP2 but it can handle only 133 bytes of data. I learnt DSNTIAL also has some LRECL limits. I tried DSNTIAUL, but the output has some junk characters for Integer data I guess, and also the Output doesnt contain the Column name.
Is there any utility which I can run in Batch which gives me exactly the same output as SPUFI b'coz that gives a bit more meaningful information 8) ?
Please let me know.
Thanks & Regards,
Ravishankar |
|
Back to top |
|
|
Maton_Man Beginner
Joined: 30 Jan 2004 Posts: 123 Topics: 0
|
Posted: Sun Nov 28, 2004 8:59 pm Post subject: |
|
|
DSNTEP2 will give you all the information, it just spreads it over several lines. Write a rexx which joins them all together again and write the output to a dataset. It is very easy to do. I wrote one a long time ago which not only joins them together but also removed the | characters (optionally), leaving only the column data.
I made it optional because if you leave the |s in you can FTP your data to your PC and import it into Excel using the | as a delimiter. _________________ My opinions are exactly that. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Sun Nov 28, 2004 9:44 pm Post subject: |
|
|
karavi2000, Quote: |
Is there any utility which I can run in Batch which gives me exactly the same output as SPUFI b'coz that gives a bit more meaningful information
|
You can try running QMF in batch which will give you the desired results.
Quote: |
I tried DSNTIAUL, but the output has some junk characters for Integer data I guess, and also the Output doesnt contain the Column name
|
You can use the scalar function CHAR or DIGITS to display the Integer data to readable format. Check this link for a detailed explanation of the CHAR & DIGITS functions
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DSNSQH11/3.2?DT=20010718164132
You can also run a sort step to format the data with headings.
Hope this helps....
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
|
|