Without any of the extra phrases you ask about your TEST1 field would not contain an actual + or - sign. The sign is defaulted to be stored in the zone portion of the rightmost byte. Your field of PIC S9999V99 with a value of +10.00 would be stored as F0F0F1F0F0C0 and -10.00 would be stored...
Your description of how the GARAGE-ARRAY is broken into its components is accurate. But COBOL does not use the array for display purposes. The array is used so you can process any of the 3 different GARAGE-ARRAY sets of data without having unique code for each. You just need to supply a...
I won't get too detailed but will just try to answer your basic questions. It seems that al you really want to know is how many characters to allow for the fields you are reading. That's all we'll address for now.
1. You are right about the length of PIC X fields. Those are alphanumeric...
Looks like the assumptions I made were wrong. I assumed you were talking about COBOL tables. Looks like you're talking about 'files'. That shows the need to give examples so we all are talking about the same thing.
In any event, there is still not an option to change code during execution.
There is no REPLACING option of the PERFORM statement.
Without details I'm just guessing as to exactly what you're asking, but it looks like you have two different tables that have identical layouts and different datanames. You want to be able to execute the same piece of code with either...
Am I missing something here? You want to get the table of error messages put into WS-STRING-OUT, right?
01 WS-STRING-OUT PIC X(1000).
01 STRING-IDX PIC 999 VALUE 0.
01 WS-ERROR-IDX PIC 999 VALUE 0.
01 WS-CUST-ERROR-TABLE...
What is the definition of WS-FILE-NBR-FIELD? At one point you show it as Z9(6)V9(2) and in another you show it as
Z(6)V99. If it is the first, that's why you have leading zeroes. You're only suppressing one zero followed by 6 digits left of the decimal.
The SELECT looks okay. I would say if you're reading this file in the JCL stream, you'll have something like this in the JCL
//SYS003 DD * (the * says data follows)
data records go here
You'll open this file like any other, read in a record and move it to the next available location in...
When you compile, you do not need any input data available. That is only necessary when you are going to execute. The compilation will only check to see that your syntax is correct. It will not execute any instructions so will not read that table or load it until you execute.
Why not define two working fields with the max number of decimal places? Also, define the result field with the max number of decimals.
01 WS-FLD-1 PIC S9(09)V9999.
01 WS-FLD-2 PIC S9(09)V9999.
01 WS-ANSWER PIC S9(09)V9999.
Use your EVALUATE to move...
As Jack said, INSPECT or ref mod will work great. Just be careful how you do your searching. If the character string you are looking for is imbedded within another word, you may get a match that you didn't want.
Example: Say you're looking for the word ADD. If you use INSPECT and the string...
Each job step has its own return-code. You can set a return code the way the other posts say, but you're still going to have a return code of 13 from your previous step.
Here's an explanation of what is probably happening. This is the way it works on an IBM mainframe. When you move zoned decimal signed numeric to zoned decimal signed numeric, the compiler usually generates code that packs the fields into temporary work areas, then zeroes out the receiving...
That value you are seeing is a good value.
When you define a field the way you have, S9(6)V99, the sign is stored in the zone portion of the rightmost byte. That curly bracket you're seeing is the character that includes the sign.
The value you have is 0000732{
In hex that is F0 F0 F0 F0...
OUTREC FIELDS=(8,22,1078,18,1439,5,1653,3,1657,3,
1667,2,1700,3,1706,3,1709,2,65X),
CONVERT
The OUTREC control statement changes the format of the output record. Typically, the default is to create an output record that is the...
Do you have the built-in functions available in your compiler? I don't think they were available in COBOL II. I believe that they were made available in the next version which was COBOL/370.
Your error message sounds like it does not understand the word FUNCTION, which would be the case if...
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.