HP3000-L Archives

January 2000, Week 4

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:
Joe Torregrossa <[log in to unmask]>
Reply To:
Joe Torregrossa <[log in to unmask]>
Date:
Mon, 24 Jan 2000 14:10:52 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (104 lines)
We had a problem with the date also, here's what I find out:

Here's the information we discussed regarding the CI variable
HPYEAR:

HPYEAR will return the date in INTEGER format ("0" not "00" for year
2000)
BY: Philippe Camous, WTEC-MPE/iX

Be aware that HPYEAR will return the date in INTEGER format, e.g.
as "0" to "9" for year 2000 to 2009 and not in 2 digits fashion
"00" to "09" as documented in the MPE/iX Commands Reference Manual
Volume I for the SETJCW command (in the System-Reserved JCWs) or
interpreted from the Appendix A Predefined Variables in MPE/iX or
documented in CSYB0016070002 (V001 #607 Commercial Systems Newsletter).
This behavior is expected as this variable is of type INTEGER.
We suggest to check/verify with your customers, if they are using
HPYEAR variable, so that this will not break some scripts in 01/01/2000.
If they are using HPYEAR you can probably suggest to use the new CI
variable HPYYYY which returns the date in 4 digits format. (see the New
Communicator 3000 Articles delivered with PowerPatch C.55.04 for
additional information).

SR 4701409177 addresses this as a documentation issue.

Also, the following script written by one of our RCEs may
be helpful:

Problem:

Customers use HP variables HPYEAR, HPMONTH and HPDATE to build a new 6
digits  field variable yymmdd; yymmdd variable displayed 013 instead of
000103.  The  :SETVAR command used by customers is:

:SETVAR YYMMDD "!HPYEAR"+"!HPMONTH"+"!HPDATE"

Actions:

1) These are HP numeric variables and there are no preceding zeros.
2) To add a zero for numbers below 10 (in a jobstream):

!IF HPYEAR < 10 THEN
! SETVAR YY "0"+"!HPYEAR"
! SHOWVAR YY
!ENDIF
!IF HPMONTH < 10 THEN
! SETVAR MM "0"+"!HPMONTH"
! SHOWVAR MM
!ENDIF
!IF HPDATE < 10 THEN
! SETVAR DD "0"+"!HPDATE"
! SHOWVAR DD
!ENDIF
!SETVAR YYMMDD YY+MM+DD
!SHOWVAR YYMMDD


>>> Shawn Gordon <[log in to unmask]> 01/19/00 03:53PM >>>
Use the new HP Date intrinsics, you can get the documentation from the HP
doc web site, or the communicator for 5.5 PP3 or PP4 (I forget which).

the date intrinsics do everything can think of.





Joe Smith <[log in to unmask]> on 01/19/2000 12:51:44 PM

Please respond to [log in to unmask] 



 To:      [log in to unmask] 

 cc:      (bcc: Shawn Gordon/IS/FHM/FHS)



 Subject: Date routines, adding to current date







I just got a question on date calculations from one of our Cobol
programmers,
but its been a long time since I used the calendar / date intrinsics.
Basically, the programmer wants to display the current date in the format
mm/dd/yy and then do a calculation of the current date + nn days, then
display
the revised date in the same format.

This is a work scheduling application that has been in production for some
time,
and it failed in the Y2K (they just found out).  The process they used
before
was rather unbelievable, they calculated the julian date and did all
manipulations without using any intrinsics.  It is quite hard to follow.
They
want to get it right this time, so any help would be appreciated.

ATOM RSS1 RSS2