Ne tugas tuk mhs ngambil TOS

May 30, 2008 by torkisnasution

Free Source Code Version or Revision Control Management Software

TortoiseSVN Tugas untuk nomor Absen 1 dan 2

TortoiseSVN is a Windows Subversion client (see elsewhere on this page for Subversion), implemented as a Windows explorer shell control. As such, it has all the usual features of a source code control system, as well as the ability to version folders, rename and delete files, etc. You can check in/out files and folders via the right-click menu, delete files from the revision control system, revert to an old version, check the logs, merge files, check the difference between the current version and an older version, etc, directly from the Windows explorer shell. TortoiseSVN works on Windows 95, 98, 98SE, ME, 2000, XP (although you need IE 5.5 or later installed on the earlier systems). There is limited support for Windows Vista as well.

Bazaar-NG Tugas untuk nomor Absen 3 dan 4

Bazaar-NG is a decentralized revision control system that allows users to commit their own branches of the source code for particular software without requiring special permissions.

CodeVille Tugas untuk nomor Absen 5 dan 6

CodeVille is a distributed version control system. Platforms supported include Linux, Windows and Mac OS X. It is written in Python.

Darcs Tugas untuk nomor Absen 7 dan 8

Darcs is a revision control system released under the GNU GPL. Platforms supported include Linux, Windows, MacOS X, FreeBSD, OpenBSD, NetBSD, DragonFlyBSD, Solaris, and AIX. It also comes with a CGI script that allows you to browse through your source code repository via the web.

Monotone Tugas untuk nomor Absen 9 dan 10

Monotone is a free distributed version control system. Its features include a single-file transactional version store, fully disconnected operation, history-sensitive merging, lightweight branches, integrated code review, third-party testing, cryptographic version naming, client-side RSA certificates, internalization support, and no external dependencies. Supported platforms include Linux, Solaris, Mac OSX, Windows and other Unix systems. It is licensed under the GNU GPL.

Perforce SCM System Tugas untuk nomor Absen 11 dan 12

The Perforce SCM System is a software configuration management system that works over TCP/IP. Both the client and server are available free of charge, although the Server only supports two users and two client workspaces in the free version. Numerous operating systems are supported, including Windows, Digital Unix V4.0 (OSF1), FreeBSD, HP-UX, IBM AIX, NetBSD, OpenBSD, QNX, SGI Irix, Solaris, SunOS, Linux (x86, ALPHA, PPC, MIPS, ARM, ia64, AMD64, Darwin, MacOS X, BeOS, IBM AS400, OS/2, Alpha VMS, etc.

TortoiseCVS Tugas untuk nomor Absen 13 dan 14

TortoiseCVS is an easy-to-use version control for Windows that allows you to work with CVS files (whether local or on a CVS server). It integrates directly into Windows explorer, and yet allows you to limit the amount of integration so that your system does not become sluggish. You can simply right click on the files or folders you want to manage using version control, select the necessary procedure to apply, and Tortoise CVS will do the necessary. It shares its features for source code management (SCM) with CVS.

GNU Revision Control System (GNU RCS) Tugas untuk nomor Absen 15 dan 16

GNU RCS is a revision control system that allows you to manage multiple versions of your source code in a space efficient manner. Instead of storing multiple versions of your sources in entirety, RCS stores only the differences between the versions. You can then use RCS to retrieve different versions of your source code. Although the software is command line driven, you can easily integrate them into the menus of many modern editors for automatic checking in and out. Note that the link above leads to the source code archive. You will have to compile it yourself for your operating system. Precompiled binaries for MSDOS and Windows 95/98/ME can be found in the DJGPP archive (see the Free C/C++ compilers page). If you need help on using this package, there’s even a book on this: Applying RCS and SCCS: From Source Control to Project Control (an O’Reilly Nutshell book).

OpenCM Tugas untuk nomor Absen 17 dan 18

To quote from their website, “OpenCM is designed as a secure, high-integrity replacement for CVS” (another open source version control system). It does not have the same feature set as CVS, with some omissions as well as some additions. It supports renames, configuration, cryptographic authentication and access control, branches, etc.

Vesta Configuration Management System Tugas untuk nomor Absen 19 dan 20

Vesta is a portable SCM system that is able to handle both small and large software projects (eg 10 million source lines). Originally developed at the Compaq/Digital Systems Research Center, and later used by the Compaq Alpha microprocessing group, it was later released by Compaq under the GNU LGPL. It runs on Linux and the Compaq Tru64 Unix on Alpha.

JEDI Version Control System (formerly FreeVCS) Tugas untuk nomor Absen 21 dan 22

This version control and project management system can be used on a local computer, across a LAN, WAN, the Internet as well as in mixed environments. It uses a “scalable, TCP/IP based client/server architecture”. It offers secure data transfer for transfers over a network or the Internet using a 128 bit Blowfish encryption algorithm. Data is stored in SQL database tables, and may be accessed with other database tools as well. It has an IDE, context sensitive help, Zip compression for the archived files, etc. It is a Windows program, and requires Windows 9x, ME, NT 4.0, 2000.

GNU Arch Revision Control System Tugas untuk nomor Absen 23 dan 24

GNU Arch is a revision control system that supports distributed and private repositories, history-sensitive branch merging, the ability to host repositories using HTTP, FTP, SFTP and WebDAV, renames, etc.

/BriefCase 3 Toolkit Tugas untuk nomor Absen 25 dan 26

Like other revision control systems, /BriefCase allows you to manage multiple versions of your software. It runs on Unix and Linux systems with the Korn Shell and awk. It uses a client/server model, with a RCS-based central repository.

CvsGui, WinCVS, MacCVS, gCVS – GUI Front-end for CVS Tugas untuk nomor Absen 27 dan 28

WinCVS is a frontend for the CVS package (see elsewhere on this page) for Windows, while MacCVS runs on the Macintosh and gCVS on Unix systems. It has a native system look-and-feel, realtime sandbox view with a visual indication of the local state of files, filters to monitor any folder in a flat view, file revision history graphs, support for text, binary and Unicode files, etc. It is distributed under LGPL.

SourceJammer Tugas untuk nomor Absen 29 dan 30

This is a source control and versioning system that is written in Java, and as such should be able to run on any system that has a Java virtual machine. You can (of course) check in/check out your sources, managed text and binary files, have multiple users accessing your sources, etc.

Subversion Version Control Tugas untuk nomor Absen 31 dan 32

Subversion is a version control system designed to be a “compelling replacement of CVS”. Like CVS, it is open source. It includes all of CVS’ features, with support for “versioning” directories, file renames, permission changes, and other file meta-data. It supports symbolic links, hard links, internationalization, multi-lingual support, atomic commits, cheap branching and tagging operations, plug-in client-side diff programs, etc. It is natively client/server, unlike CVS.

PRCS Tugas untuk nomor Absen 33 dan 34

This is a front end to a set of revision control tools that is supposed to be simpler to use than RCS, SCCS and CVS. At the time of this writing, it relies on GNU RCS to do certain tasks. It is portable to most Unix systems (and clones) including FreeBSD, Linux, SunOS 4, Solaris, HP-UX, IRIX, Ultrix 4, Digital Unix, AIX, Dynix/PTX, and Unixware. Source code is provided.

Aegis Tugas untuk nomor Absen 35 dan 36

Aegis supports multiple developers on a project, and includes an intranet web interface. It is designed for repository security, and supports distributed and multiple repositories. It runs on “almost any flavour of Unix.” Source code is provided.

CVS (Concurrent Version System) Tugas untuk nomor Absen 37 dan 38

CVS provides version control on entire directory trees. It supports client/server operations where developers may be scattered all over the globe. CVS is supported on most Unices and clones, Windows NT/95, OS/2, and VMS. It is probably one of the most widely used free version control systems around and has the advantage that it is not only free, but is open source.

CSSC Tugas untuk nomor Absen 39 dan 40

This is another SCCS clone, which provides version control compatible with those managed by SCCS on a number of Unix systems. It is useful if you have source code currently managed under SCCS and need to move it to a system without SCCS.

ComponentSoftware CS-RCS Tugas untuk nomor Absen 41 dan 42

This package provides a GUI interface to GNU RCS. It allows you to manage multiple versions of your source code in a space efficient manner. You can access the various commands in the package via either a user-friendly user interface, or the command line (useful for makefiles and other automated systems). It can also be integrated into your IDEs and editors. The program is free for personal use and open source projects. The GNU RCS system is included. This program runs on Win32 systems only.

Related Pages

How to Register Your Own Domain Name – get one for your software

The Beginner’s A-Z Guide to Starting/Creating Your Own Website

Frequently Recommended Windows Programming Books

Free C/C++ Libraries – don’t reinvent the wheel; get tested code

Free Database Libraries, ODBC Drivers, SQL servers & Tools

Free Sockets and Winsock (Internet) Libraries – add email, ftp, HTTP, etc

Free Encryption Source Code and Libraries

Which Web Host Do You Recommend? (FAQ)

Newest Pages

The Pros and Cons of Using an Online Blog Software or a Content Management System (CMS)

How to Insert Raw HTML Code in Dreamweaver

Free Apple II Emulators

How to Install and Configure Apache 2 on Windows

Free Logo Compilers and Interpreters

How to Create a Bootable “Live” Windows Rescue CD

How to Make Your WordPress Blog Search-Engine-Friendly

How to Create a Search Engine Friendly Website

Free Video Editors (Free Video Editing Software)

Dreamweaver Tutorial: How to Create a Website with Dreamweaver CS3

Popular Pages

How to Create/Start Your Own Website: The Beginner’s A-Z Guide

How to Register Your Own Domain Name – how to get your own domain name

How to Create a Bootable Windows XP Setup CD/DVD on a Preinstalled Windows System

Free Partitioning Software – Copy, Create, Move, Resize, Convert, Undelete Partitions

Free Data Recovery, File and Partition Recovery, Undelete and Unformat Software

Free Antivirus Software and Free Online Virus Scans

Free Spyware/Adware/Trojans/Keyloggers/Hijackers Removal, Detection and Prevention Tools and Sites

Free DVD Authoring and Creation Software

Free CD and DVD Burners and Copying Software

Free Hard Disk Backup and Restore, Hard Disk Image and Cloning Utilities

How to Link to This Page

To link to this page from your website, simply cut and paste the following code to your web page.

It will appear on your page as:

Free Source Code Version Control Software

Copyright © 1999-2007 by Christopher Heng. All rights reserved.

thesitewizard™, thefreecountry™ and HowToHaven™ are trademarks of Christopher Heng.

Last Updated: 9 September 2007.

Tugas Mandiri

1. Setiap mahasiswa berrtugas membuat artikel dengan topik OSS Control Version Revision yang telah disebutkan diatas yang telah diberi nomor, kemudian nomor tersebut disesuaiakan dengan absensi masing-masing

2. Tugas berbentuk artikel pembahasan atas software yang bersesuaian dengan tugas masing-masing. Penulisan artikel harus disusun dalam format:

a. Sampul (cover) lengkap dengan logo STMIK-AMIK Riau

b. Kata Pengantar

c. Daftar isi

d. Legal term, yang memuat seluruh sebutan yang berhubungan dengan hak cipta dalam penulisan artikel

e. Pendahuluan

f. Pembahasan (isi)

g. Penutup yang memuat Kesimpulan dan Saran

h. Daftar pustaka

i. Daftar istilah.

3. Setiap mahasiswa hanya dapat dibahas maksimal oleh dua orang mahasiswa, jika ada topik yang dibahas lebih dari dua orang maka mahasiswa yang membahas topik akan dibatalkan.

4. Disamping software diatas, mahasiswa dapat juga membahas software lain yang tidak didaftar diatas.

5. Tugas diselesaikan selama tiga minggu pertemua sejak tugas disampaikan pada saat pertemuan.

6. Akhirnya selamat bekerja, please open www.torkisnasution.com or www.torkisnasution.wordpress.com or please call 08127536689 for direct advise.

Tugas COBOL

April 28, 2008 by torkisnasution

Pertemuan X Program Inventori Software

Dalam program ini akan dibuat Entri data yang lebih baik dari sisi tampilan maupun dari sisi pengelolaan. Sebelum Anda membuat program create terlebih dahulu sebuah file dengan nama Soft.dat. selanjutnya buatlah program berikut :

*Pertemuan X

*Program berikut membaca data pada Soft.dat

*digunakan untuk kelas A, B, C, D

*Nama file Lat101.cbl

*Nama : fulan

*NIM : ?????

*———————————————-

IDENTIFICATION DIVISION.

PROGRAM-ID. Rekam-Data.

ENVIRONMENT DIVISION.

CONFIGURATION SECTION.

SOURCE-COMPUTER. IBM-PC.

INPUT-OUTPUT SECTION.

FILE-CONTROL.

SELECT INVENTORY-FILE ASSIGN TO DISK FILE-NAME

ORGANIZATION IS LINE SEQUENTIAL.

DATA DIVISION.

FILE SECTION.

FD INVENTORY-FILE.

01 INVENTORY-RECORD.

10 IR-STOCK-NUMBER PIC X(5).

10 IR-SOFTWARE-NAME PIC X(30).

10 IR-VENDOR-NAME PIC X(20).

10 IR-QUANT-ON-HAND PIC 9(3).

10 IR-REORDER-LEVEL PIC 9(3).

10 IR-PRICE PIC 9(3)V9(2).

WORKING-STORAGE SECTION.

01 CONSTANT-VALUES.

10 FILE-NAME PIC X(14) VALUE “Soft1.dat”.

01 PROGRAMMED-SWITCHES.

10 RECORD-COMPLETED PIC X.

10 ADD-ANOTHER-RECORD PIC X.

01 OTHER-VARIABLES.

10 DESIRED-OPTION PIC 9.

10 WAIT PIC X VALUE SPACE.

10 YES-NO PIC X(3).

SCREEN SECTION.

01 ADD-ANOTHER-RECORD-SCREEN.

10 VALUE

“Apakah akan menambah rekaman lagi <Y/N>? “

LINE 18 COL 1 HIGHLIGHT.

10 PIC X USING ADD-ANOTHER-RECORD

LINE 18 COL PLUS 1 REVERSE AUTO.

01 INTRODUCTION-SCREEN.

05 VALUE “Program ini akan menambah isi rekaman Anda”

BLANK SCREEN LINE 6 HIGHLIGHT.

05 VALUE “Software persediaan”

LINE PLUS 1 HIGHLIGHT.

05 PIC X(14) FROM FILE-NAME

LINE PLUS 2 COL 8 HIGHLIGHT.

05 VALUE “Apakah Anda akan melanjutkan <Y/N>? “

BELL LINE PLUS 2 HIGHLIGHT.

05 PIC X USING ADD-ANOTHER-RECORD

COL PLUS 0

REVERSE AUTO.

01 INVENTORY-RECORD-SCREEN.

10 VALUE “TAMBAH DATA PERSEDIAAN” BLANK SCREEN

LINE 2 COL 11.

10 VALUE “ID Persediaan” LINE PLUS 2 COL 1.

10 PIC X(5) USING IR-STOCK-NUMBER

LINE PLUS 0 COL 16 REVERSE.

10 VALUE “Nama Software” LINE PLUS 2 COL 1.

10 PIC X(30) USING IR-SOFTWARE-NAME

LINE PLUS 0 COL 16 REVERSE.

10 VALUE “Vendor” LINE PLUS 2 COL 1.

10 PIC X(20) USING IR-VENDOR-NAME

LINE PLUS 0 COL 16 REVERSE.

10 VALUE “Stock akhir” LINE PLUS 2 COL 1.

10 PIC ZZ9 USING IR-QUANT-ON-HAND

LINE PLUS 0 COL 16 REVERSE.

10 VALUE “Harga U$$” LINE PLUS 0 COL 26.

10 PIC ZZZ.99 USING IR-PRICE

LINE PLUS 0 COL 34 REVERSE.

10 VALUE “Nomor Rekam” LINE PLUS 1 COL 1.

10 PIC ZZ9 USING IR-REORDER-LEVEL

LINE PLUS 0 COL 16 REVERSE.

01 SELECT-OPTION-SCREEN.

10 VALUE “Options:” LINE 18 COL 1.

10 VALUE

1 data sudah benar. Rekam ke dalam file.”

LINE PLUS 1 COL 1.

10 VALUE

2 Data ini harus diperbaiki lagi.”

LINE PLUS 1 COL 1.

10 VALUE

3 Hapus data diatas; tidak jadi direkam.”

LINE PLUS 1 COL 1.

10 VALUE

“Silakan pilih 1, 2, atau 3 pada keyboard “

LINE PLUS 2 COL 1 HIGHLIGHT.

* Lihat tombol yang ditekan

10 PIC X TO DESIRED-OPTION

LINE 23 COL 45 REVERSE AUTO.

PROCEDURE DIVISION.

000-EXTEND-INVENTORY-FILE.

PERFORM 100-INITIALIZE

IF ADD-ANOTHER-RECORD = “Y”

PERFORM 110-ADD-INVENTORY-RECORD

UNTIL ADD-ANOTHER-RECORD NOT = “Y”

PERFORM 120-FINALIZE

END-IF

STOP RUN.

100-INITIALIZE.

MOVE “Y” TO ADD-ANOTHER-RECORD

DISPLAY INTRODUCTION-SCREEN

ACCEPT INTRODUCTION-SCREEN

IF ADD-ANOTHER-RECORD = “Y”

OPEN EXTEND INVENTORY-FILE

END-IF.

110-ADD-INVENTORY-RECORD.

INITIALIZE INVENTORY-RECORD

MOVE “N” TO RECORD-COMPLETED

PERFORM 300-ENTER-1-SOFTWARE-ITEM

UNTIL RECORD-COMPLETED = “Y”

DISPLAY ADD-ANOTHER-RECORD-SCREEN

ACCEPT ADD-ANOTHER-RECORD-SCREEN.

120-FINALIZE.

DISPLAY FILE-NAME LINE 21

DISPLAY ” telah di update….” POSITION 0

CLOSE INVENTORY-FILE.

300-ENTER-1-SOFTWARE-ITEM.

DISPLAY INVENTORY-RECORD-SCREEN

ACCEPT INVENTORY-RECORD-SCREEN

DISPLAY SELECT-OPTION-SCREEN

ACCEPT SELECT-OPTION-SCREEN

IF DESIRED-OPTION = 1

WRITE INVENTORY-RECORD

MOVE “Y” TO RECORD-COMPLETED

DISPLAY “Data ini direkam ke dalam fle”

LINE 16 ERASE EOS

END-IF

IF DESIRED-OPTION = 3

MOVE “Y” TO RECORD-COMPLETED

DISPLAY “Rekaman ini tidak ditambahkan ke dalam file”

LINE 16 ERASE EOS

END-IF.

*End of file

Program berikut digunakan untuk menampilkan data yang telah di insert pada program sebelumnya.

*Pertemuan X

*Program berikut membaca data pada Soft.dat

*digunakan untuk kelas A, B, C, D

*Nama file Lat102.cbl

*Nama : fulan

*NIM : ?????

*———————————————-

IDENTIFICATION DIVISION.

PROGRAM-ID. Lihat-data.

ENVIRONMENT DIVISION.

CONFIGURATION SECTION.

SOURCE-COMPUTER. IBM-PC.

INPUT-OUTPUT SECTION.

FILE-CONTROL.

SELECT INVENTORY-FILE ASSIGN TO DISK “Soft1.dat”

ORGANIZATION IS LINE SEQUENTIAL.

DATA DIVISION.

FILE SECTION.

FD INVENTORY-FILE.

01 INVENTORY-RECORD.

10 IR-STOCK-NUMBER PIC X(5).

10 IR-SOFTWARE-NAME PIC X(30).

10 IR-VENDOR-NAME PIC X(20).

10 IR-QUANT-ON-HAND PIC 9(3).

10 IR-REORDER-LEVEL PIC 9(3).

10 IR-PRICE PIC 9(3)V9(2).

WORKING-STORAGE SECTION.

01 PROGRAMMED-SWITCHES.

10 END-OF-PROCESSING PIC X(1) VALUE “N”.

PROCEDURE DIVISION.

000-DISPLAY-INVENTORY-RECORD.

PERFORM 100-INITIALIZE

PERFORM 110-DISPLAY-RECORD

UNTIL END-OF-PROCESSING = “Y”

PERFORM 120-FINALIZE

STOP RUN.

100-INITIALIZE.

OPEN INPUT INVENTORY-FILE

READ INVENTORY-FILE

AT END

MOVE “Y” TO END-OF-PROCESSING

END-READ.

110-DISPLAY-RECORD.

DISPLAY ” ” ERASE

DISPLAY “ID Stock : ” IR-STOCK-NUMBER

DISPLAY “Nama Software : ” IR-SOFTWARE-NAME

DISPLAY “Vendor adalah : ” IR-VENDOR-NAME

DISPLAY “Stok akhir : ” IR-QUANT-ON-HAND

DISPLAY “Nomor Rekaman : ” IR-REORDER-LEVEL

DISPLAY “Harga beli US$ : ” IR-PRICE

DISPLAY ” “

READ INVENTORY-FILE

AT END

DISPLAY “Last record. Strike Enter to terminate.”

ACCEPT END-OF-PROCESSING PROMPT, NO BEEP

MOVE “Y” TO END-OF-PROCESSING

NOT AT END

DISPLAY “Do you want to terminate processing?”

DISPLAY “<Type an upper-case Y or N> “

ACCEPT END-OF-PROCESSING PROMPT, NO BEEP

END-READ.

120-FINALIZE.

CLOSE INVENTORY-FILE.

*End of file

Setelah program diatas selesai, buatlah program parkir dengan field sebagai berikut :

No Parkir

No Plat

Jumlah Roda

Jenis kenderaan

Tanggal-masuk-parkir

Jam-masuk-parkir

Tanggal-keluar-parkir

Jam-keluar-parkir

Program yang dibuat adalah untuk entri dengan tampilan pada Latih101.cbl, dan laporan (display) seperti tampilan pada Latih102.cbl

Program latihan dan tugas dibuat dan di cetak diantar pada saat perkulihan ke 11

makasih

Modul COBOL

April 28, 2008 by torkisnasution

ne para mahasiswa yang mengambil matakliah cobol ne modul ne

7. File Handling

                 7.1 Reading and writing
                
7.2 REWRITE, DELETE and EXTEND
                
7.3 File organization
                
7.4 SORT and MERGE
                
7.5 Input and output procedures
                
7.6 File Status (error handling)This section outlines how data can read from and written to files, how records are organized within a file and how records can be manipulated (e.g. sorting, merging).

 

 

7.1 Reading and Writing

In order to either read, alter or create a new file, we must first open it (even if it doesn’t even exist yet). In doing so, a open mode must be defined. To simply read data from an existing file it would be opened in INPUT mode. In this mode, the file is read-only and cannot be altered in any way.
If writing to new file, i.e. creating one (or overwriting an existing file so be careful) the new file would be opened in OUTPUT mode. You cannot read data from a file opened in OUTPUT mode.
EXTEND mode allows for records to be added to the end of an existing file.
I-O mode is for input and output access to the file, such as when you wish to update a record, or delete a record.When a file is no longer required, the file needs to be closed again (using CLOSE). You can open and close a file as often as you like during a program run, although bear in mind that each time you open a file the computer will read from the first record onwards (in INPUT and I-O mode) or will overwrite in OUTPUT mode.

 

OPEN {INPUT or OUTPUT or I-O or EXTEND} {filename-1}…
           {INPUT or OUTPUT or I-O or EXTEND} {filename-2}…

e.g.

     OPEN INPUT DATA-1-FILE DATA-2-FILE
          OUTPUT NEW-DATA-FILE
               :
               :
     CLOSE DATA-1-FILE DATA-2-FILE NEW-DATA-FILE

 

  READThe READ statement will read the data from a file, taking precisely the data that is defined in the file descriptor (FD) in the data division (file section) (see

The Four Divisions section).
The format is:

The Four Divisions section).
The format is:

READ {FD filename}
      AT END {statements}
      NOT AT END {statements}
END-READ

Since a file would likely contain more than one record, the READ statement is often contained within a PERFORM loop:

  IDENTIFICATION DIVISION.

  PROGRAM-ID.      READ-EXAMPLE.

  AUTHOR           ZINGMATTER.

 

  ENVIRONMENT DIVISION.

  INPUT-OUTPUT SECTION.

  FILE-CONTROL.

 

      ASSIGN IN-FILE TO ‘A:CUSTOMER.DAT’

          ORGANIZATION IS LINE SEQUENTIAL.

      ASSIGN PRINT-FILE TO PRINTER.

      :

  DATA DIVISION.

  FILE SECTION.

  FD IN-FILE.

  01 CUSTOMER-DETAILS.

      03 CUS-NAME      PIC X(20).

      03 CUS-NUM       PIC 9(6).

 

  FD PRINT-FILE.

  01 PRINT-REC         PIC X(60).

 

  WORKING-STORAGE SECTION.

  01 EOF-FLAG PIC X.

      88 END-OF-IN-FILE VALUE ‘Y’.

 

  01 P-CUS-DETAILS

      03               PIC X(5) VALUE SPACES.

      03 P-NAME        PIC X(25).

      03 P-NUM         PIC Z(5)9.

      :

  PROCEDURE DIVISION.

  MAIN-PARAGRAPH.

     OPEN INPUT IN-FILE

 *”Prime” read

     READ IN-FILE

       AT END MOVE ‘Y’ TO EOF-FLAG

       NOT AT END PERFORM PRINT-DETAILS

     END-READ

    

 *Main reading loop

     PERFORM UNTIL END-OF-IN-FILE

        READ IN-FILE

           AT END MOVE ‘Y’ TO EOF-FLAG

           NOT AT END PERFORM PRINT-DETAILS

        END-READ

     END-PERFORM

 

     STOP RUN.

 

  PRINT-DETAILS.

     MOVE CUS-NAME TO P-NAME

     MOVE CUS-NUM TO P-NUM

     WRITE PRINT-REC FROM P-CUS-DETAILS AFTER 1 LINE.

 

  • A record containing a customer name (CUS-NAME) and the customer number (CUS-NUM) are read from a file customer.dat assign to IN-FILE.
  • The file is opened for INPUT (i.e. read-only).
  • The “prime read” refered to in the comment is the initial read of IN-FILE that allows for the possibility that the file contains no records.
  • The AT END clause tests for the end of file condition. When true, a series of statements can then be executed. Likewise, the NOT AT END clause allows for a series of statements to be executed when this condition is true. In the above example, when the file contains no more records (i.e. is at the end of the file) ‘Y’ is moved to EOF-FLAG, thereby making the condition name condition (END-OF-IN-FILE) true. When not at the end of the file, a record is read into memory and the paragraph PRINT-DETAILS is executed.
  • The statements between PERFORM UNTIL… and END-PERFORM are executed until the END-OF-IN-FILE condition is true (when the AT END of the read statement is true).

If you want to place data from a record into an item in WORKING-STORAGE (in addition to the memory space already allocated to the same data defined in the data division – so not much call for it), then use READ … INTO. i.e:

    READ IN-FILE INTO W-RECORD-IN

 

7.2 REWRITE, DELETE, and EXTEND

In order to ammend a record in a file, such as to update data (see League Table Program in sample programs section), to delete a record altogther, or to add a record to the end of a file, you can use REWRITE, DELETE or EXTEND, respectively. However, to use REWRITE or DELETE you must open the file using I-O mode. Also, DELETE can only be used on files with RELATIVE or INDEXED organization (see  example below).

RELATIVE and INDEXED files are discussed in the following section (File Organization).
 

The format of the DELETE statement is:

DELETE filename
     ON INVALID KEY 
          {statements}
     NOT ON INVALID KEY
           {statements}
END-DELETE
 

ON INVALID KEY means the record was not found, so you might want to display an error message
e.g. DISPLAY ‘RECORD NOT FOUND’

To REWRITE you can refer to the level 01 name to change the record with the ammended field: 
 

 \FD IN-FILE
 01 RECORD-IN.    
      03 IN-NAME    PIC X(20).
      03 IN-ADDRESS PIC X(60).
 
 PROCEDURE DIVISION.
 MAIN-PARAGRAPH.
       :
 
     OPEN I-O IN-FILE
       :
 
     READ IN-FILE
  
        IF IN-NAME = 'BILLY NOMATES' THEN 
          MOVE 'JIMMY MOREPALS' TO IN-NAME
          REWRITE RECORD-IN
        ELSE
          DISPLAY IN-NAME
        END-IF
       :
 

 
 

To EXTEND you must open the file in EXTEND mode: 

     OPEN EXTEND IN-FILE
       :
 
  
       DISPLAY 'Type in new name'
       ACCEPT NEW-NAME
       MOVE NEW-NAME TO IN-NAME
       EXTEND IN-FILE
 
       DISPLAY 'Type in new address'
       ACCEPT NEW-ADDRESS
       MOVE NEW-ADDRESS TO IN-ADDRESS
       EXTEND IN-FILE
       :

  Here is a sample program that deletes a record from an INDEXED file using the DELETE statement, followed by deletion of a record that does not use the DELETE statement but writes the whole file (less the record to be deleted) to a temporary file. The program asks for a six digit code that identifies the record to be removed from the file. If you want to try this program then you’ll need to create a couple of test files: TESTDATA1.DAT and TESTDATA2.TXT. 

TESTDATA1.DAT needs to be an indexed file. To create this you’ll need to compile and run the Create INDEXED file program and Read INDEXED file program (both in the Sample Code section).

 TESTDATA2.TXT should be LINE SEQUENTIAL and of the form:  

CODE–SOME ENTRY OF 43 CHARACTERSCODE–SOME ENTRY OF 43 CHARACTERS


123456abc———-**********———-**********

:

:

000010 IDENTIFICATION DIVISION.      

000020 PROGRAM-ID.  DELETION-EXAMPLE.       

000030 AUTHOR. TIM-R-P-BROWN.        

000040* Program that deletes a record from a              

000050* file where the specified record ID code is entered

000060* by the user. 2 differing methods are used.        

000070                               

000080 ENVIRONMENT DIVISION.         

000090                               

000100 INPUT-OUTPUT SECTION.         

000110 FILE-CONTROL.                 

000120                                

000130       SELECT IN-FILE-1 ASSIGN TO ‘TESTDATA1.DAT’   

000140         ORGANIZATION IS INDEXED                    

000150         ACCESS MODE IS DYNAMIC

000160         RECORD KEY IS RECORD-CODE-1.               

000170       SELECT IN-FILE-2 ASSIGN TO ‘TESTDATA2.TXT’   

000180         ORGANIZATION IS LINE SEQUENTIAL.           

000190       SELECT TEMP-FILE ASSIGN TO ‘TEMP.TXT’        

000200         ORGANIZATION IS LINE SEQUENTIAL.           

000210                               

000220 DATA DIVISION.                

000230 FILE SECTION.                 

000240                               

000250 FD IN-FILE-1.                 

000260 01 RECORD-1.                  

000270      03 RECORD-CODE-1    PIC X(6).                 

000280      03 RECORD-DETAILS-1 PIC X(43).                

000290                               

000300 FD IN-FILE-2.                 

000310 01 RECORD-2.                  

000320      03 RECORD-CODE-2    PIC X(6).                 

000330      03 RECORD-DETAILS-2 PIC X(43).                

000340                               

000350 FD TEMP-FILE.                 

000360 01 TEMP-RECORD.               

000370      03 TEMP-CODE        PIC X(6).                 

000380      03 TEMP-DETAILS     PIC X(43).                

000390                               

000400                               

000410                               

000420 WORKING-STORAGE SECTION.      

000430                               

000440 01 END-OF-FILE-FLAG PIC X VALUE ‘N’.               

000450      88 EOF  VALUE ‘Y’.       

000460                               

000470 01 REC-DELETE-FLAG  PIC X VALUE ‘N’.               

000480      88 RECORD-DELETED VALUE ‘Y’.                  

000490                               

000500 01 DEL-CODE  PIC X(6) VALUE SPACES.                

000510                               

000520                               

000530                               

000540 PROCEDURE DIVISION.           

000550                               

000560 MAIN-PARAGRAPH.               

000570                               

000580     PERFORM FIRST-METHOD      

000590     MOVE ‘Y’ TO END-OF-FILE-FLAG                   

000600     PERFORM SECOND-METHOD     

000610     STOP RUN.                 

000620                               

000630***********************************************************

000640                               

000650 FIRST-METHOD.                 

000660* Paragraph that uses the DELETE to remove a record 

000670                                

000680      DISPLAY ‘Enter 6 digit code of record to be deleted’

000690      ACCEPT RECORD-CODE-1     

000700      OPEN I-O IN-FILE-1       

000710                               

000720                               

000730         DELETE IN-FILE-1      

000740           INVALID KEY DISPLAY ‘RECORD NOT FOUND’   

000750                               

000760         END-DELETE            

000770                               

000780                               

000790      CLOSE IN-FILE-1.         

000800                               

000810***********************************************************

000820                               

000830 SECOND-METHOD.                

000840* Paragraph that writes to a temporary file without 

000850* including the record to be deleted                

000860                               

000870      DISPLAY ‘Enter 6 digit code of record to be deleted’

000880      ACCEPT DEL-CODE          

000890      OPEN INPUT IN-FILE-2     

000900           OUTPUT TEMP-FILE    

000910                               

000920      MOVE ‘N’ TO REC-DELETE-FLAG                   

000930      MOVE ‘N’ TO END-OF-FILE-FLAG                  

000940                               

000950*—-first write all records (except the selected one) to

000960*—-the temporary file        

000970      PERFORM UNTIL EOF        

000980         READ IN-FILE-2        

000990           AT END SET EOF TO TRUE                   

001000           NOT AT END           

001010              IF RECORD-CODE-2 = DEL-CODE THEN      

001020                   SET RECORD-DELETED TO TRUE       

001030              ELSE             

001040                   WRITE TEMP-RECORD FROM RECORD-2  

001050              END-IF            

001060         END-READ              

001070      END-PERFORM              

001080                               

001090                               

001100                               

001110      IF NOT RECORD-DELETED THEN                     

001120         DISPLAY ‘Record not found’                 

001130      END-IF                   

001140                               

001150      CLOSE IN-FILE-2 TEMP-FILE

001160                               

001170      MOVE ‘N’ TO END-OF-FILE-FLAG                  

001180                               

001190*—-now read all records from temp-file to a new ‘TESTDATA-2.TXT’

001200*—-This is virtually the same as just renaming the temporary file

001210*—-when you think about it, just done the COBOL way!  

001220      OPEN INPUT TEMP-FILE     

001230           OUTPUT IN-FILE-2    

001240*———the original ‘TESTDATA-2.TXT’ will be overwritten—–*

001250                               

001260      PERFORM UNTIL EOF        

001270         READ TEMP-FILE        

001280           AT END SET EOF TO TRUE                   

001290           NOT AT END          

001300              WRITE RECORD-2 FROM TEMP-RECORD       

001310         END-READ              

001320      END-PERFORM               

001330                               

001340      CLOSE TEMP-FILE IN-FILE-2.                    

001350                               

001360***********************************************************

001370***********************************************************

  

7.3 File Organization

There are at least four ways in which the records on a file may be organised: SEQUENTIAL, LINE SEQUENTIAL, RELATIVE, AND INDEXED. When a file contains several records (hundreds or even thousands) if you only wanted to access one or two of them, it would waste processor time having to search an entire file in order to read them if stored in sequential or line sequential formats. Hence, relative and indexed files are of particular advantage.  

       Relative files

These files are organised so that a record can be accessed by referring to its position within the file, i.e. relative to other records. This is acheived by calculating the size (in characters, defined in the FD description) of each record and multiplying it by the required nth record….eh?? you ask. Consider the following program:

IDENTIFICATION DIVISION.

  PROGRAM-ID.      RELATIVE-EXAMPLE.

  AUTHOR           TRP BROWN.

 

  ENVIRONMENT DIVISION.

  INPUT-OUTPUT SECTION.

  FILE-CONTROL.

 

      ASSIGN IN-FILE TO ‘A:CUSTOMER.DAT’

          ORGANIZATION IS RELATIVE

          ACCESS MODE IS DYNAMIC

          RELATIVE KEY IS ENTER-NUM.

     

  DATA DIVISION.

  FILE SECTION.

  FD IN-FILE.

  01 CUSTOMER-DETAILS.

      03 CUS-NAME      PIC X(20).

      03 CUS-CODE      PIC X(6).

 

 

  WORKING-STORAGE SECTION.

 

  01 ENTER-NUM         PIC 9(4).

 

  PROCEDURE DIVISION.

  MAIN-PARAGRAPH.

     OPEN INPUT IN-FILE

     DISPLAY ‘ENTER CUSTOMER NUMBER’

     ACCEPT ENTER-NUM

 

     READ IN-FILE

        INVALID KEY DISPLAY ‘RECORD NOT FOUND’

        NOT INVALID KEY

           DISPLAY ‘CUSTOMER NAME: ‘ CUS-NAME

           DISPLAY ‘CODE:          ‘ CUS-CODE

     END-READ

 

     CLOSE IN-FILE    

     STOP RUN.

  • In the environment division, the assign clause contains a number of extra words. The organization is RELATIVE. This is followed by ACCESS MODE IS DYNAMIC. This means that the file can be read sequentially or RANDOMLY, i.e. direct access whereby the computer can calculate where to look for the required record. You alternatively use ACCESS MODE IS RANDOM but this doesn’t allow for a sequential access option (so what’s the point using it…?).
  • The next line RELATIVE KEY IS ENTER-NUM refers to this item defined in working storage that will contain the record number required. When the number is entered into the keyboard (ACCEPT ENTER-NUM), the computer will multiply this number (minus 1) by the size of the record (CUSTOMER-DETAILS containing 26 characters):
    e.g.
       (102-1) * 26 = 2626 characters into the file will be immediately followed by the 102nd record.
  • The read statement, rather than using AT END and NOT AT END, uses INVALID KEY and NOT INVALID KEY. Here these depend on whether the file has been found or not.
  • The PIC size of ENTER-NUM is 9(4), which limits the file to 9,999 records but you could increase this if you wanted.
  • It should be noted that you are not allowed to use an item defined in the FD as a relative key.

 

       Indexed files

An indexed file contains records that, unlike relative files, do not require the key to be numeric. Look at the following code (similar to the above code):

IDENTIFICATION DIVISION.

  PROGRAM-ID.      INDEXED-EXAMPLE.

  AUTHOR           TRP BROWN.

 

  ENVIRONMENT DIVISION.

  INPUT-OUTPUT SECTION.

  FILE-CONTROL.

 

      ASSIGN IN-FILE TO ‘A:CUSTOMER.DAT’

          ORGANIZATION IS INDEXED

          ACCESS MODE IS DYNAMIC

          RECORD KEY IS CUS-CODE.

     

  DATA DIVISION.

  FILE SECTION.

  FD IN-FILE.

  01 CUSTOMER-DETAILS.

      03 CUS-CODE      PIC X(6).

      03 CUS-NAME      PIC X(20).

 

 

  WORKING-STORAGE SECTION.

 

  01 ENTER-NUM         PIC 9(4).

 

  PROCEDURE DIVISION.

  MAIN-PARAGRAPH.

     OPEN INPUT IN-FILE

     DISPLAY ‘ENTER CUSTOMER NUMBER’

     ACCEPT ENTER-NUM

 

     READ IN-FILE

        INVALID KEY DISPLAY ‘RECORD NOT FOUND’

        NOT INVALID KEY

           DISPLAY ‘CUSTOMER NAME: ‘ CUS-NAME

           DISPLAY ‘CODE:          ‘ CUS-CODE

     END-READ

 

     CLOSE IN-FILE    

     STOP RUN.

 

The main differences between this example and the relative file example are that (1) the term RECORD KEY is used, rather than RELATIVE KEY; (2) any field can be used from the record. However, the field must be unique otherwise a duplicate key error would occur. Rather than directly access the file, as in relative file access, the computer searches a separate index file that contains pointers to the position of the actual record on the indexed (data) file. The field in the index, whether numeric or alphanumeric, must be in strict ascending order (ASCII characters are ordered according to their ASCII value, e.g. A < B etc…).

 

In order to read the indexed file sequentially, but in ascending order on the key field, the verb START is used. For the above example:




    OPEN INPUT IN-FILE
    START IN-FILE
    KEY GREATER THAN 'D23301'
      INVALID KEY 
         DISPLAY 'NO MORE RECORDS BEYOND THIS POINT'
      NOT INVALID KEY
         ....statements to process rest of file e.g. READ within a loop
    END-START

 

To differentiate between a sequential READ and a random READ when using DYNAMIC access mode, you would use the statements READ (with INVALID KEY) for random read, and READ…NEXT for sequential read (with AT END) e.g. :




   *Random read
        MOVE 'E11323' TO CODE-NUM
        READ IN-FILE
           INVALID KEY DISPLAY 'CODE NOT FOUND'
        END-READ
   *Sequential read
        READ IN-FILE NEXT
           AT END MOVE 'Y' TO EOF-FLAG
        END-READ

                    

7.4 SORT and MERGE

If you wished to take a file of unordered records and produce a new file of these records sorted into ascending or descending order of a field you would use SORT. The League table program in the Sample code section uses this utility to generate a league table from updated records from a data file, sorted principally by descending points.

Consider this segment of code from this program:




000050 ENVIRONMENT DIVISION.                                       
000060 INPUT-OUTPUT SECTION.                                       
000070 FILE-CONTROL.                                               
000080     SELECT TEAM-REC-IN ASSIGN TO "INPUT.REC"                
000090     ORGANIZATION IS SEQUENTIAL.                             
000100     SELECT WORK-FILE ASSIGN TO SORTWK01.                    
000110     SELECT SORT-OUT ASSIGN TO "SORTED.REC"                  
000120     ORGANIZATION IS SEQUENTIAL.                             
000130     SELECT PRINT-FILE ASSIGN TO "PRINTOUT.TXT".             
000140                                                             
000150                                                             
000160 DATA DIVISION.                                              
000170 FILE SECTION.                                               
000180 FD TEAM-REC-IN.                                             
000190 01 TEAM-REC.                                                
000200     03  TEAM-CODE   PIC XXX.                                
000210     03  TEAM-NAME   PIC X(20).                              
000220     03  PLAYED  PIC 99.                                     
000230     03  GOALS-FOR   PIC 99.                                 
000240     03  GOALS-AGST  PIC 99.                                 
000250     03  G-WON   PIC 99.                                     
000260     03  G-LOST  PIC 99.                                     
000270     03  G-DRAWN PIC 99.                                     
000280     03  GOAL-DIFF   PIC S99 SIGN LEADING SEPARATE.          
000290     03  POINTS  PIC 99.                                     
000300                                                             
000310 SD WORK-FILE.                                               
000320 01 WORK-REC.                                                
000330     03  TEAM-CODE-KEY PIC XXX.                              
000340     03                PIC X(22).                            
000350     03  GF-KEY        PIC 99.                               
000360     03                PIC X(8).                             
000370     03  GD-KEY        PIC S99  SIGN LEADING SEPARATE.       
000380     03  POINTS-KEY    PIC 99.                               
000390                                           

 

In addition to the FD for the TEAM-REC-IN (the main data file) there is also a WORK-FILE that the computer uses for sorting. Here it is assigned to SORTWK01, required for the Fujitsu COBOL compiler, but for MicroFocus you might code ASSIGN TO DISK or even ASSIGN TO “B:TEMPFILE”.

The WORK-FILE does not have a FD descriptor, but rather, has a sort descriptor SD.




003310 SORT-TABLE.                                                 
003320     SORT WORK-FILE                                          
003330         ON DESCENDING KEY POINTS-KEY GD-KEY GF-KEY          
003340         USING TEAM-REC-IN                                   
003350         GIVING SORT-OUT.    

 

The SORT-TABLE paragraph then sorts the data file TEAM-REC-IN as shown above. Note that the SORT verb is followed by WORK-FILE and that TEAM-REC-IN is refered to with USING…

Since it is common for two teams to have the same number of points then, the DESCENDING KEY first attempts to sort by points (POINTS-KEY) but if these match then they are than sorted by goal difference (GD-KEY) and then by goals scored (GF-KEY). If these all match then the teams will be placed as the appear from the data file (for TEAM-REC-IN I placed them in alphabetical order).

SORT-OUT is the destination of the sorted data where the new league table would appear.

Note, a file that is to be sorted if already open, must be closed prior to sorting. THE SORT STATEMENT WILL AUTOMATICALLY OPEN THE UNSORTED FILE WHEN EXECUTED.


 

       Merge

To merge two sorted files into a single sorted file, the MERGE statement is used:




     MERGE WORK-FILE
        ON ASCENDING KEY CUS-CODE-KEY 
        USING FILE-A
              FILE-B
        GIVING MERGED-FILE

You can merge more than 2 files if you wish. An SD would be required as used with a SORT.

7.5 INPUT and OUTPUT PROCEDURE

The SORT statement above sorted all the records in the file into a new file. But if you wanted to produce a sorted file that only contained, for example, product numbers which begin with a ‘1′, you would use an INPUT PROCEDURE.

The record FD might be:




   FD UNSORTED-FILE.
   01 UNSORTED-RECORD.
        03 1ST-DIGIT-OF-CODE  PIC 9.
        03                    PIC X(20).

The description gives the minimum detail required. Now some procedure division:




   PROCEDURE DIVISION.
   SORT-SELECT.
        SORT WORK-FILE
            ON DESCENDING KEY PRODUCT-NO
            INPUT PROCEDURE SELECT-PROD-CODE
            GIVING SORTED-CODES-FILE
        STOP RUN.

The INPUT PROCEDURE clause acts like a PERFORM, indicating the logic to go to a different paragraph (i.e. procedure).

So the paragraph SELECT-PROD-CODE might be like this:




     SELECT-PROD-CODE.
         OPEN INPUT UNSORTED-DATA-FILE
         PERFORM UNTIL END-OF-FILE
           READ UNSORTED-DATA-FILE
             AT END MOVE 'Y' TO EOF-FLAG
             NOT AT END
               IF 1ST-DIGIT-OF-CODE = 1 THEN
                 MOVE UNSORTED-RECORD TO WORK-REC
                 RELEASE WORK-REC
               END-IF
           END-READ
         END-PERFORM
         CLOSE UNSORTED-DATA-FILE

When the if condition is true, the record is moved to the work-file (WORK-REC is the level 01 name) by the RELEASE verb, even though the MOVE verb appears first (I dunno why..!). Unlike a simple SORT, you DO have to OPEN the unsorted file prior to an input procedure. 

 

 

  OUTPUT PROCEDURE

If you just want to print specific sorted fields you would use an OUTPUT PROCEDURE. Based on the above example:




   PROCEDURE DIVISION.
   PRINT-SORT-REC.
        SORT WORK-FILE
            ON DESCENDING KEY PRODUCT-NO
            USING UNSORTED-RECORD
            OUTPUT PROCEDURE PRINT-SELECT-PROD-CODE
        STOP RUN.
 

The INPUT PROCEDURE clause acts like a PERFORM, indicating the logic to go to a different paragraph (i.e. procedure).

So the paragraph SELECT-PROD-CODE might be like this:




     SELECT-PROD-CODE.
         OPEN OUTPUT PRINT-FILE
         PERFORM UNTIL END-OF-FILE
           RETURN UNSORTED-DATA-FILE
             AT END MOVE 'Y' TO EOF-FLAG
             NOT AT END
               {move fields in SD sort group to print fields}...
               WRITE PRINT-RECORD FROM {print group}
           END-RETURN
         END-PERFORM
         CLOSE PRINT-FILE.

Instead of READ you use RETURN and then WRITE the record to the printer rather than RELEASE the record to a file.

 

You can combine INPUT and OUTPUT procedures into the same sort statement by replacing both the USING and GIVING statements:




       SORT WORK-FILE
          ON DESCENDING KEY PRODUCT-NO
          INPUT PROCEDURE SELECT-PROD-CODE
          OUTPUT PROCEDURE PRINT-SELECT-PROD-CODE
       STOP RUN.
 

7.6 FILE STATUS (error handling)

A number of errors can occur that result from file input/output that programmer may wish to be able to deal with in order to avoid unexpected program termination.

Run time errors can arise quite easily from a file not being available to open, or if present the data is corrupted. Furthermore, what if there is no more disk space available or not enough space has been allocated to allow for addtition of new data. Other errors, such as attempting to close a file that isn’t open, or to read a file opened for output only, may well derive from logical errors (that is, programming mistakes) but can be dealt with nonetheless when debugging. These kinds of errors will normally result in termination of the program run, whereas using File Status can allow the programmer to deal with any such problems without the program run stopping and returning to the operating system.

File Status Codes are made of two digits, the first indicates one one of 5 classes:

0

Input/output operation successful

1

File “at end” condition

2

Invalid key

3

Permanent I/O error

4

Logic error

The second digit refers to the particular case within the class. Here are examples common to both Microfocus and Fujitsu compilers (although there are more besides). I would check your compiler documentation.

Code

Meaning

00

Input/output operation successful

02

Duplicate record key found (READ ok)

04

Length of record too large (READ ok)

10

File AT END

14

“The valid digits of a read relative record
number are greater than the size of the relative
key item of the file.”
from Fujitsu manual -
I’m not sure I what that means!

16

Program tries to read file already AT END
note: Fujitsu compiler returns code “46″ in this case

22

Program attempts to write a record
with a key that already exists

23

Record not found

24

Program attempts to write record to a disk that is full

30

Input/output operation unsuccessful,
no further information available

34

Program attempts to write record to a disk that is full

35

Program tries to open non-existant file
for INPUT, I-O or EXTEND

37

Program tries to open line sequential file in I-O mode

41

Program tries to open file that is already open

42

Program tries to close file that is not open

43

Program tries to delete or rewrite a record
that has not been read

44

Program tries to write or rewrite a record of incorrect length

46

Program tries to read a record where the previous read or
START has failed or the AT END condition has occurred

47

Program tries to read a record from a file opened
in the incorrect mode

48

Program tries to write a record from a file opened
in the incorrect mode

49

Program tries to delete or rewrite a record from a file opened
in the incorrect mode

To use these codes you need to include the FILE STATUS clause in the SELECT statement of the environment division:

     SELECT TEST-FILE ASSIGN TO 'TEST-DATA.DAT'
       ORGANIZATION IS SEQUENTIAL
       FILE STATUS IS W-STATUS.


Of course W-STATUS could any user name you like. It must however be defined in working storage as PIC XX, i.e. as alpha numeric and not numeric. So, if during a program run a certain input/output error occurs, rather than the program terminate, the program will simply produce an error status.
You might code:

* Here a possible danger of too big a record being moved into W-RECORD
     READ RECORD-IN INTO W-RECORD
       IF W-STATUS = "04" THEN
          DISPLAY "Over-sized record has been read"
          SET REC-XS-FLAG TO TRUE
       END-IF
     


Another example might be, when reading from an indexed file:

     READ IN-FILE
       IF W-STATUS = "23" THEN
          DISPLAY "Record not found"
       ELSE PERFORM MAIN-PROCESS
     


You could have easily have written:

     READ IN-FILE
       INVALID KEY
          DISPLAY "Record not found"
       NOT INVALID KEY PERFORM MAIN-PROCESS
     END-READ


So consider which is the best option and remember not to try and do both.

For Fujitsu compilers at least, although the program run is not terminated, the Fujitsu WINEXE enviroment will still produce a prompt indicating the error (with more detailed error codes). I’m not sure, but I suspect that this facility can be disabled. Check the user manual.

 

 

 

Translate – TOS

April 26, 2008 by torkisnasution

Dibawah ini adalah aspek lega dalam dunia teknologi informasi, translate ke bahasa indonenis diserhakan pada pertemuan selanjuutnya..

Glossary of legal terms in computer technology

From Wikipedia, the free encyclopedia

 

 

The legal aspects of technology involve many different terms. This page attempts to provide short and accurate definitions of these terms, as they pertain to technology, with links to more information in Wikipedia.

  • abandonware — Software no longer being maintained, released or supported by the manufacturer
  • author — In the case of a software program not created for an employer, the creator(s) of the program. Where the person creates a program as a work for hire, their employer is considered the author.
  • binary — An executable program or a data file used by a program.
  • BSD-style — A type of software license which, while claiming copyright, essentially waives almost all of the copyright restrictions.
  • Clickwrap — A license agreement which is read and accepted typically by clicking ‘I agree’ after being shown the agreement, usually as part of the process of installing the software
  • closed source — Software for which the source code is not normally available to the end users of the program.
  • compatible — Mostly commonly, a type of software that will work similar to another software package (such as one word processor accepting the word processing files of a different word processor). Can also mean license compatibility.
  • concurrent user license — A style of software license in which the number of licenses granted (and typically, the number of fees paid) depends on the number of individuals actually accessing the software at any given time, rather than the total number of individuals who potentially may access it (distinguished from a named user license)
  • copycenter — See BSD-style.
  • copyleft — A type of copyright which uses the protections of copyright to ensure the freedom of users of a program
  • copyright — An exclusive right of reproduction or certain other uses of a literary, pictorial, audio or visual work.
  • distribute — To transfer copies of a work to others.
  • DMCA: Digital Millennium Copyright Act — A United States statute prohibiting certain types of activities on copyrighted work, such as breaking encryption.
  • DRM: digital rights management — A system which prohibits in whole or part, copying or use of a work protected by the system
  • end user — The party who operates a computer program to accomplish the performance of a specific task or tasks
  • EULA: end user license agreement — A provision to require an end user of a computer program to agree to certain restrictions on use of a program that the user normally would have absent agreement to the terms of the EULA.
  • fair dealing — The right to use a copyrighted work in part even against the permission of the copyright holder. Referred to as fair use in the United States.
  • fair use — Same as fair dealing.
  • FOSS: Free/open source software or FLOSS (Free/libre/open source software) — Software for which the source code is normally available to the end users of the program.
  • Free — Software which is either available without charge, or which is available without the usual restrictions of proprietary software.
  • freely redistributable — Software which the copyright holder waives the right to exclude others from making copies.
  • freeware — Software which the copyright holder allows persons to make copies, usually without allowing access to the source code.
  • GPL: GNU General Public License — A special type of license designed to protect the rights of end users.
  • incompatible — Software which does not normally work in a similar fashion to other competing applications
  • IP: intellectual propertycopyrights, patents, trademarks and trade secrets
  • license – A privilege to use or copy a program
  • MIT-style — A type of license which waives almost all of the restrictions imposed by copyright.
  • modify — To change a computer program.
  • named user license — A style of software license in which there must be a license granted (typically with a fee paid) for every individual who is to have access to the software (distinguished from a concurrent user license)
  • non-Free — To be restricted in some fashion.
  • NDA: non-disclosure agreement — An agreement not to give certain information to others.
  • open source — A type of software which grants the end user the privilege of copying, distribution and/or modification.
  • patent — A right granted by the government to allow the owner of the patent to prevent others from making, using or selling an invention.
  • phishing — Fraudulent attempts to acquire sensitive information such as credit card details by masquerading as a bank or other trustworthy organization.
  • plagiarism — Presenting someone else’s writing as your own.
  • proprietary — Software which is property of a specific company for which the source code is usually not available for inspection by end users.
  • public domain — A work which is not subject to copyright.
  • source code — The exact specifications of a computer program.
  • shared source — A type of license where the source code of a proprietary program may be available to certain parties.
  • shareware – Software which a limited license to copy is granted for a short period to allow the end user to try it before purchasing.
  • shrink wrap contract – A license agreement which can only be read and accepted by the user after opening the product.
  • trade secret — A particular piece of information not generally known by the public which is protected against disclosure by the owner of the secret, usually by non-disclosure agreement, contract or other requirements.
  • trademark — A word, symbol, color or sound used to identify the origin of certain goods.
  • TC: treacherous computing — A somewhat pejorative term used to describe the development of computer hardware in which the makers of software loaded on the computer have the right to prohibit the owner of the computer from using it in certain ways.
  • TC: trusted computing — A relatively neutral term used to describe the development of computer hardware in which the makers of software loaded on the computer have the right to prohibit the owner of the computer from using it in certain ways.
  • TwC: trustworthy computing
  • USPTO: United States Patent and Trademark Office — The government agency which accepts registrations of trademarks and issues patents.
  • vendor — A seller of computer hardware and/or software.
  • vendor lock-in — Condition where a person or organization has become dependent upon specific hardware and/or software, and where it would be impossible or prohibitively expensive to change to something else.
  • warez — An expression used by software pirates typically referring to a cracked (stripped) copyrighted game, application, or file.

Tugas Proposal Bisnis – TOS

April 26, 2008 by torkisnasution

Model bisnis dalam dunia open source dikenal 5 jenis, yaitu Sell Support Service, Run (or build) hardware, Propreatary Component, Dual Licensing, Advertising. Mahasiswa memilih topik diantara lima model bisnis diatas untk dibuat proposal. Tugas tersebut dibuat dan diserahkan 2 minggu setelah diumumkan dalam kelas pertemuan. pls call my phone if sth wrong…

Hello world!

April 26, 2008 by torkisnasution

Welcome to WordPress.com. This is your first post. Edit or delete it and start blogging!