Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. COBOLKenny

    Control Breaks

    Here's something we do in report programs to have a real straight forward way to get the headers produced. 01 ACCUMULATOR-AREAS PACKED-DECIMAL. 03 AA-LINE-COUNT VALUE +999 PIC S9(03). 88 AA-FULL-PAGE VALUES +56 THRU +999...
  2. COBOLKenny

    Control Breaks

    I would get in a loop until my input file is empty. I would use either IF statemetns or an EVALUATE to check for breaks, checking the most major break first. EVALUATE TRUE WHEN COMPANY NOT = SA-COMPANY PERFORM 9100-PRINT-COMPANY-TOTAL WHEN DIVISION NOT = SA-DIVISION...
  3. COBOLKenny

    Pulling Addresses From Free Text Fields

    Glenn you may have handled the possibility of 2 names in the city but now you have places like Fond du Lac, WI. Now you have to add code to handle the possibility of 3 names - and maybe there are some with four. I agree that working backwards is the best approach. You can assume first string...
  4. COBOLKenny

    How to check in-between spaces?

    mrregan: Your solution is similar to Glenn9999 except he delimited by All SPACE which is what is needed. If the input has 2 leading spaces, with your delimiter, each space is a delimiter and both receiving fields end up with spaces. ALL will treat both spaces as one delimiter. A combination of...
  5. COBOLKenny

    cobol productivity tool

    Computer Associates has a product that is called Xpediter that seems to do what you were. You compile your program with the Xpediter active and it puts some 'hooks' into your program. When you execute, you start by setting breakpoints, or lines that you want to stop at and check things out...
  6. COBOLKenny

    "Cross-reference of data names" too primitive?

    The cross-reference has always worked this way where it only gives you an entry that you specifically reference in a statement. If your counters were defined as zoned decimal, you could MOVE ZEROES TO GROUP-COUNTERS and the cross-reference never listed the elementary fields as being modified...
  7. COBOLKenny

    Is there a way within COBOL to obtain external file name?

    Try this... Write a subroutine with this code... LINKAGE SECTION. 01 L-FD-DATA. 03 FILLER PIC X(40). 03 L-FD-NAME PIC X(08). 01 L-FILE-NAME PIC X(08). PROCEDURE DIVISION USING L-FD-DATA L-FILE-NAME. 1000-GET-NAME. MOVE L-FD-NAME TO...
  8. COBOLKenny

    Perform Operations with COMP variables

    Not that it matters a whole lot but the hex equivalent of decimal 20010304 is 01315540. You could work with this binary field without moving to a zoned decimal if you wanted to. You're trying to subtract 3 years from the date. If you treat the date as an integer such as 20010304, the units...
  9. COBOLKenny

    Number of parameters in Linkage

    I tried checking the address for NULL and it won't work in all cases. Seemed that once you called with 4 addresses, it was never null again during that execution. I had to do just what you're doing a few years ago and got help from this site. The last parameter sent is marked with a binary...
  10. COBOLKenny

    and/or relational checks in cobol

    leewest, This may be what you are remembering from the past. With this code IF A = B AND C = D AND E = F As soon as an untrue condition is encountered, control passes to the ELSE or the next statement if there is no ELSE. When all conditions are connected with AND, as soon as one is false...
  11. COBOLKenny

    Negation

    In the old days it did create one instruction. I used a Packed field with an odd number of digits and a sign - all the right things. Enterprise COBOL generates a ZAP instruction at the end of most of the calculations it does. So there is a MP and ZAP instruction when a multiply is used.
  12. COBOLKenny

    Negation

    fyi Using IBM Enterprise COBOL on a mainframe, it generates 5 Assembler instructions to use COMPUTE and multiplying by -1. It uses 4 instructions to use COMPUTE with the complement operator. It uses 4 instructions to use COMPUTE and subtract the number from zero. It uses 2 instructions to...
  13. COBOLKenny

    Source run report

    We had the capability years ago using an optimizer from Computer Associates. It optimized the compile code and provided debugging tools that produced a report like you're talking about.
  14. COBOLKenny

    Cobol 3 conversion

    I don't know what these programs are that you're using but it is understandable that the data is not in the same order when you use WITH DUPLICATES IN ORDER versus when you don't. THe phrase says to keep records with identical sort key values in the same relative orde r that they were on the...
  15. COBOLKenny

    How does Cobol Compiler handle Replacing Tags...

    You're right Jack. COBOL does not like starting a dataname with a hyphen. My copybook had a dataname such as :a1:-account-number and when I used the REPLACING string as in my last post, I got a compile error for each dataname that looked like that. It became -account-number.
  16. COBOLKenny

    How does Cobol Compiler handle Replacing Tags...

    I work on IBM Enterprise COBOL. Leaving the replacing phrase off does not work. The string :a1: remains in the copybook and causes a compiler error. I did try a replacing phrase such as REPLACING ==:a1:== BY ==== and it removed the string.
  17. COBOLKenny

    How to eliminate unwanted spaces?

    You're writing a fixed length record. Let's look at a couple of things. The length code of a variable length record is defined to use 4 bytes. Your COMP PIC S9(04) only takes two bytes. The IBM manual that I have says the length fields are not available to you for reference. You're trying...
  18. COBOLKenny

    How to eliminate unwanted spaces?

    Do you have 2 separate WRITE statements - one for the header record and one for the detail record?
  19. COBOLKenny

    How to eliminate unwanted spaces?

    It sounds to me like you're writing fixed length records every time. Or else your write statement is always referring to the detail record rather than the header record so every 'variable length' record you write is 250 bytes.
  20. COBOLKenny

    How to eliminate unwanted spaces?

    COBOL needs to understand that you have different lengths for different records. One way to do that would be to set up two different 01 levels under the FD. FD OUTPUT-FILE. 01 HEADER-RECORD PIC X(100). 01 DETAIL-RECORD PIC X(250). If you have a WRITE...

Part and Inventory Search

Back
Top