Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Prodcuing an output file only on Friday?
Hi,

Is it possible to control the output files from a COBOL programs? I've
a requirement where I will have to produce the output file (a report)
only on Fridays in a year.

How to get it done? We are using "IBM Enterprise COBOL for z/OS and
OS/390 3.2.0"

Please help.


Report this thread to moderator Post Follow-up to this message
Old Post
arrbee
04-21-06 08:55 AM


Re: Prodcuing an output file only on Friday?
"arrbee" <arrbee@gmail.com> wrote in message
news:1145604671.952859.159440@v46g2000cwv.googlegroups.com...
> Hi,
>
> Is it possible to control the output files from a COBOL programs? I've
> a requirement where I will have to produce the output file (a report)
> only on Fridays in a year.
>
> How to get it done? We are using "IBM Enterprise COBOL for z/OS and
> OS/390 3.2.0"

Maybe using something like this.

01 d-o-w pic 9.
88 friday value 5.

accept d-o-w from day-of-w
if friday
perform produce-report
end-if

Unless you are looking for a solution using JCL or
job scheduling. In which case, I will defer to others.




Report this thread to moderator Post Follow-up to this message
Old Post
Rick Smith
04-21-06 08:55 AM


Re: Prodcuing an output file only on Friday?
There are also several other "COBOL language" options - depending upon exact
ly
WHAT you are looking for.

Certainly, if you are looking for a way to "dynamically allocate" the file (
only
on Fridays) then you would want to look at the "dynamic file allocation"
information available with Enterprise COBOL.

--
Bill Klein
wmklein <at> ix.netcom.com
"Rick Smith" <ricksmith@mfi.net> wrote in message
news:124h4ca8bpmba9b@corp.supernews.com...
>
> "arrbee" <arrbee@gmail.com> wrote in message
> news:1145604671.952859.159440@v46g2000cwv.googlegroups.com... 
>
> Maybe using something like this.
>
>    01 d-o-w pic 9.
>    88 friday value 5.
>
>    accept d-o-w from day-of-w
>    if friday
>        perform produce-report
>    end-if
>
> Unless you are looking for a solution using JCL or
> job scheduling. In which case, I will defer to others.
>
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
William M. Klein
04-21-06 08:55 AM


Re: Prodcuing an output file only on Friday?
Hi Rick, Thank you very much. I want to achieve it programatically. Of
course, we eventually execute JCL with this program load
module........:-)


Report this thread to moderator Post Follow-up to this message
Old Post
arrbee
04-21-06 12:55 PM


Re: Prodcuing an output file only on Friday?
arrbee wrote:
> Hi,
>
> Is it possible to control the output files from a COBOL programs? I've
> a requirement where I will have to produce the output file (a report)
> only on Fridays in a year.
>
> How to get it done? We are using "IBM Enterprise COBOL for z/OS and
> OS/390 3.2.0"
>
> Please help.

Produce the file every day and tell the end-user to access the file only on
Fridays.

This technique transfers ownership of the problem to someone else.



Report this thread to moderator Post Follow-up to this message
Old Post
HeyBub
04-21-06 12:55 PM


Re: Prodcuing an output file only on Friday?
arrbee wrote:
> Hi,
>
> Is it possible to control the output files from a COBOL programs? I've
> a requirement where I will have to produce the output file (a report)
> only on Fridays in a year.
>
> How to get it done? We are using "IBM Enterprise COBOL for z/OS and
> OS/390 3.2.0"
>
> Please help.
>

All output from Cobol is controled by Cobol programs, yes. If you only
want to get the report on Fridays, I'd suggest that you only run it on
fridays. Few programs will do anything if you do not run them.  Failing
that, have the program check the date to see if it is Friday, and bypass
the report if it is not.

Donald



Report this thread to moderator Post Follow-up to this message
Old Post
Donald Tees
04-21-06 11:55 PM


Re: Prodcuing an output file only on Friday?
On 21 Apr 2006 00:31:12 -0700, "arrbee" <arrbee@gmail.com> enlightened
us:

>Hi,
>
>Is it possible to control the output files from a COBOL programs? I've
>a requirement where I will have to produce the output file (a report)
>only on Fridays in a year.
>
>How to get it done? We are using "IBM Enterprise COBOL for z/OS and
>OS/390 3.2.0"
>
>Please help.

Use a date routine to determine what "today" is.  If Friday, produce
report, otherwise end.

Regards,
////
(o o)
-oOO--(_)--OOo-


"Do stars clean themselves with meteor showers?"
-- George Carlin
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Remove nospam to email me.

Steve

Report this thread to moderator Post Follow-up to this message
Old Post
SkippyPB
04-21-06 11:55 PM


Re: Prodcuing an output file only on Friday?
On Fri, 21 Apr 2006 08:46:26 -0500, "HeyBub" <heybubNOSPAM@gmail.com>
enlightened us:

>arrbee wrote: 
>
>Produce the file every day and tell the end-user to access the file only on
>Fridays.
>
>This technique transfers ownership of the problem to someone else.
>

And this solution will not gain you any friends within your user
organization.

Regards,
////
(o o)
-oOO--(_)--OOo-


"Do stars clean themselves with meteor showers?"
-- George Carlin
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Remove nospam to email me.

Steve

Report this thread to moderator Post Follow-up to this message
Old Post
SkippyPB
04-21-06 11:55 PM


Re: Prodcuing an output file only on Friday?
In article <124h4ca8bpmba9b@corp.supernews.com>,
Rick Smith <ricksmith@mfi.net> wrote:
>
>"arrbee" <arrbee@gmail.com> wrote in message
>news:1145604671.952859.159440@v46g2000cwv.googlegroups.com... 
>
>Maybe using something like this.
>
>    01 d-o-w pic 9.
>    88 friday value 5.
>
>    accept d-o-w from day-of-w
>    if friday
>        perform produce-report
>    end-if

The advantage of this solution is that it allows for a tendency for report
results to be demanded with increasing frequency... annuals become
quarterlies, quarterlies become wlies, wlies become dailies and
dailies become ad-hocs.  To modify the abovegiven example for future use
one might use something along the lines of:

01  d-o-w pic 9.
88  monday     value  1.
88  tuesday    value  2.
88  wednesday  value  3.
88  thursday   value  4.
88  friday     value  5.
88  saturday   value  6.
88  sunday     value  7.
88  report-needed-today
values 5.
...
accept d-o-w from day-of-w.
evaluate true
when report-needed-today
perform produce-report-ritual
thru   prr-ex
end-evaluate.
...
produce-report-ritual.
evaluate true
when friday
perform produce-friday-report
thru   pfr-ex
when other
perform report-error-ritual
thru   rer-ex
go to blow-up-program
end-evaluate

... et and cetera.  This way when - *not* 'if' - a user says 'Well, on
Thursday we'll want Tuesday's report... but broken down by division, not
department, and including the miscellaneous graft and corruption figures
and sorted on descending barometric pressure'... or something like that...
the values clause for report-needed-today gets changed, the evaluate in
produce-report-ritual gets expanded and, as BritSpeakers sometimes say,
your mother's brother's name is Robert.

(note that perform thru and go to constructs are used because they are,
inarguably, the best possible styles available... and I, of course, am the
King of England)

DD


Report this thread to moderator Post Follow-up to this message
Old Post

04-21-06 11:55 PM


Re: Prodcuing an output file only on Friday?
> I will have to produce the output file (a report)
> only on Fridays in a year.

Except on Easter w when it is to be done on Thurday ?

And, if Christamas day is Friday, then do it Wednesday ?

And, for ThanksGiving ...


Report this thread to moderator Post Follow-up to this message
Old Post
Richard
04-21-06 11:55 PM


Sponsored Links




Last Thread Next Thread Next
Pages (9): [1] 2 3 4 5 6 » ... Last »
Search this forum -> 
Post New Thread

Cobol archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 09:42 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.