Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Capture SPUFI result in a dataset
Goto page 1, 2  Next
 
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Capture SPUFI result in a dataset
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    Post subject: Re: Capture SPUFI result in a dataset
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    Post subject: Re: Capture SPUFI result in a dataset
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: 1452
Location: Chicago, IL

PostPosted: Thu Mar 30, 2006 6:57 pm    Post subject: Re: Capture SPUFI result in a dataset
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    Post subject: DSNTEP2 Issue
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    Post subject:
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    Post subject:
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: 2158
Location: @my desk

PostPosted: Wed Jun 11, 2008 6:17 pm    Post subject:
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

Site Director


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

PostPosted: Thu Jun 12, 2008 6:15 am    Post subject:
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    Post subject: Reply to: Capture SPUFI result in a dataset
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 http://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: 641
Location: Whitby, ON, Canada

PostPosted: Wed Aug 01, 2012 12:14 am    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Wed Aug 01, 2012 12:35 am    Post subject: Reply to: Capture SPUFI result in a dataset
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: 641
Location: Whitby, ON, Canada

PostPosted: Wed Aug 01, 2012 12:41 am    Post subject: Re: Reply to: Capture SPUFI result in a dataset
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

Site Director


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

PostPosted: Wed Aug 01, 2012 1:20 am    Post subject: Reply to: Capture SPUFI result in a dataset
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    Post subject:
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: 1712
Location: UK

PostPosted: Wed Aug 01, 2012 11:59 am    Post subject:
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: 641
Location: Whitby, ON, Canada

PostPosted: Wed Aug 01, 2012 5:06 pm    Post subject:
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: 1712
Location: UK

PostPosted: Wed Aug 01, 2012 5:46 pm    Post subject:
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: 1738
Location: Bloomington, IL

PostPosted: Wed Aug 01, 2012 6:17 pm    Post subject:
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: 641
Location: Whitby, ON, Canada

PostPosted: Wed Aug 01, 2012 6:34 pm    Post subject:
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
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts To trim spaces in a pipe delimited da... Nish84 COBOL Programming 16 Mon Oct 10, 2016 1:54 pm
No new posts Allocate dataset withour BLKSIZE Susanta CLIST & REXX 2 Thu Sep 22, 2016 11:51 am
No new posts dataset copy question - REPRO or some... atulxp TSO/ISPF 2 Wed Aug 03, 2016 10:56 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us