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
 

 

Sample JCL for DB2 extract through SYNCSORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
razesh84

New User


Joined: 05 Apr 2010
Posts: 41
Location: Kolkata,India

PostPosted: Tue Jul 10, 2012 4:06 pm    Post subject: Sample JCL for DB2 extract through SYNCSORT
Reply with quote

Hi,

I was trying to run a query through SYNCSORT.I got the below job from net & changed it to my needs.but the job abended.

Code:

//SORTSQL EXEC PGM=SYNCSORT,PARM='DB2=D01G'
//$ORTPARM DD *                           
 VSCORE=5M,VSCORET=40M,MINCORE=5000K       
 OPTION MAINSIZE=40M                       
//SYSOUT   DD SYSOUT=*                     
//SORTOUT  DD SYSOUT=*                     
//SORTIN   DD DUMMY                       
//SORTWK01 DD UNIT=SYSDA,SPACE=(CYL,20)   
//SORTWK02 DD UNIT=SYSDA,SPACE=(CYL,20)   
//SORTDBIN DD *                           
SELECT TRADE_DATE,SETT_DATE               
FROM HUM.TRANS               
//SYSIN    DD *                           
SORT FIELDS=COPY                           
//*                                       


sysout display
Code:

$ORTPARM : VSCORE=5M,VSCORET=40M,MINCORE=5000K
 OPTION MAINSIZE=40M                           
SYSIN :                                       
SORT FIELDS=COPY                               
     *                                         
WER161B  ALTERNATE PARM USED                   
WER275A  NO KEYWORDS FOUND ON CONTROL STATEMENT
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000 
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE 


i'm not sure whats wrong with the SYSIN card.
its not that i'll be using SYNCSORT from now on to hit DB2 but a successful run of this job would definitley make me happier icon_biggrin.gif
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Tue Jul 10, 2012 4:09 pm    Post subject: Re: Sample JCL for DB2 extract through SYNCSORT
Reply with quote

Do you have at least one blank before SORT FIELDS=...? It doesn't show in your post...
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Jul 10, 2012 5:18 pm    Post subject:
Reply with quote

I agree with Bill and I also believe that this statement has enough hints to get you going:
Code:
WER275A  NO KEYWORDS FOUND ON CONTROL STATEMENT
, no?
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Wed Jul 11, 2012 12:01 am    Post subject:
Reply with quote

razesh84 wrote:
but a successful run of this job would definitley make me happier
Also make sure you are having the DB2 loadlib PDSs in the JOBLIB/STEPLIB.
Back to top
View user's profile Send private message
razesh84

New User


Joined: 05 Apr 2010
Posts: 41
Location: Kolkata,India

PostPosted: Wed Jul 11, 2012 12:29 pm    Post subject:
Reply with quote

thanks all

after changing the sysin card it again went down with S806 for DB2 load module DSNACAB

Code:
CSV003I REQUESTED MODULE DSNACAB  NOT FOUND


added DB2 loadlibs as suggested by arun it went smooth icon_biggrin.gif
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Wed Jul 11, 2012 12:38 pm    Post subject:
Reply with quote

razesh84 wrote:
added DB2 loadlibs as suggested by arun it went smooth icon_biggrin.gif
Glad to hear it worked icon_smile.gif
Back to top
View user's profile Send private message
razesh84

New User


Joined: 05 Apr 2010
Posts: 41
Location: Kolkata,India

PostPosted: Wed Jul 11, 2012 2:28 pm    Post subject:
Reply with quote

Arun,

I guess u r using syncsort to unload DB2 tables in your shop.Can you tell me is there any advantage of using syncsort.

Currently, i noticed that it allows DB2 functions & joins while unload.
Yet to compare its reuslt with DSNUTILB or DSNTIAUL.
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Wed Jul 11, 2012 3:44 pm    Post subject:
Reply with quote

Quote:
I guess u r using syncsort to unload DB2 tables in your shop
No, Mostly it is the DB2 High Performance Unload or the DB2 Unload DSNTIAUL. I doubt if the sort product can perform well over these.
Anyways you could try out and let us know since you have all "working" now icon_smile.gif
Back to top
View user's profile Send private message
razesh84

New User


Joined: 05 Apr 2010
Posts: 41
Location: Kolkata,India

PostPosted: Wed Jul 11, 2012 5:33 pm    Post subject:
Reply with quote

Quote:
DB2 High Performance Unload


r u using platinum high performance unload with PTLDRIVM utility?
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Wed Jul 11, 2012 5:34 pm    Post subject:
Reply with quote

No, its IBM DB2 HPU.
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 785
Location: Chennai, India

PostPosted: Wed Jul 11, 2012 5:49 pm    Post subject:
Reply with quote

Yes. Syncsort can be used to extract the data from DB2.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1715
Location: UK

PostPosted: Wed Jul 11, 2012 5:57 pm    Post subject:
Reply with quote

The words are "are you" not "r u"
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Wed Jul 11, 2012 6:10 pm    Post subject:
Reply with quote

Quote:
I guess u r using syncsort


Here is another one. Has probably to do with tanslation from Sanskit to English?
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 Jul 11, 2012 7:01 pm    Post subject: Reply to: Sample JCL for DB2 extract through SYNCSORT
Reply with quote

Quote:
Has probably to do with tanslation from Sanskit to English?
Or too much time spent texting. . .

Chatroom/kiddie texting has no place really in a professional setting. . .

d
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Wed Jul 11, 2012 8:04 pm    Post subject:
Reply with quote

...Only if they understand this...amen.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am
No new posts Syncsort - NULL in Integer field chec... nartcr SYNCSORT 4 Thu Oct 06, 2016 6:47 am
No new posts ICETOOL/SYNCSORT - SYSPRINT output nartcr DFSORT/ICETOOL 17 Wed Oct 05, 2016 10:46 pm
No new posts A sample of exit program for exit XMN... lind sh CICS 2 Mon Oct 03, 2016 5:07 pm


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