Skip to main content

Does multi-user file access work within the Net Express IDE?

  • February 15, 2013
  • 0 replies
  • 0 views

Problem:

In the Cobol program below  the field 'db_email' is filled with the value '-1' and NOT 'Null.'  

...    

working-storage section.    

    

77 ws-value     pic S9(04) comp-5.    

77 ws-name      pic x(10) value spaces.    

    

procedure division.    

....    

move 'robert' to ws-name    

move 1        to ws-value    

compute ws-value = ws-value * -1    

exec sql    

        insert into table (db_name,db_email)    

                                 values (:ws-name,:ws-value)    

end-exec    

    

Resolution:

The example code below will work:

...    

working-storage section.    

    

77 ws-value     pic x(10) value spaces

77 ws-null              pic S9(04) comp-5.    

77 ws-name      pic x(10) value spaces.    

    

procedure division.    

....    

move 'robert' to ws-name  

move 1        to ws-null    

compute ws-null = ws-null * -1    

exec sql    

        insert into table (db_name,db_email)    

                          values (:ws-name,:ws-value:ws-null)    

end-exec    

Old KB# 5394

#AcuCobol
#RMCOBOL
#ServerExpress
#COBOL
#netexpress

0 replies

Be the first to reply!