View previous topic :: View next topic
|
Author |
Message |
pranavaraj
New User
Joined: 03 Jan 2007 Posts: 15 Location: US
|
|
|
|
Hi,
Am trying to execute a select stament from a CLIST. Initially I used DSNTEP2 utility to run the same. But right after the run statement, the clist throws some error message as in the attachment err1.
Then I used DSNTIAUL utility to run the same, am getting RC=12 after executing the RUN statement as in err2. But when I view the sysprint dataset, it shows
DSNT490I SAMPLE DATA UNLOAD PROGRAM
DSNT505I DSNTIAUL OPTIONS USED: SQL
DSNT503I UNLOAD DATA SET SYSPUNCH RECORD LENGTH SET TO 80
But when I run the same command using JCL using IKJEFT01. It completes without a problem.
SYSPRINT as follows,
DSNT490I SAMPLE DATA UNLOAD PROGRAM
DSNT505I DSNTIAUL OPTIONS USED: SQL
DSNT503I UNLOAD DATA SET SYSPUNCH RECORD LENGTH SET TO 80
DSNT504I UNLOAD DATA SET SYSPUNCH BLOCK SIZE SET TO 80
DSNT506I INPUT STATEMENT WAS NOT A FULL SELECT ON A SINGLE TABLE. LOAD STATEMENT WILL NEED MODIFICATION.
DSNT504I UNLOAD DATA SET SYSREC00 BLOCK SIZE SET TO 27200
DSNT495I SUCCESSFUL UNLOAD 1 ROWS OF TABLE TBLNAME
But I couldn't understand why am getting RC=12 while executing the same set of commands via clist. I tried to allocate SYSREC00 DD and checked. But nothing helped.
Please someone help to resolve this. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
pranavaraj wrote: |
Am trying to execute a select stament from a CLIST. |
without a doubt, the third instruction before the select statement is your problem. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Do NOT post "screenshots" - they just waste space and are just clutter. . .
To show the contents of a 3270 terminal, use copy/paste and the "Code" tag. The appearance will look exactly right (use the Preview to confirm this).
What happens if you try to run this same unload process in batch? |
|
Back to top |
|
|
pranavaraj
New User
Joined: 03 Jan 2007 Posts: 15 Location: US
|
|
|
|
Hi Dick,
Sorry for cluttering the space... I will make sure not to make an attachment going forward...
As I stated in my initial post, when I run the same command via JCL using IKJEFT01. It completes without a problem.
SYSPRINT as follows,
DSNT490I SAMPLE DATA UNLOAD PROGRAM
DSNT505I DSNTIAUL OPTIONS USED: SQL
DSNT503I UNLOAD DATA SET SYSPUNCH RECORD LENGTH SET TO 80
DSNT504I UNLOAD DATA SET SYSPUNCH BLOCK SIZE SET TO 80
DSNT506I INPUT STATEMENT WAS NOT A FULL SELECT ON A SINGLE TABLE. LOAD STATEMENT WILL NEED MODIFICATION.
DSNT504I UNLOAD DATA SET SYSREC00 BLOCK SIZE SET TO 27200
DSNT495I SUCCESSFUL UNLOAD 1 ROWS OF TABLE TBLNAME
It's looks strange... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Is the jcl from both runs the same jcl? If yes, please post the jcl and control statements. If no, please post both sets of jcl and control statements.
Remember the Code tag. . . |
|
Back to top |
|
|
pranavaraj
New User
Joined: 03 Jan 2007 Posts: 15 Location: US
|
|
|
|
Here is the JCL,
//JSTEP02 EXEC PGM=IKJEFT01,DYNAMNBR=100
//*
//SYSREC00 DD DSN=MTDT.TEST.UNLOAD.DATA.DT052810,
// DISP=(NEW,CATLG,DELETE),
// DCB=(LRECL=850,RECFM=FB,BLKSIZE=0),
// SPACE=(CYL,(50,50),RLSE)
//*
//SYSPUNCH DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSTSIN DD *
DSN SYSTEM(TBTG)
RUN PROGRAM(DSNTIAUL) PLAN(DSNTIAUL) PARMS('SQL') -
LIB('ADBP.TBTG.RUNLIB.LOAD')
/*
//SYSIN DD *
SELECT VCRG_LSTKEY, VCRG_CCB, VCRG_BEGIN_RANGE,
VCRG_END_RANGE, VCRG_PARTID,
VCRG_DESCRIP
FROM DBAFTSTB.TBA_VCRG_RANGE
WHERE VCRG_BEGIN_RANGE LIKE 'CK0000001%';
/*
Clist Statements,
ALLOC F(SYSREC00) DS(&OUTDSN) SHR REUSE
ALLOC F(SYSOUT) SYSOUT
ALLOC F(SYSIN) LRECL(137) RECFM(F B) SP(1 1) TRACK
OPENFILE SYSIN OUTPUT
SET SYSIN = &STR( SELECT VCRG_LSTKEY, VCRG_CCB, VCRG_BEGIN_RANGE,
PUTFILE SYSIN
SET SYSIN = &STR( VCRG_END_RANGE, VCRG_PARTID,
PUTFILE SYSIN
SET SYSIN = &STR( VCRG_DESCRIP
PUTFILE SYSIN
SET SYSIN = &STR( FROM &CREATOR..TBA_VCRG_RANGE
PUTFILE SYSIN
SET SYSIN = &STR( WHERE VCRG_BEGIN_RANGE LIKE '&VBR%';
PUTFILE SYSIN
CLOSFILE SYSIN
DSN SYSTEM(&ID)
SET LASTCC = 0
WRITE &LASTCC
RUN PROGRAM(DSNTIAUL) PLAN(DSNTIAUL) PARMS('SQL') LIB('ADBP.&ID..RUNLIIB.LOAD')
END
WRITE &LASTCC
As soon the CLIST encounters the RUN statement, its ending with RC=12. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
The first thing I would do is to create your SYSIN as a permanent dataset and make sure that the correct statements are being generated by the CLIST code.
And why CLIST - REXX is a zillion times easier to use. |
|
Back to top |
|
|
pranavaraj
New User
Joined: 03 Jan 2007 Posts: 15 Location: US
|
|
|
|
Hi Expat,
I tried that.. But no use,.. Again the same RC=12..
I accept REXX is better than CLIST, but the clients want it in CLIST.., |
|
Back to top |
|
|
pranavaraj
New User
Joined: 03 Jan 2007 Posts: 15 Location: US
|
|
|
|
Hi All,
It's working fine now.. I missed to allocate SYSPUNCH in my clist and when I did the same, it worked like a charm...
Thanks for all the help... |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Thanks for letting us know |
|
Back to top |
|
|
|