View previous topic :: View next topic
|
Author |
Message |
xuwen
New User
Joined: 23 Jun 2006 Posts: 1 Location: wuhan, china
|
|
|
|
Hi Experts,
Would I know where I can find the function description for those IGZ*** (like IGZCXDI, IGZCXMU) modules? |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
You have to search-engine it, and hope to get lucky. Those two look like double-precision (floating point) divide and multiply.
Perhaps quicker than search-engineing is to generate the pseudo-assembler (NOFFSET,LIST) and see what COBOL source is using them.
Why do you want to know? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
You may not be able to find what they do. IBM releases some -- but not all -- information about their systems and compilers. I don't know if the IGZ module descriptions have been released or not. |
|
Back to top |
|
|
abhijit.nayak01
Active User
Joined: 22 Mar 2009 Posts: 161 Location: South Africa
|
|
|
|
IGZEDT4 is used to get the date like I am using in one my programs:
Code: |
03 WS-IGZEDT4 PIC X(08) VALUE 'IGZEDT4'.
03 W01-DATE PIC 9(08).
03 FILLER REDEFINES W01-DATE.
05 W01-DATE-CC PIC 9(02).
05 W01-DATE-YY PIC 9(02).
05 W01-DATE-MM PIC 9(02).
05 W01-DATE-DD PIC 9(02).
CALL WS-IGZEDT4 USING W01-DATE.
MOVE W01-DATE TO W04-DATE. |
|
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
No, that's a bad example. In general, it would be a bad idea to CALL IGZ* routines.
In the specific, IGZEDT4 was a workaround supplied by IBM to allow COBOL II programs to get a "current date" with four-digit year. Using ACCEPT ... to get the date only got you two digits.
However, any IBM COBOL beyond COBOL II does not have that problem (I think this was also possible for later releases of COBOL II with the intrinsic functions). The expected way for you to do this for new code is:
Code: |
MOVE FUNCTION CURRENT-DATE TO W01-DATE |
It would (probably) not be worth changing any existing uses of IGZEDT4, but it would be worth not creating new code using it. The intrinsic function makes it much clearer what is happening, provides extra information (time and offset of time) and doesn't lead people to think CALLing IGZ* routines is a good idea (which it isn't, generally). |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Try coding this in a test program -
Code: |
03 WS-FWORD PIC 9(08) COMP-5 VALUE 1.
COMPUTE WS-FWORD = (WS-FWORD ** 8)
|
When compiling, use the LIST NOOFFSET and NOOPT compiler options, which will expand into Assembler, find the expansion of the above (WS-FWORD to the Power of 8) and see if a COBOL run-time routine is Called, with a prefix of IGZ.
HTH.... |
|
Back to top |
|
|
abhijit.nayak01
Active User
Joined: 22 Mar 2009 Posts: 161 Location: South Africa
|
|
|
|
Thanks. I changed the program for date. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Thanks.
Also, I forgot to mention, change your date to a PIC X field. I advise that for all fields which are "numbers" simply because they contain numerals, or they have the word number in the name. In this case, if left a 9(8), the wrong data will get into the date field :-) |
|
Back to top |
|
|
|