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

what does FLUSH do?


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Fri Sep 01, 2017 8:32 pm
Reply with quote

From the manual: "The FLUSH statement flushes the buffers associated with an open output file... [blah blah]"

It is not clear what 'flushes' means. It seems destructive.

Or does it mean that the buffers actually make it to the print file?
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 917
Location: The Universe

PostPosted: Fri Sep 01, 2017 9:26 pm
Reply with quote

Pedro wrote:
From the manual: "The FLUSH statement flushes the buffers associated with an open output file... [blah blah]" ...
Which manual? I searched the entire DFSMS manual set and found no "FLUSH" macro.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Sat Sep 02, 2017 2:47 am
Reply with quote

Sorry for not being clear.

I posted this question in the PLI & Assembler forum... it is a PLI question. I was referring to the Language Reference, SC14-7285.
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Sat Sep 02, 2017 4:00 am
Reply with quote

FLUSH statement
The FLUSH statement can be used to flush one or all files.

Code:
FLUSH -+- FILE(file-reference) -+- ;
       +- FILE(*) --------------+

FILE
Specifies the name of the output file.
The FLUSH statement flushes the buffers associated with an open output file (or with all open output files if * is specified). This normally happens when the file is closed or the program ends, but the FLUSH statement ensures the buffers are flushed before any other processing occurs.

You can do this for SYSPRINT (after a PUT DATA) to make the output immediately visible in, for example, SDSF.
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

PostPosted: Mon Sep 04, 2017 1:35 pm
Reply with quote

FLUSH normally means writing the buffers to ther destination. This is not just a PL/I thing.
Back to top
View user's profile Send private message
Bernie Rataj

New User


Joined: 02 Jun 2018
Posts: 2
Location: Canada

PostPosted: Thu Jun 14, 2018 11:20 pm
Reply with quote

The FLUSH statement doesn't currently work for record files. See APAR PI95695.
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 -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts Difference between CICS region bounce... CICS 3
No new posts Flush a queue in CICS CICS 4
No new posts Conds for a flush step JCL & VSAM 7
Search our Forums:

Back to Top