View previous topic :: View next topic
|
Author |
Message |
nkumar
New User
Joined: 09 Mar 2008 Posts: 28 Location: USA
|
|
|
|
Hi
I am executing following JCL for which I am getting a formatted result.
Code: |
//SPUFI EXEC PGM=IKJEFT01,DYNAMNBR=100
//SYSTSIN DD *
DSN SYSTEM(DBD)
RUN PROGRAM(DSNTEP2) PARM('ALIGN(LHS)') PLAN(DSNTEP2) +
LIB('NDB2P.DSN.SDSNLOAD')
END
/*
//SYSIN DD *
SELECT MASTER_ID, COMANY_CODE
FROM V1LFODAN.CONTE
FETCH FIRST 2 ROWS ONLY;
/*
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*,OUTLIM=500 |
Result -
Code: |
1PAGE 1
***INPUT STATEMENT:
SELECT MASTER_ID, COMPANY_CODE
FROM V1LFODAN.CONTE
FETCH FIRST 2 ROWS ONLY;
+--------------------------------+
| MASTER_ID | COMPANY_CODE |
+--------------------------------+
1_| 2307946355 | 023 |
2_| 2307947052 | 023 |
+--------------------------------+
0SUCCESSFUL RETRIEVAL OF 2 ROW(S) |
But I need to get result with out any formatting.(Which I will put into file to be used as input in further step.)
Code: |
2307946355 023
2307947052 023 |
Can anyone please help. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Nitesh,
Use DSNTIAUL program which unloads the data in the same format as in the table. You'll have to do additional formatting in the SQL to make it in desired format. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Nitesh,
Here's a sample job.
Code: |
//PS100 EXEC PGM=IKJEFT1A,DYNAMNBR=100
//*
//SYSREC00 DD DSN=Output.dataset,
//*
//SYSTSPRT DD SYSOUT=*
//SYSPUNCH DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//*
//SYSIN DD *
your sql
//SYSTSIN DD *
DSN SYSTEM(DBD)
RUN PROGRAM(DSNTIAUL) PLAN(DSNTIAUL) PARM('SQL') -
LIB('NDB2P.DSN.SDSNLOAD')
END
/* |
|
|
Back to top |
|
|
nkumar
New User
Joined: 09 Mar 2008 Posts: 28 Location: USA
|
|
|
|
Hi Arun, Thanks for the reply.
I tried to execute the JCL suggested by you but nothing comes in the output dataset(NCDPNXK.SPUFI.RESULT1). I get the result in sysout but that is still formatted.
Here is the jcl i m using now
Code: |
//SPUFI EXEC PGM=IKJEFT1A,DYNAMNBR=100
//SYSREC00 DD DSN=NCDPNXK.SPUFI.RESULT1,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSPUNCH DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN DD *
SELECT MASTER_ID,COMPANY_CODE
FROM V1LFODAN.CONTE
FETCH FIRST 2 ROWS ONLY;
/*
//SYSTSIN DD *
DSN SYSTEM(DBD)
RUN PROGRAM(DSNTEP2) PARM('ALIGN(LHS)') PLAN(DSNTEP2) +
LIB('NDB2P.DSN.SDSNLOAD')
END
/* |
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Look at Arun's RUN PROGRAM statement, then look at yours. . . |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Quote: |
I tried to execute the JCL suggested by you |
Nitesh,
Unfortunately, you did not. You're still executing DSNTEP2 program which produces output in a report format. |
|
Back to top |
|
|
nkumar
New User
Joined: 09 Mar 2008 Posts: 28 Location: USA
|
|
|
|
It was my mistake......m sorry.....
Thanks Arun, it worked fine........ |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Quote: |
It was my mistake......m sorry.....
Thanks Arun, it worked fine........ |
Nitesh,
Not to worry. You're welcome. |
|
Back to top |
|
|
|