IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Capture SPUFI result in a dataset


IBM Mainframe Forums -> JCL & VSAM
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic  
Author Message
mtridib

New User


Joined: 30 Mar 2006
Posts: 4

PostPosted: Thu Mar 30, 2006 12:23 pm
Reply with quote

Can anyone please give me a sample JCL to capture the SPUFI result in a dataset? I will be doing a SELECT query only in the SPUFI
Back to top
View user's profile Send private message
tusharguptait

New User


Joined: 15 Feb 2006
Posts: 32

PostPosted: Thu Mar 30, 2006 3:03 pm
Reply with quote

Hi
Couldn't understand ur query. SPUFI result is moved to a output dataset itself. And If u mean SPUFI in batch then use DSNTEP2 (search forum ).

Regards
TG
Back to top
View user's profile Send private message
mtridib

New User


Joined: 30 Mar 2006
Posts: 4

PostPosted: Thu Mar 30, 2006 3:23 pm
Reply with quote

I will be doing the SPUFI in the JCL. Not the SPUFI option in mainframe that we usually have.
Will give u n example.
Code:
//TESTSPUF EXEC PGM=IKJEFT01,REGION=4M                           
//STEPLIB DD DSN=LOADLIBRARY,DISP=SHR                           
//SYSIN DD *
    SELECT                                                       
    B.COL1
    CASE SUBSTR(A.COL2,2,1)                           
       WHEN 'A' THEN '11111'                                     
       WHEN 'B' THEN '22222'                                     
       WHEN 'C' THEN '33333'                                     
    END AS PROD_LINE,                                             
    A.COL3
    FROM TABLE1 A,                 
         TABLE2 B               
       WHERE A.KEY = B.KEY
//SYSTSIN DD *                                         
 DSNECP00 SYSTEM(ENVIRONMENT)                           
   RUN PROGRAM (DSNTEP2) PLAN (DSNTEP2)  -
       LIB('DBB.W.RUNLIB.LOAD')                         
 END                                                   
//*
How do I capture the results in this case
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Thu Mar 30, 2006 6:57 pm
Reply with quote

mtridib,

Add this SYSPRINT to your Job Step.

Code:
//SYSPRINT DD DSN=HLQ.SPUFI.RESULT,DISP=(,CATLG,DELETE),
//            LRECL=LL,RECFM=FB,AVGREC=U


Result would be stored in the dataset.

Regards,
Priyesh.
Back to top
View user's profile Send private message
Jon_Walker

New User


Joined: 02 Jun 2008
Posts: 6
Location: Ottawa, Canada

PostPosted: Tue Jun 10, 2008 10:01 pm
Reply with quote

DSNTEP2 looks great, but will the output have column headers (like SPUFI)? If so, how do you get rid of them (from your output file).

Someone on another forum mentioned REXX/SORT. I have no experience with REXX, so help would be appreciated.

Jon icon_confused.gif
Back to top
View user's profile Send private message
anv2005

New User


Joined: 14 Jul 2005
Posts: 44
Location: US

PostPosted: Tue Jun 10, 2008 10:41 pm
Reply with quote

Please explain whether or not you want to see column names in your output, and if not why? Please provide an example of desired output.

There is a SPUFI product that would run in batch. Take a look at the forum's thread below: http://forum.relarc.com/phpbb3/viewtopic.php?f=7&t=17

Alex.
Back to top
View user's profile Send private message
Jon_Walker

New User


Joined: 02 Jun 2008
Posts: 6
Location: Ottawa, Canada

PostPosted: Wed Jun 11, 2008 4:54 am
Reply with quote

I'm using DSNTEP2 (batch SPUFI) to extract SIN numbers, that will form a data feed to a business process that executes after my JCL. So column headers are NOT a desired option!

The output will be a single column of 9 digit SIN numbers.

999999999
111222333
444555666
777888999
etc......
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Wed Jun 11, 2008 6:17 pm
Reply with quote

Are you having any unload utilities (BMC) at your shop. ???

Thanks,
Arun
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Jun 12, 2008 6:15 am
Reply with quote

Hello,

You might look into submitting your query using your sort product as well.
Back to top
View user's profile Send private message
Vladimir Mestovski

New User


Joined: 15 Nov 2011
Posts: 4
Location: Belarus

PostPosted: Wed Aug 01, 2012 12:05 am
Reply with quote

DSNTEP2 is an IBM sample program written in PL/I. It never runs a ROLLBACK after SQL errors, that's very bad when you run multiple UPDATEs. Based on the DSNTEP2/4 code I created a C-version of the program with many new features, one of them is WRITE [dlm] FILE before a SELECT statement to create a flat file with its report. The program is free and can be downloaded from cbttape.org/cbtdowns.htm FILE 866.
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Wed Aug 01, 2012 12:14 am
Reply with quote

Jon_Walker wrote:
I'm using DSNTEP2 (batch SPUFI) to extract SIN numbers, that will form a data feed to a business process that executes after my JCL. So column headers are NOT a desired option!

The output will be a single column of 9 digit SIN numbers.

999999999
111222333
444555666
777888999
etc......
Use DSNTIAUL. It will create a file without headings.

If your SINs are in DECIMAL format and you want to see them as character, you can use the SQL DIGITS() function.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Aug 01, 2012 12:35 am
Reply with quote

Don, unlucky. You fell for the multiple-tailgating. Jon was the original tailgater, Vladimir the latest.
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Wed Aug 01, 2012 12:41 am
Reply with quote

Bill Woodger wrote:
Don, unlucky. You fell for the multiple-tailgating. Jon was the original tailgater, Vladimir the latest.
LOL! That will teach me for not paying attention to the entire thread.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Aug 01, 2012 1:20 am
Reply with quote

Or at least the first post before replies from "today" . . . icon_wink.gif
Back to top
View user's profile Send private message
anusha.manthena

New User


Joined: 30 Nov 2006
Posts: 1
Location: Pune/HYd

PostPosted: Wed Aug 01, 2012 11:50 am
Reply with quote

If you want only the query results from the SPUFI output file, you can sort them accordingly. In your case include a sort condition to retreive only the records which are having 1-9 at the location from where the SIN numbers start.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Wed Aug 01, 2012 11:59 am
Reply with quote

I've not read the older stuff in the thread but none of the latest replies actually assist in the original problem - writing SPUFI output to a dataset.
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Wed Aug 01, 2012 5:06 pm
Reply with quote

Nic Clouston wrote:
I've not read the older stuff in the thread but none of the latest replies actually assist in the original problem - writing SPUFI output to a dataset.
Ahem. I believe that my suggestion to use DSNTIAUL is what the TS was after: "Spufi" output without headings. icon_smile.gif
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Wed Aug 01, 2012 5:46 pm
Reply with quote

Quote:
Capture SPUFI result in a dataset


Is the topic title and, presumably, what the guy was after. But I ain't going to read through these old posts to see if he changed his requirements.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Wed Aug 01, 2012 6:17 pm
Reply with quote

Nic Clouston wrote:
Quote:
Capture SPUFI result in a dataset


Is the topic title and, presumably, what the guy was after. But I ain't going to read through these old posts to see if he changed his requirements.

Remember, though, that to a software engineer "SPUFI" is a magic tool that takes vague requests written in something resembling SQL and miraculously produces results in the exact format wanted. Even analysts at my site, who should know better, refer to DSNTEP* as"batch SPUFI".
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Wed Aug 01, 2012 6:34 pm
Reply with quote

Akatsukami wrote:
Nic Clouston wrote:
Quote:
Capture SPUFI result in a dataset


Is the topic title and, presumably, what the guy was after. But I ain't going to read through these old posts to see if he changed his requirements.

Remember, though, that to a software engineer "SPUFI" is a magic tool that takes vague requests written in something resembling SQL and miraculously produces results in the exact format wanted. Even analysts at my site, who should know better, refer to DSNTEP* as"batch SPUFI".
And I bet they call DSNTIAUL the "unload utility". That's still the common mis-usage at my site. So much so that when I talk about the Unload utility I have to refer to it as "the Real unload utility".
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Wed Aug 01, 2012 6:45 pm
Reply with quote

Ah well, I am not a software engineer. I am a programmer.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Aug 01, 2012 7:04 pm
Reply with quote

Hello and welcome to the forum,

Please notice that you have replied to a question that has been dormant for more than 4 years - Wed Jun 11, 2008 6:45 pm

It is best to reply to currently active posts, though this one is a bit of an exceptjion. There are multiple recent posts, but these are mostly us "old guys" chatting icon_smile.gif

Enjoy the forum!
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts DELETE SPUFI DB2 1
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Adding QMF and SPUFI to the ISPF menu DB2 20
No new posts Allocated cylinders of a dataset DB2 12
Search our Forums:

Back to Top