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

Selective table Unload resulting in an extra byte file


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
meenakshi_forum
Warnings : 1

Active User


Joined: 27 May 2008
Posts: 121
Location: India

PostPosted: Sat May 22, 2010 9:32 am
Reply with quote

Hi,

I am doing a selective table unload whose output would be a flat file.

In my sql query the first parameter is of 26 bytes, second is also of 26 bytes, third and 4th have values within 30 bytes.


So i have declared the LRECL length of the output file in my Unload JCL as 112 .

The first two fields are timestamp, third is just a constant(literal) and fourth will have the actual value of the field.

I am taking 3 and 4th field as 30 bytes because the same query i will run for other fields also and no field has length more than 30 bytes.

I am writing the query here--

SELECT SAT_VAL, DAT_VAL,
CAST('FA_NUM' AS CHAR(30)), CAST(FA_NUM AS CHAR(30))
FROM ABTDBPT.ACCT_ATTR
WHERE FA_NUM=6789 WITH UR;

FA_NUM IS A NOT NULL FIELD.

After i run this unload JCL, the output file generated shows 113 bytes as the length though i have declared LRECL as 112 in my JCL.

What i see is a low value in the 53rd byte of the output file though it is unexpected and in the SYSPUNCH output file(after the job is executed) in the same JCL, i see in the layout at the 53rd byte it is written 'NULL IF ?'

Please let me know how low value has come in the flat file and why
'NULL IF ?' is embeded in the SYSPUNCH output file though the field is NOT NULL.

I have ran this query in the same format with other NULL and NOT NULL fields but i never saw this change there.

Please help.

Thanks
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Sat May 22, 2010 8:57 pm
Reply with quote

Meenakshi,

Can you show us your JCL, it worked fine for me
Code:
//STEP0001 EXEC PGM=IKJEFT01,                                 
//             DYNAMNBR=20                                   
//SYSTSIN  DD  *                                             
DSN SYSTEM(DB2D)                                             
RUN PROGRAM(DSNTIAUL) PLAN(DSNTIAUL) PARMS('SQL,1000') -     
LIB('DB2.POPR.PROD.RUNLIB.LOAD')                             
 END                                                         
//SYSTSPRT DD  SYSOUT=*                                       
//SYSPRINT DD  SYSOUT=*                                       
//SYSREC00 DD  DSN=HXSULL.UL.TEST,DISP=(NEW,KEEP),           
//             UNIT=SYSDA,                                   
//             SPACE=(TRK,(5,5),RLSE)                         
//SYSPUNCH DD  DSN=HXSULL.LOAD.CARDS(TEST),DISP=SHR           
//SYSOUT   DD  SYSOUT=*                                       
//SYSIN    DD  *                                             
  SELECT  CURRENT TIMESTAMP AS A,CURRENT TIMESTAMP AS B,     
  CAST('FA_NUM' AS CHAR(30)) AS C                             
  FROM SYSIBM.SYSDUMMY1;                                     
/*                                                           


Thank You,
Sushanth
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 -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 2
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top