MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Numeric Edited Field

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
Jai
Beginner


Joined: 06 Jun 2003
Posts: 57
Topics: 20

PostPosted: Thu Sep 04, 2003 11:20 am    Post subject: Numeric Edited Field Reply with quote

Hi,

Please let me know the details of Moving Numeric Edited Field Declared as +9.99(In Input File) to S9(03)VS9(2) COMP-3 Variable(HOST VAIABLE)(In table, the Field is declared as Decimal(5,2)) so that I can insert the records from Cobol Flat File to Table.
I am getting -927 SQL Error Code for inserting and also the below error, if I try to move it directly.
******************
An invalid sign was detected in a numeric edited sending field in Program on line number.
From compile unit Program at entry point Program at statement at compile unit offset +000013B2 at address 3EA0177A.
************
* Diagnostic Section *
**********************

COBOL run-time condition IGZ0063S has occurred. The
message that was issued is:
GZ0063S An invalid sign was detected in a numeric edited sending
field in Program on line number .




An attempt has been made to move a signed numeric
edited field to a signed numeric or numeric edited
receiving field in a MOVE statement, but the sign
position in the sending field contained an invalid sign
character for the corresponding PICTURE.
Make sure that the program variables in the failing
statement have been set correctly.
******************

I tried to display the variables and it is getting displayed.

Please let me know all the possible Errors and solutions for this as early as possible so that I can rectify it quickly.


Thanks in advance.
_________________
Have a Great Day.
Thanks & Regards,
Jai
Back to top
View user's profile Send private message Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12380
Topics: 75
Location: San Jose

PostPosted: Thu Sep 04, 2003 12:14 pm    Post subject: Reply with quote

Jai,

First of all let us clarify on DB2 part. Sqlcode of -927 has got nothing to do with your move statement in the cobol.You get the error when you are trying to execuete an application program without first establishing the correct execution environment by issuing the DSN command. In the IMS, CICS, or call attachment facility (CAF) environment, the user has attempted to execute an application program that is not using the correct language interface
module.

Check this link for a detailed explanation of sql code -927

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DSNMCH11/2.1.6.425?SHELF=&DT=20010718150520


Now coming to the COBOL error.The program is abending when it encounters an invalid numeric.so you need to do a numeric test for the field. Take a look at the example below

Code:

IDENTIFICATION DIVISION.                             
PROGRAM-ID.    SAMPLE                               
DATE-COMPILED.                                       
ENVIRONMENT DIVISION.                               
CONFIGURATION SECTION.                               
INPUT-OUTPUT SECTION.                               
FILE-CONTROL.                                       
DATA DIVISION.                                       
                                                     
FILE SECTION.                                       
                                                     
WORKING-STORAGE SECTION.                             
                                                     
01  A                    PIC +9.99.                 
01  B                    PIC S9(03)V9(2) COMP-3.     
                                                     
PROCEDURE DIVISION.                                 
                                                     
     IF A IS NUMERIC                                 
        DISPLAY 'THE NUMBER IS ELIGIBLE TO MOVE'     
     ELSE                                           
        DISPLAY 'THE NUMBER IS NOT ELIGIBLE TO MOVE'
        MOVE 0 TO A                                 
     END-IF                                         
                                                     
     MOVE A TO B                                     
     DISPLAY 'THE A IS ::' A                         
     DISPLAY 'THE B IS ::' B                         
                                                     
     GOBACK.                                         



Check this link for NUMERIC test

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IGY3PG10/1.3.7?DT=20020923143836

Hope this helps...

cheers

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Jai
Beginner


Joined: 06 Jun 2003
Posts: 57
Topics: 20

PostPosted: Fri Sep 05, 2003 2:05 am    Post subject: Reply with quote

Hi Kolusu,

Thank you very much for all the informations.
If I try to do the Numeric Test, it is displaying the content in the else condition, that means the Field is not considered as numeric(For +9.99).
There are 2 similar files. For one file it is able to read and display without any error but when I try to insert into the table it was giving -927 SQLCODE Error and while compiling in Changeman, if I give the CALL Attach Facility and then compile it, and while running it, it is giving -991 SQLCODE Error instead of -927 SQLCODE Error which was coming earlier.
Please let me know about -991 SQLCODE Error.
I have seen explanation thru 'qw -991' in the mainframes but which seems to be somewhat similar to -927, but couldn't go for rectification of it.Please let me know how to rectify it.

And for the second File only I was getting the U048 Error for Numeric Edited Field which I mentioned earlier.

Please let me know.

Thanks in advance.
_________________
Have a Great Day.
Thanks & Regards,
Jai
Back to top
View user's profile Send private message Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12380
Topics: 75
Location: San Jose

PostPosted: Fri Sep 05, 2003 9:51 am    Post subject: Reply with quote

Jai,
As I stated earlier these are 2 seperate issues. You first need to solve the DB2 connection errors. Your compile procedure is not establishing proper connectivity to DB2.Try solving that first. Here is an exaplantion for sqlcode -991

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DSNMCH11/2.1.6.432?SHELF=&DT=20010718150520

Every shop has its own compile procedures.So check with your systems personnel and find out the correct compile procedure which will establish the connection with DB2.


For Cobol Errors please show us the contents of file1 and file2.

Hope this helps...

cheers

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Jai
Beginner


Joined: 06 Jun 2003
Posts: 57
Topics: 20

PostPosted: Fri Sep 05, 2003 10:47 am    Post subject: Reply with quote

Hi Kolusu,

The Data in the table is as follows:

8000023000003 TAAMEXRET 00002002193MU+2.50+0.00 0000000000009
8000023000250 INTERNETPHYSDELIVE 00000000001 +0.00+0.00 0000000000000
8000023000250 MILITARY 00000000004 +0.00+0.00 0000000000000
8000023000250 SERVICE 00000000001 +0.00+0.00 0000000000000
8000023000250 TAAMEXRET 00002002193 +0.00+0.00 0000000000009
8000023000250 TOUROP 00000000011 +0.00+0.00-0000000002317
8000023000268 TAAMEXRET 00002002193MU+2.50+0.00 0000000000009
8000203000351 TAAMEXRET 00002002193 +0.00+0.00 0000000000009
8001030003362 STATE/LOCALGOVT 01070005531 +2.15+0.00 0000000124339
Error is as follows:
An invalid sign was detected in a numeric edited sending field in

CAPTEST on line number 1134.
From compile unit CAPTEST at entry point CAPTEST at statement 1134 at

compile unit offset +000021B4 at address 3EA6AA8C.

Thanks in advance.
_________________
Have a Great Day.
Thanks & Regards,
Jai
Back to top
View user's profile Send private message Yahoo Messenger
slade
Intermediate


Joined: 07 Feb 2003
Posts: 266
Topics: 1
Location: Edison, NJ USA

PostPosted: Fri Sep 05, 2003 12:16 pm    Post subject: Reply with quote

Hi Jai,

You say:
Quote:

If I try to do the Numeric Test, it is displaying the content in the else condition, that means the Field is not considered as numeric(For +9.99).

But you didn't show us what was displayed. Format your display as follows so that we will know what unprintable chars were displyed too:
Code:

     DISPLAY 'BAD FIELD >' YOUR-ED-FLD '<'

That way, if the field displayed is:
Code:

        BAD FIELD > 3.15<
 

We'll know that there's a space in the sign position.

Regards, Jack.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group