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

Not writing to OUTPUT FILE(output file empty)


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kumar1234

New User


Joined: 06 Nov 2007
Posts: 84
Location: bangalore

PostPosted: Tue Mar 04, 2008 8:11 pm
Reply with quote

Hi,

I have a program which reads number of input files and writes it in an output file.

I compiled the prog and then ran it, I got the required output in the output file.
Then again i ran the prog and the job went fine but nothing is written to the output file.
My sysout is showing 100 records read but records written showing 0.
Can anyone let me know what could be the possible reasons for this problem.

Thanks,
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Tue Mar 04, 2008 8:14 pm
Reply with quote

Logic error.
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 Mar 05, 2008 1:08 am
Reply with quote

disp=new?
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6248
Location: Mumbai, India

PostPosted: Wed Mar 05, 2008 1:35 am
Reply with quote

Hi,

Without knowing what the progrm is doing, no one here, at least me cann't predict why the output is empty in 'second' run. As Craq said, logical error.

Did You use the same input file in both the runs? Just another guess.
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1050
Location: Richmond, Virginia

PostPosted: Wed Mar 05, 2008 2:04 am
Reply with quote

Try a DISPLAY before each WRITE.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Wed Mar 05, 2008 2:07 am
Reply with quote

Does the file have a file status and is it being checked after each write?
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 Mar 05, 2008 2:24 am
Reply with quote

Give us information......... icon_idea.gif
Back to top
View user's profile Send private message
kumar1234

New User


Joined: 06 Nov 2007
Posts: 84
Location: bangalore

PostPosted: Wed Mar 05, 2008 12:26 pm
Reply with quote

The output file is having Disp=(,catlg,catlg). And the file is having a file status but we are not checking after every write.

This is what is displayed in my sysout after the successful execution of the prog

PROGRAM B8628800 : SUCCESSFUL EXECUTION
# 02 SEGMENT RECORDS READ: 0441083
# 45 SEGMENT RECORDS READ: 0006441
# TOTAL RECORDS READ : 0022291093
# RECORDS WROTE TO FILE : 0000000
Back to top
View user's profile Send private message
kumar1234

New User


Joined: 06 Nov 2007
Posts: 84
Location: bangalore

PostPosted: Wed Mar 05, 2008 12:45 pm
Reply with quote

Yes I used the same input files for both the runs.
Back to top
View user's profile Send private message
kumar1234

New User


Joined: 06 Nov 2007
Posts: 84
Location: bangalore

PostPosted: Wed Mar 05, 2008 1:43 pm
Reply with quote

I tried giving display after each write and then run the prog. But this display does not come in the sysout. I think there is some problem somewhere near write.
Any other suggestions ? please.
Back to top
View user's profile Send private message
raak

Active User


Joined: 23 May 2006
Posts: 166
Location: chennai

PostPosted: Wed Mar 05, 2008 1:53 pm
Reply with quote

Give us some details of ur input and output file.
Is any file opened in I-O mode?
Back to top
View user's profile Send private message
kumar1234

New User


Joined: 06 Nov 2007
Posts: 84
Location: bangalore

PostPosted: Wed Mar 05, 2008 2:17 pm
Reply with quote

There around 7 input files and 1 output file. And there is one input file which is in I/O mode.......
Back to top
View user's profile Send private message
raak

Active User


Joined: 23 May 2006
Posts: 166
Location: chennai

PostPosted: Wed Mar 05, 2008 3:07 pm
Reply with quote

See whether after contents of I/O file is getting chaged after ur first run.

I am thinking of some scenario in which the content of I/O mode is used to set some switch and once successfully processed the contents of I/O file are overwritten. So when the program enters the second time, the same situation might not exist as the first time ( due to change in contents of I/O file)

anyway its just a guess.. happy researching icon_smile.gif
Back to top
View user's profile Send private message
raak

Active User


Joined: 23 May 2006
Posts: 166
Location: chennai

PostPosted: Wed Mar 05, 2008 3:10 pm
Reply with quote

If all the other input files are same, then I guess the I/O file might be the reason for change in processing.

Try to find out the purpose of using that file in the program...

and do tell us ur findings alsoo icon_lol.gif
Back to top
View user's profile Send private message
Purnendu.it

New User


Joined: 11 May 2007
Posts: 57
Location: chennai

PostPosted: Wed Mar 05, 2008 3:55 pm
Reply with quote

Code:
I compiled the prog and then ran it, I got the required output in the output file.
Then again i ran the prog and the job went fine but nothing is written to the output file.


can you pls show your job[/code]
Back to top
View user's profile Send private message
rpuhlman

New User


Joined: 11 Jun 2007
Posts: 80
Location: Columbus, Ohio

PostPosted: Wed Mar 05, 2008 4:22 pm
Reply with quote

Kumar,

Check your JOB/JES messages. If you have DISP=(,CATLG,CATLG), you are more than likely receiving a JCL error because the dataset has already been cataloged/created. Change the DISP parameter, for your output dataset, to DISP=SHR or DISP=OLD then comment out or remove your UNIT, SPACE and/or DCB parameters as well, before you rerun your JOB. You can also delete the output dataset before you rerun your JOB. Since you have not shown us your JCL, we can only guess as to what problem you are having.

Rick
Back to top
View user's profile Send private message
kumar1234

New User


Joined: 06 Nov 2007
Posts: 84
Location: bangalore

PostPosted: Wed Mar 05, 2008 4:23 pm
Reply with quote

Here is the job which I am executing.........


//BTO1STL1 JOB (00010,TSTACCT,10E5),'KUMAR',
// CLASS=K,MSGCLASS=L,NOTIFY= BTO1STL1
//JOBLIB DD DSN=ADS.TEST.LOADLIB,DISP=SHR
//B8227300 EXEC PGM=IKJEFT1A
//*
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=H
//*
//WDDRN01 DD DUMMY
//*
//GTAMLIB DD DSN=PPMSVSAM.GTAMLIB,DISP=SHR
//ADDRIN DD DSN=LIST.A7550000.EMAIL.ADDRESS(0),DISP=SHR
//*
//FORMATCD DD DSN=PPMS.UTILLIB(COMPRESS),DISP=SHR
//*
//WDDRN02 DD DISP=SHR,DSN=PPMS.SY040010.WDW0101A(+0)
//*
//B8227301 DD DSN=BTO1STL1.CLAIMS.B82270Z0.PIFCLOS1,
// UNIT=TST1,
// DISP=(,CATLG,CATLG),SPACE=(16000,(450,40),RLSE),
// DCB=(RECFM=FB,LRECL=330,BLKSIZE=16500)

//B8227302 DD DISP=SHR,DSN=ADS.PROD.UTILLIB(B8227500)
//*
//B8227303 DD DSN=PCLMVSAM.TOTPOL0,DISP=SHR
//*
//B8227304 DD DSN=PPMSVSAM.FCOCHNGE,DISP=SHR
//*

//B8227305 DD DSN=PPMS.SY015010.WDD2503(+0),DISP=SHR
//*
//B8227306 DD DSN=BTO1STL1.CLAIMS.B8227100.DLYCLM0T,DISP=SHR
//*
//ICNTLTBL DD DSN=CLAIMS.B0601202,DISP=SHR
//ICLMSTBL DD DSN=CLAIMS.YR2K.EXP.B0601502,DISP=SHR
//IELMNTBL DD DSN=CLAIMS.YR2K.EXP.B0601503,DISP=SHR
//IRLTNTBL DD DSN=CLAIMS.YR2K.EXP.B0601504,DISP=SHR
//*
//SYSTSIN DD DSN=ADS.TEST.UTILLIB(B8227600),DISP=SHR
//*
//SYSUDUMP DD SYSOUT=H
//SYSOUT DD SYSOUT=*
//SYSABEND DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSABOUT DD SYSOUT=*
//SYSDBOUT DD SYSOUT=*
//PRNZONE DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//*
Back to top
View user's profile Send private message
rpuhlman

New User


Joined: 11 Jun 2007
Posts: 80
Location: Columbus, Ohio

PostPosted: Wed Mar 05, 2008 4:28 pm
Reply with quote

Kumar,

Hit enter too fast ... check for Not Cat2 message in the JES log for your JOB as well ...

Rick
Back to top
View user's profile Send private message
rpuhlman

New User


Joined: 11 Jun 2007
Posts: 80
Location: Columbus, Ohio

PostPosted: Wed Mar 05, 2008 4:30 pm
Reply with quote

Kumar,

Did you check your JOB in the JES log and read ALL the messages after execution?

Rick
Back to top
View user's profile Send private message
rpuhlman

New User


Joined: 11 Jun 2007
Posts: 80
Location: Columbus, Ohio

PostPosted: Wed Mar 05, 2008 4:36 pm
Reply with quote

Kumar,

Change:

Quote:
//B8227301 DD DSN=BTO1STL1.CLAIMS.B82270Z0.PIFCLOS1,
// UNIT=TST1,
// DISP=(,CATLG,CATLG),SPACE=(16000,(450,40),RLSE),
// DCB=(RECFM=FB,LRECL=330,BLKSIZE=16500)


To:
Quote:
//B8227301 DD DSN=BTO1STL1.CLAIMS.B82270Z0.PIFCLOS1,
//* UNIT=TST1,
// DISP=SHR
//* SPACE=(16000,(450,40),RLSE),
//* DCB=(RECFM=FB,LRECL=330,BLKSIZE=16500)


or:
Quote:
//B8227301 DD DSN=BTO1STL1.CLAIMS.B82270Z0.PIFCLOS1,
// DISP=SHR
Back to top
View user's profile Send private message
kumar1234

New User


Joined: 06 Nov 2007
Posts: 84
Location: bangalore

PostPosted: Wed Mar 05, 2008 5:59 pm
Reply with quote

This is one of the messages that i got from the spool...... There a message as delete for the output dataset, is that anything to do.

U11-001 CA-11 - PARM RECEIVED FOR JOB BHSOO01M - PARM=P
U11-031 * PROC-STEP= STEP=B8227300
U11-073 GDG IN 'P' PROCESSING - DSN=LIST.A7550000.EMAIL.ADDRESS.G0629V00
U11-073 GDG IN 'P' PROCESSING - DSN=PPMS.SY040010.WDW0101A.G0612V00
U11-067 DELETE SCHEDULED FOR DSN = BHSOO01.CLAIMS.B82270Z0.PIFCLOS1
U11-073 GDG IN 'P' PROCESSING - DSN=PPMS.SY015010.WDD2503.G3220V00
U11-031 * PROC-STEP= STEP=B822730A
U11-069 IDC0550I ENTRY (A) BHSOO01.CLAIMS.B82270Z0.PIFCLOS1 DELETED
U11-069 IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 0
U11-069 IDC0002I IDCAMS PROCESSING COMPLETE. MAXIMUM CONDITION CODE WAS 0
U11-010 CA-11 - 'P' PROCESSING COMPLETE FOR JOB BHSOO01M
END OF REPORT 01 - TOTAL ITEMS LISTED= 11
Back to top
View user's profile Send private message
kumar1234

New User


Joined: 06 Nov 2007
Posts: 84
Location: bangalore

PostPosted: Wed Mar 05, 2008 6:01 pm
Reply with quote

sometimes i get as "locate unsuccessful" for that output dataset.
Back to top
View user's profile Send private message
kumar1234

New User


Joined: 06 Nov 2007
Posts: 84
Location: bangalore

PostPosted: Thu Mar 06, 2008 12:51 pm
Reply with quote

Can anyone let me know if any solution for this problem. This is very important.

Thanks.
Back to top
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Thu Mar 06, 2008 1:11 pm
Reply with quote

kumar1234 wrote:
I tried giving display after each write and then run the prog. But this display does not come in the sysout. I think there is some problem somewhere near write.
Any other suggestions ? please.


I could be wrong BUT if you don't see that display you coded just before/after the WRITE... then that code (section, paragraph, IF, ...) is not being executed.

and remember we know nothing about what you're program is doing nor your input data.
Back to top
View user's profile Send private message
raak

Active User


Joined: 23 May 2006
Posts: 166
Location: chennai

PostPosted: Thu Mar 06, 2008 2:42 pm
Reply with quote

did u check the I/O dataset whether it's contents are getting changed after the first run??
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Unable to interpret a hex value to De... COBOL Programming 7
No new posts REXX/CMS How to place command console... CLIST & REXX 4
No new posts Reroute print output via REXX/SDSF TSO/ISPF 6
No new posts Concatenate 2 input datasets and give... JCL & VSAM 2
No new posts how to eliminate null indicator value... DB2 7
Search our Forums:

Back to Top