Subject: | |
From: | |
Reply To: | |
Date: | Thu, 2 Nov 2000 12:48:14 -0500 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
To find the error message, you can either call HPERRMSG with the 32-bit
error number or use MSGUTIL.PUB.SYS
e.g.
01 status-var-int redefines status-var pic s9(9) comp.
..
call intrinsic "HPERRMSG" using, 2, 0, 0, \status-var-int\
Either way, you get:
"Input date code passed to the intrinsic is not valid"
because your INDATE-CODE is 385, but should be 38.
Also, your FORMAT-CODE needs to be null-terminated, not blank-terminated:
01 format-code.
05 pic x(3) value "DAY".
05 pic x value %0.
----- Original Message -----
From: "Palmer, Elmo L" <[log in to unmask]>
To: <[log in to unmask]>
Sent: Thursday, November 02, 2000 11:48 AM
Subject: Using HPDATEFORMAT in COBOL
> I have been trying to use HPDATEFORMAT in a cobol, but haven't been
successful. I am hoping someone can tell me what I am doing wrong. The
following is what I have been doing but I have been getting errors.
>
> Also I would like to know where do I look to find out the meaning of the
errors that are being returned for s-info & s-subsys..
>
> 001000$control post85
> 001100 identification division.
> 001200 program-id. test.
> 001300 data division.
> 001400 working-storage section.
> 001600 01 indate-code pic s9(9) value 385.
> 002000 01 indate-yyyymmdd pic x(8) value spaces.
> 002100 01 status-var.
> 002200 05 s-info pic s9(4) comp value 0.
> 002300 05 s-subsys pic s9(4) comp value 0.
> 002700 01 format-code pic x(4) value "DAY ".
> 002800 01 format-day pic x(17) value spaces.
> 002900 01 format-date-len pic s9(9) comp value 4.
> 003100
> 003110 procedure division.
> 003200 format-date-para.
> 003300 display 'Enter the date in yyyymmdd format'.
> 003400 accept indate-yyyymmdd
> 004200 call intrinsic "HPDATEFORMAT" using
> 004300 indate-code indate-yyyymmdd
> 004400 format-code format-day format-date-len
> 004800 status-var
> 005000 display "s-info = " s-info
> 005001 display "s-subsys= " s-subsys
> 005002 display "format-date-len = " format-date-len
> 005010 display "format-day = " format-day
> 005100 display "indate-yyyymmdd = " indate-yyyymmdd
> 005300 stop run.
> 005400
> :
>
|
|
|