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

Unload file with empty zero's


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

New User


Joined: 06 Mar 2006
Posts: 35

PostPosted: Wed Jun 27, 2007 12:57 am
Reply with quote

Hi

I am using unload JCL and when ever i run this unload it says right number of rows unlaoded but when i see the file first row is unloaded correctly and rest of the rows have just zero's in all the columns.

i checked my jcl and iam using the right format. Can anyone tell me what i should change.

below is my unload jcl

Code:

//STEP1 EXEC PGM=IKJEFT01,DYNAMNBR=20,TIME=120,REGION=3072K         
//STEPLIB DD DSN=SYS2.SDSNLOAD,DISP=SHR                     
//ISPPROF DD UNIT=SYSDA,SPACE=(TRK,(9,1,4)),                       
// LRECL=175,BLKSIZE=27825,RECFM=FB
//SYSUDUMP DD SYSOUT=*                                             
//SYSOUT DD SYSOUT=*                                               
//REPORT DD SYSOUT=*                                               
//SYSTSPRT DD SYSOUT=*                                             
//SYSTSIN DD *                                                     
DSN SYSTEM(QADB)                                                   
RUN PROGRAM(DSNTIAUL) PLAN(DSNTIB81) PARMS('SQL') -                 
LIB('SYS3.RUNLIB.LOAD')                                     
END                                                                 
//SYSPRINT DD SYSOUT=*                                             
//SYSPUNCH DD DSN=UNLOAD.SYSPUN5,                               
// DISP=(,CATLG,KEEP),                                           
// SPACE=(CYL,(200,200),RLSE),                                     
// UNIT=SYSDA                                                       
//SYSREC00 DD DSN=UNLOAD.SYSREC5, 
// DISP=(,CATLG,KEEP),                       
// SPACE=(CYL,(200,200),RLSE),                 
// UNIT=SYSDA                                   
//SYSIN DD *                                   
SELECT * FROM MY.TABLE1 ;       


Out put shows 100 rows unloaded bt the file has

PK0000000000
000000000000
000000000000

Thanks,
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Wed Jun 27, 2007 1:40 am
Reply with quote

Hello,

What happens if you run this
Code:
SELECT * FROM MY.TABLE1 ;
in spufi or qmf?

Do you get 100 correct rows?
Back to top
View user's profile Send private message
GANAPATH

New User


Joined: 06 Mar 2006
Posts: 35

PostPosted: Wed Jun 27, 2007 2:06 am
Reply with quote

Yes i see the right data and all the 100 rows.

Thanks
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Wed Jun 27, 2007 2:24 am
Reply with quote

Hello,

Does each row have only 12 bytes?

If you browse the SYSPUNCH and SYSREC00 datasets, what is in them?

Has this unload ever worked for this table?

Does your site have multiple db2 environments? If so, is there any chance that your unload is not running against the same actual table that "works" with spufi?
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Wed Jun 27, 2007 2:30 am
Reply with quote

Is it correct I'm missing the DCB parameters for SYSPUNCH and SYSREC00?
Back to top
View user's profile Send private message
Naresh Kumar Reddy P

New User


Joined: 24 May 2007
Posts: 8
Location: Bangalore

PostPosted: Wed Jun 27, 2007 10:48 am
Reply with quote

Need a clarification here..
If the problem is with DCB parameters, how the same unload job has successfully retrieved the first record from your table? Can some please clarify..

Thanks
Reddy
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Wed Jun 27, 2007 1:34 pm
Reply with quote

Hello,

This
Quote:
If the problem is with DCB parameters
may or may not be part of the problem. It was just an observation of something that may be incomplete.

When Ganapath replies with the answers to the previous questions, we may learn more.
Back to top
View user's profile Send private message
wanderer

Active User


Joined: 05 Feb 2007
Posts: 199
Location: Sri Lanka

PostPosted: Wed Jun 27, 2007 11:07 pm
Reply with quote

I doubt DCB is problem. For punch usually LRECL 80 is given and SYSREC most of the time no one supplies any DCB. And manual also doesn't say it is mandatory.
Back to top
View user's profile Send private message
sandeep1dimri

New User


Joined: 30 Oct 2006
Posts: 76

PostPosted: Thu Jun 28, 2007 11:04 am
Reply with quote

//STEP1 EXEC PGM=IKJEFT01,DYNAMNBR=20,TIME=120,REGION=3072K
//STEPLIB DD DSN=SYS2.SDSNLOAD,DISP=SHR
//ISPPROF DD UNIT=SYSDA,SPACE=(TRK,(9,1,4)),
// LRECL=175,BLKSIZE=27825,RECFM=FB
//SYSUDUMP DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//REPORT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
DSN SYSTEM(QADB)
RUN PROGRAM(DSNTIAUL) PLAN(DSNTIB81) PARMS('SQL') -
LIB('SYS3.RUNLIB.LOAD')
END
//SYSPRINT DD SYSOUT=*
//SYSPUNCH DD dummy
//SYSREC00 DD DSN=UNLOAD.SYSREC5,
// DISP=(,CATLG,KEEP),
// SPACE=(CYL,(200,200),RLSE),
// UNIT=SYSDA
//SYSIN DD *
SELECT * FROM MY.TABLE1 ;


plse try the above as I could to simulate that is happending with ur unload

sandeep
Back to top
View user's profile Send private message
GANAPATH

New User


Joined: 06 Mar 2006
Posts: 35

PostPosted: Fri Jun 29, 2007 8:37 pm
Reply with quote

I tried with with all the options mentioned in this post. Nothing is working.Syspunch comes out correctly every time but not the sysrec, if i have multiple columns in the table then only the first row comes out correct and rest of the rows are just zero's, previously this JCl used to work correctly but now it is not working.
No we don't support multiple DB2 versions and also the sub system I am using does not support mixed data.

The one thing I observed is the last column I have spaces in it so it comes as zero's so i even tried selective unload eliminating that column so that the last field has data and that also didn't work - always the first row has data and rest of them are zeros.

Thanks
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Fri Jun 29, 2007 8:47 pm
Reply with quote

Hello,

Please post the table definition (the sql create table. . .).
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts IGYPG3178-I when compiling a pgm read... COBOL Programming 6
No new posts FileAid move data from two files to o... Compuware & Other Tools 5
No new posts Sorting date into YYYYMMDD, and creat... DFSORT/ICETOOL 13
No new posts To Sort detail records in a file with... SYNCSORT 5
No new posts To Populate Trailer cnt in the file w... SYNCSORT 1
Search our Forums:


Back to Top