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

Sample JCL for DB2 extract through SYNCSORT


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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

Moderator Emeritus


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

PostPosted: Tue Jul 10, 2012 4:09 pm
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

Superior Member


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

PostPosted: Tue Jul 10, 2012 5:18 pm
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: 2481
Location: @my desk

PostPosted: Wed Jul 11, 2012 12:01 am
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
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: 2481
Location: @my desk

PostPosted: Wed Jul 11, 2012 12:38 pm
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
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: 2481
Location: @my desk

PostPosted: Wed Jul 11, 2012 3:44 pm
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
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: 2481
Location: @my desk

PostPosted: Wed Jul 11, 2012 5:34 pm
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: 792
Location: Chennai, India

PostPosted: Wed Jul 11, 2012 5:49 pm
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: 2455
Location: Hampshire, UK

PostPosted: Wed Jul 11, 2012 5:57 pm
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: 2481
Location: Netherlands, Amstelveen

PostPosted: Wed Jul 11, 2012 6:10 pm
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

Moderator Emeritus


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

PostPosted: Wed Jul 11, 2012 7:01 pm
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

Superior Member


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

PostPosted: Wed Jul 11, 2012 8:04 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
No new posts optim extract file - SAS DB2 2
No new posts How to extract the data for current y... DFSORT/ICETOOL 8
No new posts Extract record using 2 input file int... JCL & VSAM 2
Search our Forums:

Back to Top