Hex is an abbreviation to the word HexaDecimal. Pertaining to a numbering system which uses 16 as the base (as opposed to 10. BTW, the word in English HEX is to perform magic...
Delta, you assuming that the data is justified right, What if spaces ,if exist, is in the right side,And what if there is more then 4 characters?.
I don't sure that input file with 'X' format like 'F4C3" will be converted to its binary value.
I wrote a routine (20 years ago) that accomplished that task.
It is written in RM/COBOL, COMP-4 is a binary formant in this compiler (COMP-X for Micro Focus).
The characters must be cheeked to be in range 0-9 or A-F(upper case), max input 18 characters.
I have also the versa routine dec2hex.cbl...
When you want to see just errors list, and without numbring the copy parts, the old 6 source line number, is very use full.
I have a program to number/renumber(reseq).
RSQ your-program or RSQ your-program.cbl or RSQ (for prompt)
In order to prevent writing non COBOL file, the program will...
thread52-1108457
I found a ZOMBIE for a user called "sofri".
I could not find this user, by the command "who", but with ps -ef | grep sofri, I found a proccess belong to "sofri" with too much STIME and in TTY column just "-".
sofri 29012 29978 0 Oct 02 - 0:00 /usr/bin/sh...
I wrote a routine that output any formatted number, and adjust it to left, plus output the length.
01 N PIC 9(4) VALUE 0123.
01 Z PIC Z(9).
***** CALL-NUM2LEFT *****
01 INP-NUM PIC X(25).
01 OUT-NUM PIC X(25).
01 OUT-NUM-LENGTH PIC 9(4).
***********************************...
In the header of the index or relative file, there is information about the file like key descriptions, & counts of alive records & deleted records.
If you read the file as binary file,
position 47-54 contain the number of records in the file (format: pic 9(12) comp-4).
I am using for more then a year a software, that can sending or view reports files, even from Dos prpomt window
From the application, you copy the spool file to some defined file, then a TSR program, capture the file. and redirect it to direct print or open a dialog box.
lOOK...
Here some lines from a .bat file
One of zip file, include 3 files.
============
rem unzip files from unix host
pkunzip.exe -o c-tabl.zip
pkunzip.exe -o c-tach.zip
pkunzip.exe -o c-mech.zip
.....
i have s simple routine, for sorting table, that will work in any cobol version.
000001 IDENTIFICATION DIVISION.
000002 PROGRAM-ID. SORTVECT.
000003 ENVIRONMENT DIVISION.
000004 CONFIGURATION SECTION.
000005 DATA DIVISION.
000006 WORKING-STORAGE SECTION.
000007 01 I PIC 9(4)...
I use old special routine that will work at any Cobol system, (even old).
000001 IDENTIFICATION DIVISION.
000002 PROGRAM-ID. NUMSPL.
000003 ENVIRONMENT DIVISION.
000004 DATA DIVISION.
000005 WORKING-STORAGE SECTION.
000006 01 I PIC S9(5) COMP-3 VALUE 0.
000007 01 J PIC...
If that application need such huge capacity, and need to keep on-line old period recoreds, for my opinion, maybe you will reconsider, that the best cost/performance is to upgrate your system, that will handle such file, or to reduce the period you are keeping online.
Other sugetiones, if your...
There is a software that its main task to handle printing tasks, including from dos command line, or from programs.
It can also, to display/zoom pages by PgUp/Dn, every page that has page eject.
www.printfil.com
Baruch
Hi
A simple trick in 2000YK was like,
"that is doing something else then you think at first sight".
000000 01 in-year pic 9(2).
000000 subtract 1 from in-year.
source was fixed to:
000000** subtract 1 from in-year.
000000 add 99 to in-year.
Baruch
Hi
I am also don't think that relative files is good idea to keep data in core main files.
But for temporary/working or from external system, a file that is a line seq. & relative in the same time, so for example , you can read the record back, can be useful.
Baruch
Hi
1. open file i-o. (if output, open f output, close f, open i-o f)
2. read main key ---> invlid msg
3. read first-alt key ----> invalid msg
4... rean n-alt key..s -----> invalid msg
5. write f-rec ----> invalid "abnormal msg".
From the first read until writing the record, the record is locked...
Hi all
As that said befor , in Micro Focus, any fixed line seq. file, can be tratead as a fixed ralativ file.
If you open output relative file & see the dump,
You can see that the recors end with 0D 0A, like a regular line seq. file.
That is a nice idea that must be adopted to ansi cobol...
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.