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 strongm 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. Lunker

    How is a singned numeric represented ina fixed-length file?

    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...
  2. Lunker

    reading COBOL Sequential output file (Easy Question)---Help

    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...
  3. Lunker

    reading COBOL Sequential output file (Easy Question)---Help

    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...
  4. Lunker

    PERFORM REPLACING

    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.
  5. Lunker

    PERFORM REPLACING

    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...
  6. Lunker

    STRING Table of errors into one field for output

    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...
  7. Lunker

    Numeric field at end of UNSTRING

    Tom: I think your process may have a flaw. 01 WS-MSG-RECORD. 02 WS-MSG-FIELDS. 03 WS-MSG-FIELD-1 PIC X(4). 03 WS-MSG-FIELD-2 PIC X(4). 03 WS-MSG-FIELD-3 PIC X(4). 03 WS-MSG-FIELD-4 PIC X(18). 03 VAL-OF-WS-MSG-FIELD-4 PIC Z(18) REDEFINES...
  8. Lunker

    PICTURE clause

    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.
  9. Lunker

    What is the parm length field if parm is not coded?

    nxm150: That's exactly how we handle it. If the parm length is zero, the assumption is that the parm was not coded.
  10. Lunker

    input cards in JCL

    I work on IBM MVS system and that is the statement. Never worked on VSE system so you probably know better how to code that JCL.
  11. Lunker

    input cards in JCL

    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...
  12. Lunker

    input cards in JCL

    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.
  13. Lunker

    How to set up COMPUTE with variable field formats

    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...
  14. Lunker

    String Search in Cobol

    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...
  15. Lunker

    how the change the value of return code

    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.
  16. Lunker

    Alphanumeric to numeric conversion

    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...
  17. Lunker

    PICTURE clause

    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...
  18. Lunker

    Urgent help needed on DFSORT

    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...
  19. Lunker

    Use of the built in Min Function

    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...
  20. Lunker

    Cobol Paging

    You are right, Glenn. I work on an IBM mainframe.

Part and Inventory Search

Back
Top