Thanks Guys for the reply. I am definitely not using long list of If-Then-else...
After thinking I got a way to do this. I will be using low and high fields into my parameter table for each numeric variable.
So when the rules change I can modify the parameter table with all low and high value...
@ K5tm - For example I have business rules like
if dosage_amt > 50 then dosage_no = 0 otherwise 1
if Frequency <= 3 then frequency_no = 0 otherwise 1
if dosage_type = 'active' then dosage_type_no = 1 otherwise 0
if patient_age >= 45 then patient_no = otherwise 0
I need to write...
Hi, I have a Cobol program that reads values from a sequential file. So that if the values change we do not have to release the code again, just a data file change with new values. The problem i am getting to make operators configurable.
for example: I have one If statement like
IF...
Hi,
I am working on VAX/VMS with COBOL.
I have a cobol program runs by a command procedure and it creates report name test_report_'p1'.rpt
Here p1 is the current date. This command procedure runs every day with nightly_job. So every day reports created with test_report_'p1'.rpt.
Rigth now...
Hi, I am doing
01 val1 pic 99v99999 comp.
01 val2 pic 9(7).
01 val3 pic 9(7).
Move val1 to val2.
divide val2 by 100 giving val3.
Question:
When i do this i an not getting right values.
Value for val1 is 0.324
value of val2 i am getting is 03452345 it is garbage...
please...
I have a field
01 sale 9(4)v9(5) comp.
I need to move this to a 9(7) field.
value in sale field is always 0012.34567 or 0098.76543 any number starts with two zero and then number.
can any one help.
I did it with replace like below
01 sale 9(4)v9(5) comp
replacing 9(4)v9(5) ==...
I have to change the record name bcos the layout get change. Some field change to new size so I created a new record layout and replace the new one in place of old one. As file size is sane so i do not change the name of file.
Write and rewrite goes with the file name not with the record...
Hi,
I have cobol code like below.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
FILE-CONTROL.
SELECT ABC_FILE ASSIGN TO 'ABC_FILE'
ORGANIZATION IS INDEXED
RECORD KEY IS XXX OF ABC_FILE
ALTERNATE RECORD KEY IS ZZZ OF ABC_FILE
ACCESS MODE IS DYNAMIC...
Hi i need to print the value of field2 in format 99.99999
SO I CREATED A N EW FIELD WITH FORMAT 99.99999. But when i do move from field2 to field3 it PRINTS 45.00000 WHICH IS WRONG. i WANT IT TO PRINT 45.12345.
can any one help HOW TO WRITE IN THE CODE.
WORKING-STORAGE SECTION.
01...
Hi, I have to move a alphanumeric number to numeric number. What is the impact of it.
Example:
01 number1 pix x(10).
01 number2 pic 9(10).
move number1 to number2.
The problem is number1 can be 7 digits so in that case number2 is not moving 000number1 in number2 field it is...
Thanks for your reply.
But If I store numeric value in alphanumeric then how it will effect data.
And do I have to change redefine also from 9 to X. Or rest kepp the same and program will work fine.
Hi,
I have a field REFILL_DATE of type Number and size 128. It contains 16 date in format ddmmyyyy. To define it in file i have written below code.
BUT it is giving error saying numeric value can maximum go up to 35. Can not define. error in line pic 9(128).
Can any one help....
01...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.