IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search Log in to check your private messages Log in
 

what is the function of module IGZ**** in COBOL.


 
IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: :: View next topic  
Author Message
xuwen

New User


Joined: 23 Jun 2006
Posts: 1
Location: wuhan, china

PostPosted: Tue Apr 28, 2015 3:05 pm
Reply with quote

Hi Experts,

Would I know where I can find the function description for those IGZ*** (like IGZCXDI, IGZCXMU) modules?
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7312
Location: Inside the Matrix

PostPosted: Tue Apr 28, 2015 3:28 pm
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8566
Location: Dubuque, Iowa, USA

PostPosted: Tue Apr 28, 2015 5:48 pm
Reply with quote

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
View user's profile Send private message
abhijit.nayak01

Active User


Joined: 22 Mar 2009
Posts: 156
Location: South Africa

PostPosted: Thu May 21, 2015 2:45 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7312
Location: Inside the Matrix

PostPosted: Thu May 21, 2015 3:41 pm
Reply with quote

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
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2504
Location: Atlanta, Georgia, USA

PostPosted: Thu May 21, 2015 4:22 pm
Reply with quote

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
View user's profile Send private message
abhijit.nayak01

Active User


Joined: 22 Mar 2009
Posts: 156
Location: South Africa

PostPosted: Mon May 25, 2015 5:06 pm
Reply with quote

Thanks. I changed the program for date.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7312
Location: Inside the Matrix

PostPosted: Mon May 25, 2015 7:15 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> COBOL Programming
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Forum Replies
No new posts JCL for replacing code in Cobol JCL & VSAM 8
No new posts COBOL VS SORT Utility for file format... COBOL Programming 6
No new posts XML Parsing in COBOL creating "h... COBOL Programming 0
No new posts Calling Rexx program from Cobol CLIST & REXX 12
This topic is locked: you cannot edit posts or make replies. Missing Negative sign in COBOL COBOL Programming 6

Back to Top