Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Selective table Unload resulting in an extra byte file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Selective table Unload resulting in an extra byte file
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: 1013
Location: India

PostPosted: Sat May 22, 2010 8:57 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts SSH - known_hosts file configuration vasanthz All Other Mainframe Topics 2 Wed Jul 26, 2017 2:10 am
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 19 Thu Jul 13, 2017 2:11 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us