Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Not writing to OUTPUT FILE(output file empty)
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL
Author Message
kumar1234

Active User


Joined: 06 Nov 2007
Posts: 62
Location: bangalore

PostPosted: Tue Mar 04, 2008 8:11 pm    Post subject: Not writing to OUTPUT FILE(output file empty)
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
References
Craq Giegerich

Senior Member


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

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

Logic error.
Back to top
View user's profile Send private message
Bitneuker

IMS Moderator


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

PostPosted: Wed Mar 05, 2008 1:08 am    Post subject:
Reply with quote

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

Global Moderator


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

PostPosted: Wed Mar 05, 2008 1:35 am    Post subject:
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: 497
Location: Richmond, Virginia

PostPosted: Wed Mar 05, 2008 2:04 am    Post subject:
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: 1027
Location: Virginia, USA

PostPosted: Wed Mar 05, 2008 2:07 am    Post subject:
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

IMS Moderator


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

PostPosted: Wed Mar 05, 2008 2:24 am    Post subject:
Reply with quote

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

Active User


Joined: 06 Nov 2007
Posts: 62
Location: bangalore

PostPosted: Wed Mar 05, 2008 12:26 pm    Post subject: Reply to: Not writing to OUTPUT FILE(output file empty)
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

Active User


Joined: 06 Nov 2007
Posts: 62
Location: bangalore

PostPosted: Wed Mar 05, 2008 12:45 pm    Post subject: Reply to: Not writing to OUTPUT FILE(output file empty)
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

Active User


Joined: 06 Nov 2007
Posts: 62
Location: bangalore

PostPosted: Wed Mar 05, 2008 1:43 pm    Post subject: Reply to: Not writing to OUTPUT FILE(output file empty)
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: 174
Location: chennai

PostPosted: Wed Mar 05, 2008 1:53 pm    Post subject:
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

Active User


Joined: 06 Nov 2007
Posts: 62
Location: bangalore

PostPosted: Wed Mar 05, 2008 2:17 pm    Post subject: Reply to: Not writing to OUTPUT FILE(output file empty)
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: 174
Location: chennai

PostPosted: Wed Mar 05, 2008 3:07 pm    Post subject:
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: 174
Location: chennai

PostPosted: Wed Mar 05, 2008 3:10 pm    Post subject:
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: 40
Location: chennai

PostPosted: Wed Mar 05, 2008 3:55 pm    Post subject: Reply to: Not writing to OUTPUT FILE(output file empty)
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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL All times are GMT + 6 HoursGoto page 1, 2  Next
Page 1 of 2