HP3000-L Archives

May 2002, Week 5

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Paul H. Christidis" <[log in to unmask]>
Reply To:
Date:
Wed, 29 May 2002 15:17:16 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (96 lines)
Donna,

The command file below will place into variables the needed 'date range'
for any month/year combination.  Since I don't know how the sample stream
file that you included is generated I cannot indicate how you'd incorporate
the variables set by my command file.

If the file is 'static' then the command file can be modified to 'print'
the static file in sections and in the process insert the needed variables.

Regards
Paul Christidis

---------------------------> Start Cut *+1
 parm month =!hpmonth, year=!hpyyyy
 setvar _month !month
 setvar _hp4y  !year
 setvar _feb_days "28"
 if (_hp4y mod 4 = 0 and (_hp4y mod 100 <> 0 or _hp4y mod 400 = 0)) then
    setvar _feb_days "29"
 endif
 setvar _days_per_month "#31" + _feb_days + "31303130313130313031"
 setvar _LastMDay       STR(_days_per_month,(_month LSL 1),2)
 setvar Month_Start "!_hp4y" + "![RHT("0!_month",2)]" + "01"
 setvar Month_End   "!_hp4y" + "![RHT("0!_month",2)]" + "!_LastMDay"
 setvar Month_Range Month_Start + Month_End
 deletevar _days_per_month, _feb_days, _LastMDay
 showvar month_@
--------------------------> End Cut *-1



Hi All -

I'm trying to automate a report out of our production software (Ecometry)
that we run 23 times at the end of the month for each reason code.  We are
on MPE 6.5 PP2..

I'm trying to creat a command file that would run these but I'm not sure
how
I can default the date range each month
so that it reflects the current whole month for each report in the job
card..    In other words, if the command file is generated at the end of
the
month (May) after Dayclose, I would like the job in the command file to
reflect the current month like this: 2002050120020531.  Is there any
command
that would specify the first through the last day of the month that you are
generating the report.

This is the how the LISTFTEMP file looks:


!JOB PRODRETU,JOBS.SGAII / ;PRI=DS;INPRI=01;OUTCLASS=WHLASER2,01

!SETVAR SGAINFO 'MGR.SGAII '

!FILE PRODRETU;DEV=WHLASER2,,01

!FILE PRNTFILE=*PRODRETU

!RUN RTNPRINT.CODE2.!SG2VER;LIB=G;PARM=1

PRODRETURN

WHLASER2

ORDER NO



2002050120020531

0101 Y


<< blank lines were removed >>


!EOJ


Any ideas or help is greatly appreciated.  Thanks very much in advance!!

Donna Rivett

HP/Ecometry Admin

Northern Safety Company

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2