Mainframes, MVS, zOS and Related Languages Support Forums Help & Support Forum for and by Mainframe Users 2013-08-15T14:24:17+00:00 http://www.ibm-mainframes.com/feed.php?f=10 2013-08-15T14:24:17+00:00 2013-08-15T14:24:17+00:00 http://www.ibm-mainframes.com/viewtopic.php?t=334&p=870#p870 <![CDATA[IBM COBOL, OpenCOBOL, OOCobol. • Re: LOW-VALUES & HIGH-VALUES & collating sequence..]]> Statistics: Posted by Anuj Dhawan — Thu Aug 15, 2013 2:24 pm


]]>
2013-08-15T10:20:48+00:00 2013-08-15T10:20:48+00:00 http://www.ibm-mainframes.com/viewtopic.php?t=334&p=867#p867 <![CDATA[IBM COBOL, OpenCOBOL, OOCobol. • Re: LOW-VALUES & HIGH-VALUES & collating sequence..]]>
Quote:

IN-NAME-1 is less than IN-NAME-2 (based on their ASCII values e.g. A < B etc..)
substitute "collating sequence" for "ASCII" here since the code could be running on an EBCDIC or ASCII platform.

Statistics: Posted by Robert Sample — Thu Aug 15, 2013 10:20 am


]]>
2013-08-15T09:06:25+00:00 2013-08-15T09:06:25+00:00 http://www.ibm-mainframes.com/viewtopic.php?t=334&p=864#p864 <![CDATA[IBM COBOL, OpenCOBOL, OOCobol. • Re: LOW-VALUES & HIGH-VALUES & collating sequence..]]>
In data division FILE SECTION

Code:
 FD FILE-1.
 01 RECORD-1.
     03 IN-NAME-1 PIC X(20).
     03 FILLER    PIC X(50).

 FD MERGE-FILE.
 01 RECORD-OUT    PIC X(70).

   :
   :

   PERFORM WITH TEST AFTER EOF-FLAG-1 AND EOF-FLAG-2

    loop until each file has been read to completion
    read each file

Code:
      READ FILE-1
          AT END SET EOF-FLAG-1 TO TRUE
          MOVE HIGH-VALUES TO IN-NAME-1
      END-READ
      READ FILE-2
          AT END SET EOF-FLAG-2 TO TRUE
          MOVE HIGH-VALUES TO IN-NAME-2
      END-READ

    sort the records (assuming no 2 names are the same)
    on ascending surname
Code:
      IF IN-NAME-1 IS < IN-NAME-2 THEN
          WRITE RECORD-OUT FROM RECORD-1
      ELSE
          WRITE RECORD-OUT FROM RECORD-2
      END-IF

   END-PERFORM

In this example, when IN-NAME-1 is less than IN-NAME-2 (based on their ASCII values e.g. A < B etc..) then the FILE-1 record (RECORD-1) is written to the merge file (RECORD-OUT). One of FILE-1 and FILE-2 will come to an end before the other so the completed file has its IN-NAME- value set to constant that will ALWAYS be greater than the IN-NAME- value still being read, ensuring all remain files are written to the merge file. This is done with the lines: MOVE HIGH-VALUES TO IN-NAME-1 and MOVE HIGH-VALUES TO IN-NAME-2.

Hope this helps..

Statistics: Posted by Anuj Dhawan — Thu Aug 15, 2013 9:06 am


]]>
2013-08-14T11:55:59+00:00 2013-08-14T11:55:59+00:00 http://www.ibm-mainframes.com/viewtopic.php?t=167&p=862#p862 <![CDATA[IBM COBOL, OpenCOBOL, OOCobol. • Re: What is the difference between 77 and 01?]]>
Slack byts can be generated in an 01 if the SYNC clause is used to synchronize physical memory and data items (such as COMP or COMP-5 variables).

Statistics: Posted by Robert Sample — Wed Aug 14, 2013 11:55 am


]]>
2013-08-14T02:46:15+00:00 2013-08-14T02:46:15+00:00 http://www.ibm-mainframes.com/viewtopic.php?t=167&p=848#p848 <![CDATA[IBM COBOL, OpenCOBOL, OOCobol. • Re: What is the difference between 77 and 01?]]> Statistics: Posted by Anil — Wed Aug 14, 2013 2:46 am


]]>
2013-08-12T14:58:07+00:00 2013-08-12T14:58:07+00:00 http://www.ibm-mainframes.com/viewtopic.php?t=334&p=827#p827 <![CDATA[IBM COBOL, OpenCOBOL, OOCobol. • Re: LOW-VALUES & HIGH-VALUES & collating sequence..]]>
LOW-VALUES and HIGH-VALUES are terms specific to COBOL but they are fairly common terms to hear outside of COBOL. LOW-VALUES is X'00' or B'0000000' in ASCII and B'00000000' in EBCDIC. HIGH-VALUES will be X'7F' or B'1111111' in ASCII and X'FF' or B'11111111' in EBCDIC. For Windows machines, HIGH-VALUES will be the same as for EBCDIC.

Collating sequence is NOT dependent upon the machine hardware, but rather the operating system in use. ASCII and EBCDIC are both acronyms -- Google can help you find out what they mean. Unicode (UTF-8 or UTF-16) would be good to learn about, as well.

Statistics: Posted by Robert Sample — Mon Aug 12, 2013 2:58 pm


]]>
2013-08-12T14:19:19+00:00 2013-08-12T14:19:19+00:00 http://www.ibm-mainframes.com/viewtopic.php?t=334&p=825#p825 <![CDATA[IBM COBOL, OpenCOBOL, OOCobol. • LOW-VALUES & HIGH-VALUES & collating sequence..]]>
What are LOW-VALUES & HIGH-VALUES in COBOL? I read about them and got more confused. Most the definitions I read keep on mentioning about "collating sequence" while defining them, for example - LOW-VALUES are the lowest possible value in collating sequence? What does that mean?

Is collating-sequence dependent on machine hardware? Do LOW-VALUES & HIGH-VALUES exist outside COBOL too, if yes - what other languages can use them.

Please help me with some direction.

Statistics: Posted by Anup Apte — Mon Aug 12, 2013 2:19 pm


]]>
2013-08-10T12:03:22+00:00 2013-08-10T12:03:22+00:00 http://www.ibm-mainframes.com/viewtopic.php?t=278&p=813#p813 <![CDATA[IBM COBOL, OpenCOBOL, OOCobol. • Re: BLOCK CONTAINS 0 RECORDS.]]> Statistics: Posted by Nick Jones — Sat Aug 10, 2013 12:03 pm


]]>
2013-08-10T11:52:36+00:00 2013-08-10T11:52:36+00:00 http://www.ibm-mainframes.com/viewtopic.php?t=278&p=812#p812 <![CDATA[IBM COBOL, OpenCOBOL, OOCobol. • Re: BLOCK CONTAINS 0 RECORDS.]]> Statistics: Posted by Robert Sample — Sat Aug 10, 2013 11:52 am


]]>
2013-08-10T10:39:47+00:00 2013-08-10T10:39:47+00:00 http://www.ibm-mainframes.com/viewtopic.php?t=278&p=797#p797 <![CDATA[IBM COBOL, OpenCOBOL, OOCobol. • Re: BLOCK CONTAINS 0 RECORDS.]]>
Should not we just leave this clause and let the system decide the BLKSIZE?

Statistics: Posted by Nick Jones — Sat Aug 10, 2013 10:39 am


]]>
2013-08-09T13:15:55+00:00 2013-08-09T13:15:55+00:00 http://www.ibm-mainframes.com/viewtopic.php?t=167&p=791#p791 <![CDATA[IBM COBOL, OpenCOBOL, OOCobol. • Re: What is the difference between 77 and 01?]]>
On the other hand, both these levels should begin in area A and must be followed by a seperator period; or by a space followed by its associated data name, filler or appropriate data description clause.

Level-77 is bit old fashioned. I've used and seen other using the 01 level mostly. Some shops using panavlet still use 77 for "special purpose Panvelet varaibles". Also, on mainfames, if you combine the elementary items within one 01 level, you don't waste slack-bytes memory (though I think this depends on the compiler you're using but I'm not sure - I've not verified it yet). And what are slack-bytes, well, that seems beyond the scope of this topic.

Hope this helps.

Statistics: Posted by Anuj Dhawan — Fri Aug 09, 2013 1:15 pm


]]>
2013-08-09T11:45:07+00:00 2013-08-09T11:45:07+00:00 http://www.ibm-mainframes.com/viewtopic.php?t=318&p=790#p790 <![CDATA[IBM COBOL, OpenCOBOL, OOCobol. • Re: Structured Cobol Programming and Object Oriented COBOL..]]>
The main difference is that structured programming deals with the flow of execution and not, primarily, with the data (as opposed (or just different) to OOCOBOL). Structured Programming technique got it roots starting from the need of removing arbitrary jumps (GOTOs) and favored code blocks and functions. Structured programming mainly deals with the organization of the code and not with the data. By definition, "pure structured programming" let the data flow around in the form of function arguments.
In contrast, object oriented programming primarily deals with data issues. In a pure object oriented approach, the flow of program execution is mainly on "objects" and so the flow is treated as bits of behavior associated with the packets of data that are nothing but "objects".

Said all that - they are pretty much different flavors altogether and are very different to be compared, as Robert has also said.

Statistics: Posted by Anuj Dhawan — Fri Aug 09, 2013 11:45 am


]]>
2013-08-08T14:05:10+00:00 2013-08-08T14:05:10+00:00 http://www.ibm-mainframes.com/viewtopic.php?t=259&p=784#p784 <![CDATA[IBM COBOL, OpenCOBOL, OOCobol. • Re: How to read a PDS Directory List of Members using COBOL?]]> Statistics: Posted by Robert Sample — Thu Aug 08, 2013 2:05 pm


]]>
2013-08-08T13:43:29+00:00 2013-08-08T13:43:29+00:00 http://www.ibm-mainframes.com/viewtopic.php?t=259&p=783#p783 <![CDATA[IBM COBOL, OpenCOBOL, OOCobol. • Re: How to read a PDS Directory List of Members using COBOL?]]>

Statistics: Posted by Manoj — Thu Aug 08, 2013 1:43 pm


]]>
2013-08-06T18:15:43+00:00 2013-08-06T18:15:43+00:00 http://www.ibm-mainframes.com/viewtopic.php?t=223&p=764#p764 <![CDATA[IBM COBOL, OpenCOBOL, OOCobol. • Re: Occurs are not allowed at 01/77, why?]]> Statistics: Posted by Priya — Tue Aug 06, 2013 6:15 pm


]]>
2013-08-06T18:14:13+00:00 2013-08-06T18:14:13+00:00 http://www.ibm-mainframes.com/viewtopic.php?t=219&p=763#p763 <![CDATA[IBM COBOL, OpenCOBOL, OOCobol. • Re: Sequential file processing.]]> Statistics: Posted by Priya — Tue Aug 06, 2013 6:14 pm


]]>
2013-08-05T13:03:07+00:00 2013-08-05T13:03:07+00:00 http://www.ibm-mainframes.com/viewtopic.php?t=259&p=736#p736 <![CDATA[IBM COBOL, OpenCOBOL, OOCobol. • Re: How to read a PDS Directory List of Members using COBOL?]]>
I've that "SMF-program" of yours and will be working with that too soon. It's been kept with me for longer than anticipated - :oops: (the personal front had been keeping me busy like crazy lately and still is).

Statistics: Posted by Anuj Dhawan — Mon Aug 05, 2013 1:03 pm


]]>
2013-08-05T11:22:56+00:00 2013-08-05T11:22:56+00:00 http://www.ibm-mainframes.com/viewtopic.php?t=259&p=735#p735 <![CDATA[IBM COBOL, OpenCOBOL, OOCobol. • Re: How to read a PDS Directory List of Members using COBOL?]]> Statistics: Posted by Robert Sample — Mon Aug 05, 2013 11:22 am


]]>
2013-08-05T09:58:37+00:00 2013-08-05T09:58:37+00:00 http://www.ibm-mainframes.com/viewtopic.php?t=259&p=734#p734 <![CDATA[IBM COBOL, OpenCOBOL, OOCobol. • Re: How to read a PDS Directory List of Members using COBOL?]]>

Code:
12013/08/05                                READPDS  - READ AND DISPLAY PDS ISPF STATISTICS                                 PAGE     1
 05:44:04.93                                PROGRAM COPYRIGHT BY ROBERT SAMPLE 2012
                                            DSNAME: T1234AD.ABC.EXEC1
0MEMBER NAME ISPF VV.MM CREATE DATE CHANGE DATE CHANGE TIME CURRENT SIZE  INITIAL SIZE  MODIFIED LNS  USER ID
 ADDDISP          01.04 2011/12/12  2011/12/12  08:14:44              24            23             0  T1234AD
 BANNER           01.00 2013/05/15  2013/05/15  08:39:13              17            17             0  T1234AD
 BATCHMAC         01.00 2012/04/04  2012/04/04  10:09:19              32            32             0  T1234AD
 TOTAL MEMBERS              3                                         73            72             0
 DIRECTORY BLOCKS READ      1
-DATA SETS PROCESSED        1

Statistics: Posted by Anuj Dhawan — Mon Aug 05, 2013 9:58 am


]]>
2013-08-05T09:48:52+00:00 2013-08-05T09:48:52+00:00 http://www.ibm-mainframes.com/viewtopic.php?t=54&p=732#p732 <![CDATA[IBM COBOL, OpenCOBOL, OOCobol. • Re: Can COBOL be used as a language for Operating System?]]> Statistics: Posted by Anuj Dhawan — Mon Aug 05, 2013 9:48 am


]]>