I need to unload all fields of a table using Jcl In a Single PS file as output. Table has C or TSI or L type of fields ( three types of fields are there in table)
I used below Jcl to unload a table whose fields types are either C or TSI only and all fields got uloaded into output file without an issue.
But when I am using the same query to unload the table which also have field type as 'L' then Jobs are getting completed and even fields are getting unloaded into output file except the fields whose type is 'L' .Job is not giving any error its getting completed byt Two fields whose type are L not getting unloaded into output file.
Please provide a Jcl which will unload all fields of that table into a single output file.
At the bottom I have mentioed how that table fields looks like.
///***********UNLOAD JCL WHICH I HAVE USED***********///
//*STEP020 EXEC PGM=IKJEFT01,DYNAMNBR=20
//*STEPLIB DD DSN=IC***.RUNLIB.LOAD,DISP=SHR
//*SYSTSPRT DD SYSOUT=*
//*SYSTSIN DD *
//* DSN SYSTEM(DB**)
//* RUN PROGRAM(DSNTIAUL) PLAN(DSNTIAUL) PARM ('SQL')
//* END
//*SYSPRINT DD SYSOUT=*
//*SYSDUMP DD SYSOUT=*
//*
//*SYSREC00 DD DSN=IC***.*******.OUTPUT,
//* DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,
//* DCB=(RECFM=FB,LRECL=800,BLKSIZE=8000),
//* SPACE=(1470,(100,50),RLSE)
//*SYSPUNCH DD DUMMY,
//* DCB=(LRECL=135,BLKSIZE=1485,RECFM=FB)
//*SYSIN DD *
SEELECT *
FROM DB2.table name.
with ur;
/*
///*****************************************TABLE FIELDS DETAILS***************************************
NUM COLUMN HEADING WIDTH EDIT SEQ
--- ---------------------------------------- ------- ------ ----- ----- ---
1 DIV_NO 3 C 1
2 PRD_NO 5 C 2
3 PLN_DTL_TYP_CD 3 C 3
4 LN_NO 2 C 4
5 SBL_NO 3 C 5
6 SBL_VAR_NO 3 C 6
7 MTH_RNG_QT 6 L 7
8 TOT_DAYS_AVL_NO 6 L 8
9 PRD_DS 25 C 9
10 USR_LST_UPD_CD 7 C 10
11 LST_MTC_TS 26 TSI 11
12 CRT_ASC_CD 7 C 12
13 CRT_TS 26 TSI 13
Please provide jcl If anyone have. I am not able to unload fields MTH_RNG_QT and TOT_DAYS_AVL_NO while using my above mentioned jcl (at top).
Have also attached table fields detail if it is not clear here.
Thanks.
Coded, attachment deleted