Below is my JCL from running a datamining query, but when i see the output in sysprint or dataset the output is given in two pages because of selecting many fields. I mean in 2 rows split with the field headers.
Is there any way to bring the headers in a single line and results to be underneath them.
//SYSPRINT DD DSN=TEST.MASAG.SPUFI1,
//SYSUDUMP DD SYSOUT=*
//SYSTSIN DD *
RUN PROGRAM(DSNTEP2) PLAN(DSNTEP2) LIB('DEVDB2.SAMPLE.RUNLIB.LOAD')
//SYSIN DD *
SELECT A.ABC_NR, A.ABC_STATUS_KODE,
B.ABC_NR, B.ABC_KODE, B.ABC_DAT,
D.DEFA_CODE, D.DEFA_CODE, D.DEF_TO_DATE,
F. QQQQQ, F.EEEEEE
FROM CREATORID. TABLE1 A,
What makes you believe that this will solve the OP's problem? Have you tried this before posting?
Welcome to the forums.
If you're running the program-DSNTEP2 , output will be in report format and the output dataset must be of LRECL=133.
Instead you can use the unload program-DSNTIAUL which unloads the table data as is to your output file which can have a maximum of 32760 bytes.
See this previous thread for more details.
Its unloading but its giving warning message(RC=0004) that its not a unload from single table though its a join select query.
Please see the message below
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 STATEMEN
DSNT503I UNLOAD DATA SET SYSREC00 RECORD LENGTH SET TO 85
DSNT504I UNLOAD DATA SET SYSREC00 BLOCK SIZE SET TO 27965
DSNT495I SUCCESSFUL UNLOAD 100 ROWS OF TABLE TBLNAME
It's just a warning message since your unload does not contain a 'SELECT *' or it does have SELECT FROM multiple tables and hence DSNTIAUL is unable to generate the corresponding LOAD card. See what the manual says about this here