¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

NJE38 V2.2

 

NJE38 version 2.2 is now available.? This version now contains the following new features:
-????????? Text-based configuration file.
-????????? Wildcard routing support.
-????????? Alternate routing support.
-????????? Add or remove links, routes, and authorizations dynamically by commands.
-????????? New command D nodeid
-????????? Bug fixes

This software provides an NJE capability to MVS 3.8 that can connect to other remote MVS or VM systems, as well as non-mainframe software that is NJE-capable such as Funetnje.? With NJE38, you can send and receive files with remote nodes using the supplied TSO TRANSMIT and RECEIVE commands or via batch utilities. You could send an entire PDS to another MVS 3.8 system for example, or send source code or a listing file from a TSO userid to a VM userid (or vice-versa) as another example.


NJE38 can connect with multiple hosts and supports store-and-forward routing for files passing through on the way to another destination.? NJE38 also supports commands and messaging with remote hosts, and interfaces with TSO.


If this solution is of interest, you may download the NJE38 package including software and complete documentation from the files section.? The name of the file is ¡®nje38v220.zip¡¯.


Regards,
Bob


Re: COBOL in TK4-: Handling Signed Numbers

Ed Liss
 

On Wed, Jan 6, 2021 at 02:33 PM, Patrik Schindler wrote:
By reading IBM GC28-6396-6 (ANSI COBOL from 1976), I maybe should rewrite:
The COBOL compiler with tk? is older than 1976.? Yes it is ANSI COBOL but it dates back to MVT days (1960's).

For zoned decimal fields, the sign is always in the low order digit.? You did mention overpunch and back in the day of key punch machines, an "11 punch" was made in the right most position of a numeric field to indicate a negative number.? This practice dated back to mechanical accounting machines that processed punched cards.? It carries on still in the modern IBM world.

Example:???? here is how data is stored for COBOL USAGE DISPLAY pictures:
PIC 999?? VALUE 3? would be in memory as 003 (hex F0F0F3)
PIC s999 VALUE 3? would be in memory as 00C (hex F0F0C3)
PIC s999 VALUE -3 would be in memory as 00L (hex F0F0D3)

Also, It appears that you are assuming COBOL will align decimal points in data with "V" characters in PICTURES.? That is not true and will result in S0C7 abends.

For this example, the simplest way to get the signs would be to define the sign as a separate character and add code to multiply the score by -1 if the sign is "-".


Re: COBOL in TK4-: Handling Signed Numbers

 

Hello Mark,

Am 07.01.2021 um 15:58 schrieb Mark Waterbury <mark.s.waterbury@...>:

See:
That the same article I was referring to in my original post. :-)

I did not bother too much with it, because the questioner used SIGN clauses which do not work in the TK4- provided COBOL, and I got somewhat confused by the decimal comma-fullstop-requirement.

I¡¯ll look at your privately sent recommendations, implement them and report back.

Thanks again!

:wq! PoC


Re: COBOL in TK4-: Handling Signed Numbers

 

Patrik,

See:
??

Cheers,

Mark


Re: COBOL in TK4-: Handling Signed Numbers

 

Send me your?code privately. You have my email.

Joe

On Thu, Jan 7, 2021 at 5:23 AM Patrik Schindler <poc@...> wrote:
Hello Joe,

Am 07.01.2021 um 11:15 schrieb Joe Monk <joemonk64@...>:

> Yep, it abended because I forgot something.
>
> A PIC X field is always left-justified. So, delete the filler, it is not necessary.

Still abends with the move.

FD? INPILE-FILE
? ? LABEL RECORD IS STANDARD
? ? RECORD CONTAINS 80 CHARACTERS
? ? BLOCK CONTAINS 0 RECORDS.
01? STATISTICS-INPILE-FORMAT.
? ? 02? MONTHNAME? ? ? ? PIC A(3).
? ? 02? FILLER? ? ? ? ? ?PIC X.
? ? 02? DAY-OF-MONTH? ? ?PIC 9(2).
? ? 02? FILLER? ? ? ? ? ?PIC X.
? ? 02? TIMESPEC.
? ? ? ? 03? T-HOUR? ? ? ?PIC 9(2).
? ? ? ? 03? FILLER? ? ? ?PIC X.
? ? ? ? 03? T-MINUTE? ? ?PIC 9(2).
? ? ? ? 03? FILLER? ? ? ?PIC X.
? ? ? ? 03? T-SECOND? ? ?PIC 9(2).
? ? ? ? 03? FILLER? ? ? ?PIC XX.
? ? 02? SCORE-TXT? ? ? ? PIC X(7).
? ? 02? SCORE-NUM-R? ? ? REDEFINES SCORE-TXT.
? ? ? ? 03? SCORE-NUM? ? PIC S9(5)V99.
? ? 02? FILLER? ? ? ? ? ?PIC X.
? ? 02? SCANTIME? ? ? ? ?PIC X(7).
? ? 02? FILLER? ? ? ? ? ?PIC X.
? ? 02? BYTES? ? ? ? ? ? PIC X(12).
? ? 02? FILLER? ? ? ? ? ?PIC X(35).

WORKING-STORAGE SECTION.
77? SCORE? ? ? ? ? ? ? ? PIC +++,+++.99 VALUE ZERO.

All other stuff is unchanged.

What could it be this time?

:wq! PoC







Re: REVIEW/RFE profile management change proposal

 

On 07/01/2021 09:38, Giuseppe Vitillaro wrote:
x3270 L:wotho4.ethz.ch:3270
Have to assume that Mageia v7.1 security settings is higher than yours as it complains about bad SSL certs.


No I do not have other than std settings as far as I know.

Vince


Re: COBOL in TK4-: Handling Signed Numbers

 

Hello Bert,

Am 07.01.2021 um 13:53 schrieb Bert Lindeman <bert.lindeman@...>:

Why not just use your input file and move the parts into a field with your cobol program so it represents a valid numeric field and THEN format is?
The input file (/var/log/mail.log with log output from Spamassassin) is preprocessed on Linux, because:
- it contains very long lines (up to 121 chars) and I don¡¯t know how to automatically copy records that big into a dataset from outside MVS,
- the lines aren¡¯t fixed format, so I parse them through Perl and a Regular Expression to extract the interesting values,
- it will not solve the sign issue, because the input line also has clear text numerics with a sign (if the mail been scanned is not spam, the score value becomes negative).

Thanks for your feedback but¡­ doesn¡¯t help. :-)

That is a procedure COBOL was written for in the first place ;-)
If that old COBOL struggles with decimal signs in the first place, I don¡¯t want to bother trying to chop dynamic lines as outlined above. :-)

:wq! PoC


Re: COBOL in TK4-: Handling Signed Numbers

 

Hi Patrik,

Why not just use your input file and move the parts into a field with your cobol program so it represents a valid numeric field and THEN format is?

That is a procedure COBOL was written for in the first place ;-)

Success.

Bert


Re: COBOL in TK4-: Handling Signed Numbers

 

Hello Rob,

Am 07.01.2021 um 12:59 schrieb Rob Prins via groups.io <rob.prins@...>:

Indeed, you get an 0C7 abend, because the field contains blanks and periods.
°Ú¡­±Õ
Take your advantage with this "solution".
Thank you for your explanation.

If I¡¯m removing the sign of my input, the data becomes largely invalid, and the complete project is futile.

Maybe I should abandon the idea of using ?stone age¡° COBOL for some summing and avg calculations from columns of mixed sign numbers?

:wq! PoC


Re: COBOL in TK4-: Handling Signed Numbers

 

1 ? ? ?? 10??????? 20??????? 30??????? 40????? 50
+---+----+----+----+----+----+----+----+----+¡ª¡ª+
Jan 07 10:02:29 ? 0005220 3.0 ? ? 823
Jan 07 10:09:45 ? 0002300 3.2???? 21572
Jan 07 10:10:50 ? 0000290 3.8???? 31572
Jan 07 10:12:27?? 0001540 4.1???? 89374

Hi Patrik,

Indeed, you get an 0C7 abend, because the field contains blanks and periods.
You have defined this field with PIC S9(5)V99. The V in the picture clause is an imaginary decimal point
and should not be present in the field.
The minus does not not make sense too.
Trying the field to move to a PIC +++,+++.99 wil result in a 0C7 because the field will be internally converted
to packed decimal and then will be edited in the PIC +++,+++.99 field.
The conversion into packed decimal wil result in a 0C7 abend (data exeption)
In the example of your input above the move will not abend. The blanks and periods should be removed.
Redefine the field does not convert your input.

Take your advantage with this "solution".

Cheers,
Rob


Re: COBOL in TK4-: Handling Signed Numbers

 

Hello Joe,

Am 07.01.2021 um 11:15 schrieb Joe Monk <joemonk64@...>:

Yep, it abended because I forgot something.

A PIC X field is always left-justified. So, delete the filler, it is not necessary.
Still abends with the move.

FD INPILE-FILE
LABEL RECORD IS STANDARD
RECORD CONTAINS 80 CHARACTERS
BLOCK CONTAINS 0 RECORDS.
01 STATISTICS-INPILE-FORMAT.
02 MONTHNAME PIC A(3).
02 FILLER PIC X.
02 DAY-OF-MONTH PIC 9(2).
02 FILLER PIC X.
02 TIMESPEC.
03 T-HOUR PIC 9(2).
03 FILLER PIC X.
03 T-MINUTE PIC 9(2).
03 FILLER PIC X.
03 T-SECOND PIC 9(2).
03 FILLER PIC XX.
02 SCORE-TXT PIC X(7).
02 SCORE-NUM-R REDEFINES SCORE-TXT.
03 SCORE-NUM PIC S9(5)V99.
02 FILLER PIC X.
02 SCANTIME PIC X(7).
02 FILLER PIC X.
02 BYTES PIC X(12).
02 FILLER PIC X(35).

WORKING-STORAGE SECTION.
77 SCORE PIC +++,+++.99 VALUE ZERO.

All other stuff is unchanged.

What could it be this time?

:wq! PoC


Re: COBOL in TK4-: Handling Signed Numbers

 

Hello ¸é±ð²Ô¨¦,

Am 07.01.2021 um 07:17 schrieb Rene BRANDT via groups.io <rbr146@...>:

when the S is used in the definition of a zone e.g. S999, at hexadecimal level the sign will be on the left digit of the last byte: e.g. F1F2F3 will give F1F2C3 (12C) if the zone contains a positive value of +123 and F1F2D3 (12L) if the value is -123. For the value zero the value will be C0 on the last byte for a positive value and will be represented by the sign { and D0 for a negative value and represented by the sign } when displaying the field.
Thanks for confirming and specifying more precisely my thoughts about the origins of the curly braces!

:wq! PoC


Re: COBOL in TK4-: Handling Signed Numbers

 

Yep, it abended?because I forgot something.

A PIC X field is always left-justified. So, delete the filler, it is not necessary.

Joe

On Thu, Jan 7, 2021 at 3:42 AM Patrik Schindler <poc@...> wrote:
Hello Joe,

Am 06.01.2021 um 22:50 schrieb Joe Monk <joemonk64@...>:

> "77? SCORE? ? ? ? ? ? ? ? PIC S9(6)V99
>? ? ? ? ? ? ? ? ? ? ? ? ? SIGN IS LEADING."
>
> This is not valid for MVT Cobol. Just take off the "sign is leading".

I did, as written.

> Now let me show you a trick:
>
> 02? SCORE-TXT? ? ? ? PIC X(10).
> 02 SCORE-NUM-R? ?REDEFINES SCORE-TXT.
>? ? ? 03? FILLER? ? ? ? ? ?PIC XX.
>? ? ? 03? SCORE-NUM PIC S9(6)v99.
>
> WORKING-STORAGE SECTION.
> 77? SCORE? ? ? ? ? ? ? ? PIC ++++,+++.99? ?VALUE ZERO.
>? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
> Now do: MOVE SCORE-NUM TO SCORE.

Q: Why do you use XX in the filler, instead of ?only¡° one?

Compiles fine, run abends.

10.33.13 JOB 1016? IEF403I RUNSTATS - STARTED - TIME=10.33.13
10.33.13 JOB 1016? IEF450I RUNSTATS EXECSTAT - ABEND S0C7 U0000 - TIME=10.33.13
10.33.13 JOB 1016? IEFACTRT - Stepname? Procstep? Program? ?Retcode
10.33.13 JOB 1016? RUNSTATS? ?EXECSTAT? ? ? ? ? ? SSTATS? ? AB S0C7
10.33.13 JOB 1016? IEF404I RUNSTATS - ENDED - TIME=10.33.13

If I comment the MOVE, it runs.

Current example input record(s), a little rearranged since I backed out my constant-width changes:
1? ? ? ?10? ? ? ? 20? ? ? ? 30? ? ? ? 40? ? ? ? 50
+---+----+----+----+----+----+----+----+----+¡ª¡ª+
Jan? 7 10:02:29? ?052.20? ? ?3.0? ? ? ? ? 823
Jan? 7 10:09:45? ?023.00? ? ?3.2? ? ? ? 21572
Jan? 7 10:10:50? ?002.90? ? ?3.8? ? ? ? 31572
Jan? 7 10:12:27? -015.40? ? ?4.1? ? ? ? 89374

Current file code:
FD? INPILE-FILE
? ? LABEL RECORD IS STANDARD
? ? RECORD CONTAINS 80 CHARACTERS
? ? BLOCK CONTAINS 0 RECORDS.
01? STATISTICS-INPILE-FORMAT.
? ? 02? MONTHNAME? ? ? ? PIC A(3).
? ? 02? FILLER? ? ? ? ? ?PIC X.
? ? 02? DAY-OF-MONTH? ? ?PIC 9(2).
? ? 02? FILLER? ? ? ? ? ?PIC X.
? ? 02? TIMESPEC.
? ? ? ? 03? T-HOUR? ? ? ?PIC 9(2).
? ? ? ? 03? FILLER? ? ? ?PIC X.
? ? ? ? 03? T-MINUTE? ? ?PIC 9(2).
? ? ? ? 03? FILLER? ? ? ?PIC X.
? ? ? ? 03? T-SECOND? ? ?PIC 9(2).
? ? ? ? 03? FILLER? ? ? ?PIC XX.
? ? 02? SCORE-TXT? ? ? ? PIC X(7).
? ? 02? SCORE-NUM-R? ? ? REDEFINES SCORE-TXT.
? ? ? ? 03? FILLER? ? ? ?PIC XX.
? ? ? ? 03? SCORE-NUM? ? PIC S9(3)V99.
? ? 02? FILLER? ? ? ? ? ?PIC X.
? ? 02? SCANTIME? ? ? ? ?PIC X(7).
? ? 02? FILLER? ? ? ? ? ?PIC X.
? ? 02? BYTES? ? ? ? ? ? PIC X(12).
? ? 02? FILLER? ? ? ? ? ?PIC X(35).

Current example output (without the move, that is):
20-Entry from Jan,? 7, 10h 02m 29s:
?has? ? ? ? ? 823 B, and took? ? ?3.0 s to scan.
?Score is 000000000
20-Entry from Jan,? 7, 10h 09m 45s:
?has? ? ? ? 21572 B, and took? ? ?3.2 s to scan.
?Score is 000000000
20-Entry from Jan,? 7, 10h 10m 50s:
?has? ? ? ? 31572 B, and took? ? ?3.8 s to scan.
?Score is 000000000
20-Entry from Jan,? 7, 10h 12m 27s:
?has? ? ? ? 89374 B, and took? ? ?4.1 s to scan.
?Score is 000000000

Recompile/run again with outputting SCORE-TXT:
20-Entry from Jan,? 7, 10h 02m 29s:
?has? ? ? ? ? 823 B, and took? ? ?3.0 s to scan.
?Score is? 052.20
20-Entry from Jan,? 7, 10h 09m 45s:
?has? ? ? ? 21572 B, and took? ? ?3.2 s to scan.
?Score is? 023.00
20-Entry from Jan,? 7, 10h 10m 50s:
?has? ? ? ? 31572 B, and took? ? ?3.8 s to scan.
?Score is? 002.90
20-Entry from Jan,? 7, 10h 12m 27s:
?has? ? ? ? 89374 B, and took? ? ?4.1 s to scan.
?Score is -015.40

So, the general field parsing apparently is still valid.

I really struggle to believe that a Business Language can¡¯t cope with signs, no matter how old. But obviously, I¡¯m missing something.

May I ask for another nudge?

:wq! PoC







Re: COBOL in TK4-: Handling Signed Numbers

 

Hello Jay,

Am 06.01.2021 um 23:37 schrieb Jay Moseley <JayMoseley@...>:

As others have said, the MVT COBOL compiler we have does not implement much in the way of sign handling for fields.
I understand. But ?not much¡° is more than ?nothing¡°, I suppose. And so far, I was not able to get a grip on what¡¯s going on.

A very long time ago I wrote some field pre/post processing routines for use with COBOL/CICS programs. One of these may help you with identifying the leading sign and converting the field to a packed field: jaymoseley.com/hercules/misc_pgms/miscpgms.htm
Thank you. Honestly, this wold open another pandora¡¯s box, so for now I¡¯ll put that aside.

:wq! PoC


Re: COBOL in TK4-: Handling Signed Numbers

 

Hello Joe,

Am 06.01.2021 um 22:50 schrieb Joe Monk <joemonk64@...>:

"77 SCORE PIC S9(6)V99
SIGN IS LEADING."

This is not valid for MVT Cobol. Just take off the "sign is leading".
I did, as written.

Now let me show you a trick:

02 SCORE-TXT PIC X(10).
02 SCORE-NUM-R REDEFINES SCORE-TXT.
03 FILLER PIC XX.
03 SCORE-NUM PIC S9(6)v99.

WORKING-STORAGE SECTION.
77 SCORE PIC ++++,+++.99 VALUE ZERO.

Now do: MOVE SCORE-NUM TO SCORE.
Q: Why do you use XX in the filler, instead of ?only¡° one?

Compiles fine, run abends.

10.33.13 JOB 1016 IEF403I RUNSTATS - STARTED - TIME=10.33.13
10.33.13 JOB 1016 IEF450I RUNSTATS EXECSTAT - ABEND S0C7 U0000 - TIME=10.33.13
10.33.13 JOB 1016 IEFACTRT - Stepname Procstep Program Retcode
10.33.13 JOB 1016 RUNSTATS EXECSTAT SSTATS AB S0C7
10.33.13 JOB 1016 IEF404I RUNSTATS - ENDED - TIME=10.33.13

If I comment the MOVE, it runs.

Current example input record(s), a little rearranged since I backed out my constant-width changes:
1 10 20 30 40 50
+---+----+----+----+----+----+----+----+----+¡ª¡ª+
Jan 7 10:02:29 052.20 3.0 823
Jan 7 10:09:45 023.00 3.2 21572
Jan 7 10:10:50 002.90 3.8 31572
Jan 7 10:12:27 -015.40 4.1 89374

Current file code:
FD INPILE-FILE
LABEL RECORD IS STANDARD
RECORD CONTAINS 80 CHARACTERS
BLOCK CONTAINS 0 RECORDS.
01 STATISTICS-INPILE-FORMAT.
02 MONTHNAME PIC A(3).
02 FILLER PIC X.
02 DAY-OF-MONTH PIC 9(2).
02 FILLER PIC X.
02 TIMESPEC.
03 T-HOUR PIC 9(2).
03 FILLER PIC X.
03 T-MINUTE PIC 9(2).
03 FILLER PIC X.
03 T-SECOND PIC 9(2).
03 FILLER PIC XX.
02 SCORE-TXT PIC X(7).
02 SCORE-NUM-R REDEFINES SCORE-TXT.
03 FILLER PIC XX.
03 SCORE-NUM PIC S9(3)V99.
02 FILLER PIC X.
02 SCANTIME PIC X(7).
02 FILLER PIC X.
02 BYTES PIC X(12).
02 FILLER PIC X(35).

Current example output (without the move, that is):
20-Entry from Jan, 7, 10h 02m 29s:
has 823 B, and took 3.0 s to scan.
Score is 000000000
20-Entry from Jan, 7, 10h 09m 45s:
has 21572 B, and took 3.2 s to scan.
Score is 000000000
20-Entry from Jan, 7, 10h 10m 50s:
has 31572 B, and took 3.8 s to scan.
Score is 000000000
20-Entry from Jan, 7, 10h 12m 27s:
has 89374 B, and took 4.1 s to scan.
Score is 000000000

Recompile/run again with outputting SCORE-TXT:
20-Entry from Jan, 7, 10h 02m 29s:
has 823 B, and took 3.0 s to scan.
Score is 052.20
20-Entry from Jan, 7, 10h 09m 45s:
has 21572 B, and took 3.2 s to scan.
Score is 023.00
20-Entry from Jan, 7, 10h 10m 50s:
has 31572 B, and took 3.8 s to scan.
Score is 002.90
20-Entry from Jan, 7, 10h 12m 27s:
has 89374 B, and took 4.1 s to scan.
Score is -015.40

So, the general field parsing apparently is still valid.

I really struggle to believe that a Business Language can¡¯t cope with signs, no matter how old. But obviously, I¡¯m missing something.

May I ask for another nudge?

:wq! PoC


Re: REVIEW/RFE profile management change proposal

 

On Tue, 5 Jan 2021, Vince Coen wrote:

As Linux x3270 has no response when connecting with Y::wotho4.ethz.ch:3270 Just retried using windows Vista nt3270

No connection , just times out.

Is it operational or suffering from CV-19 ?

Vince


On 05/01/2021 08:31, Juergen wrote:
Please specify SSL (V3) in your 3270 emulator to J?rgen's MVS. is nonetheless valid, the system accepts only secure connections. How those are to be specified depends on the tn3270 client being in use. You mention x3270, which requires a prefix of L: in the connect dialog box, so you would enter L:wotho4.ethz.ch:3270 to connect to the system.
As Juergen suggested, the command

x3270 L:wotho4.ethz.ch:3270

is working nicely under my Gentoo/Linux, from my network.


Peppe.


Re: COBOL in TK4-: Handling Signed Numbers

 

when the S is used in the definition of a zone e.g. S999, at hexadecimal level the sign will be on the left digit of the last byte: e.g. F1F2F3 will give F1F2C3 (12C) if the zone contains a positive value of +123 and F1F2D3 (12L) if the value is -123. For the value zero the value will be C0 on the last byte for a positive value and will be represented by the sign { and D0 for a negative value and represented by the sign } when displaying the field.

HTH
¸é±ð²Ô¨¦


Re: COBOL in TK4-: Handling Signed Numbers

 

Do your computations with pure numbers. Binary Comp -1 is fastest,
Packed Decimal Comp-3 is slower, Zoned Decimal Display is slowest, not
sure about Floating Point (Comp-2?).

When you want to view the data, move the number to a Display number
with appropriate edit masks (Z/9, $, signs, commas, decimal points)
then display the print record containing the display number.

On Wed, Jan 6, 2021 at 2:33 PM Patrik Schindler <poc@...> wrote:

Hello,

I have a sequential file with records being fed to it via external card reader. Works very well. I want to do some statistics with the data, so I want to use the (very old) COBOL compiler delivered with TK4-. I struggle with the format for getting the number parsed in the correct way in pos. 18 - 25.

Format:
* 1 10 20 30 40 50
* +---+----+----+----+----+----+----+----+----+----+
* Jan 6 17:03:30 0003.10 4.8 166039
* Jan 6 17:08:05 -0002.20 3.5 9007

(I have changed the preparation script on Linux to always do a zero-fill, if this might have been the culprit. Not, it isn¡¯t. Issue stays the same.)

This is my current format description:

01 STATISTICS-INPILE-FORMAT.
02 MONTHNAME PIC A(3).
02 FILLER PIC X.
02 DAY-OF-MONTH PIC 9(2).
02 FILLER PIC X.
02 TIMESPEC.
03 T-HOUR PIC 9(2).
03 FILLER PIC X.
03 T-MINUTE PIC 9(2).
03 FILLER PIC X.
03 T-SECOND PIC 9(2).
03 FILLER PIC XX.
02 SCORE-TXT PIC X(8).
02 FILLER PIC X.
02 SCANTIME PIC 9(6)V9.
02 FILLER PIC X.
02 BYTES PIC 9(12).
02 FILLER PIC X(34).

When running the program, all fields filled correctly. For statistics, I want to do some calculations. To accomplish this, I defined:

WORKING-STORAGE SECTION.
77 SCORE PIC S9(6)V99.

Later, in the PROCEDURE DIVISION, I do a MOVE:
MOVE SCORE-TXT TO SCORE.

By reading IBM GC28-6396-6 (ANSI COBOL from 1976), I maybe should rewrite:

77 SCORE PIC S9(6)V99
SIGN IS LEADING.

A Compilation yields:

IKF1037I-E SIGN INVALID IN DATA DESCRIPTION. SKIPPING TO NEXT CLAUSE.
IKF1037I-E IS INVALID IN DATA DESCRIPTION. SKIPPING TO NEXT CLAUSE.
IKF1037I-E LEADING INVALID IN DATA DESCRIPTION. SKIPPING TO NEXT CLAUSE.

The only halfway applying external help also uses the SIGN clause.


If I leave out the complete SIGN clause, compilation is (again) successful. A ?DISPLAY¡° (to check if the fields are parsed correctly) in the read-loop yields the following:

20-Entry from Jan, 6, 15h 51m 25s:
has 94652 B, and took 3.6 s to scan.
Score is 005.800{
20-Entry from Jan, 6, 17h 06m 38s:
has 19885 B, and took 7.2 s to scan.
Score is 001.800{
20-Entry from Jan, 6, 17h 08m 05s:
has 9007 B, and took 3.5 s to scan.
Score is 002.200{

- Why are there three digits after the decimal point?
- What is that { after the rightmost digit? This mysterious ?sign overpunch¡° I¡¯ve been reading about?
- Note that this character stays the same, no matter if the input number is positive or negative.

As soon as I want to use this variable for any calculation, the program abends with a runtime error.

If I define the score variable slightly different, I surprisingly get the right numbers!
77 SCORE PIC 9(8).

20-Entry from Jan, 6, 15h 51m 25s:
has 94652 B, and took 3.6 s to scan.
Score is 0005.80
20-Entry from Jan, 6, 17h 06m 38s:
has 19885 B, and took 7.2 s to scan.
Score is -0001.80
20-Entry from Jan, 6, 17h 08m 05s:
has 9007 B, and took 3.5 s to scan.
Score is -0002.20

I still can¡¯t calculate with that variable.

Somewhere I¡¯ve read that sometimes the sign is at the *end* of a number in the US. So I changed my export to create records like this:

1 10 20 30 40 50
+---+----+----+----+----+----+----+----+----+----+
Jan 6 19:57:49 12.40- 3.3 51490
Jan 6 20:03:36 72.60+ 3.2 890

Field definition:
02 SCORE PIC S9(7)V99.

Output:
20-Entry from Jan, 6, 20h 34m 34s:
has 0 10340 B, and took 7 s to scan.
Score is 17.70
20-Entry from Jan, 6, 20h 38m 55s:
has 9 8 B, and took 9 s to scan.
Score is 52.00

No Sign, but garbled numbers (scan time, bytes). Is a sign only showing up when the output number is edited?

For a test, I¡¯m switching back to all definitions to be type X.

01 STATISTICS-INPILE-FORMAT.
02 MONTHNAME PIC A(3).
02 FILLER PIC X.
02 DAY-OF-MONTH PIC 9(2).
02 FILLER PIC X.
02 TIMESPEC.
03 T-HOUR PIC 9(2).
03 FILLER PIC X.
03 T-MINUTE PIC 9(2).
03 FILLER PIC X.
03 T-SECOND PIC 9(2).
03 FILLER PIC X.
02 SCORE-TXT PIC X(10).
02 FILLER PIC X.
02 SCANTIME PIC X(8).
02 FILLER PIC X.
02 BYTES PIC X(12).
02 FILLER PIC X(32).

and

WORKING-STORAGE SECTION.
77 SCORE PIC S9(6)V99 VALUE ZERO
USAGE IS DISPLAY.

Compiles well, move works, output is:

20-Entry from Jan, 6, 20h 27m 43s:
has 29245 B, and took 5.7 s to scan.
Score is 0.8000{
20-Entry from Jan, 6, 20h 34m 34s:
has 1034035 B, and took 7.0 s to scan.
Score is 17.7000{
20-Entry from Jan, 6, 20h 38m 55s:
has 838 B, and took 9.9 s to scan.
Score is 52.0000{

For whatever reason I now have four digits after the decimal point, and again the curly brace. Of course, I still can¡¯t do calculations with this number: Runtime Error.

In business (obviously the B in COBOL), negative values are common. But since the TK4- MVT compiler seems to even predate the document mentioned above, I¡¯m puzzled how to handle negative numbers.

May I ask kindly for a nudge in the right direction?

I have a complete JCL ready for uploading via external card reader into the HERC03 account, deleting possible leftovers from a previous run, and (re)creating all files as necessary, so potential helpers will have it more easy to actually help. Available on request.

Thank you.

:wq! PoC





--
Mike A Schwab, Springfield IL USA
Where do Forest Rangers go to get away from it all?


Re: COBOL in TK4-: Handling Signed Numbers

 

it is still not necessary to do any conversions ?on numbers from zoned decimal to use them in arithmetic in cobol.

You can, but its not necessary.

joe

On Wed, Jan 6, 2021 at 5:36 PM Vince Coen <vbcoen@...> wrote:
On 06/01/2021 23:11, cjar1950 via wrote:
> Mark et al,
>
> This is probably what I recall.
>
> I started on ICL 1900 cobol in about 1970, which only had DISPLAY and
> COMPUTATIONAL fields. I then moved via ICL 2900 series which had COMP-3,
> to IBM 370.
>
> We did a lot of conversions from ICL to IBM, so for efficiency, we also
> only used COMP-3 for calculations (of the appropriate length).
>
> Chris


Just had a look at my Cobol cross referencing program that work with
ANSI Cobol as found in MVS 3.8J as in Turnkey-4.

That uses comp?? with sign i.e., PIC S9(6)? COMP.

If you want to look at it you can find it at :



and the archive file is? MVS3.8J-cobxref.zip

Contained within is :

??Length?? Method??? Size? Cmpr??? Date??? Time?? CRC-32?? Name
--------? ------? ------- ---- ---------- ----- --------? ----
????? 803? Defl:X????? 450? 44% 2015-12-23 18:28 1098e122
compile-cobxref.jcl
??? 63188? Defl:X??? 15780? 75% 2015-12-23 18:34 cbc20304
mak-xref-pds-0.37.jcl
???? 2126? Defl:X???? 1104? 48% 2015-12-23 19:27 8983b122? Read.me
???? 1140? Defl:X????? 420? 63% 2015-12-23 18:31 1d9bd66f run-cobxref.jcl
--------????????? -------? ---??????????????????????????? -------
??? 67257??????????? 17754? 74%??????????????????????????? 4 files

The one you want is mak-xref-pds-0.37.jcl

It is the source code along with the required JCL (MVS 3.8J).


If you wish to use it you need to change lines 1 & 3 as well as the DSN
statements in lines 5,10,11? to match your user name etc, i.e., :-


//JCL001??? JOB (VBC001),VBCOEN,
//* change next line to match your needs
//???????????? USER=VBCOEN,PASSWORD=password,
//???????????? CLASS=A,MSGCLASS=A,MSGLEVEL=(1,1),REGION=64K
/*JOBPARM ROOM=1001
//PDSCREAT EXEC PGM=IEBUPDTE
//* ,PARM=NEW
//SYSPRINT DD SYSOUT=A
//*? change next 2 lines to match your needs
//SYSUT1?? DD DSN=VBCOEN.TEST.COBOL,DISP=SHR
//SYSUT2?? DD DSN=VBCOEN.TEST.COBOL,DISP=SHR
//**??????????? DISP=(NEW,KEEP,CATLG),
//*??????????? DISP=(,CATLG),
//*??????????? UNIT=3350,
//*??????????? SPACE=(CYL,(1,5,10)),
//*??????????? DCB=(RECFM=FB,LRECL=80,BLKSIZE=19040)
//*
//*? use next 2 ./ lines 1st time run and omit the two after
//*? //SYSIN? DD *
//*
//*./ ADD NAME=COBXREF,SEQFLD=016,LIST=ALL
//*./ NUMBER NEW1=100,INCR=100
//SYSIN??? DD *
./ REPL NAME=COBXREF,LIST=ALL,SEQFLD=016
./ NUMBER NEW1=100,INCR=100
.

The above JCL hopefully is easy to understand.

Vince

Started IBM 1961 (1401 and 7094), then 360, ICL 1900, IBM 370, ICL 29/39
series developing VME and dump cracking) and COBOL systems for various
ICL customers etc.

The above program is the only one I have on my systems that is not
source restricted.








Re: COBOL in TK4-: Handling Signed Numbers

 

On 06/01/2021 23:11, cjar1950 via groups.io wrote:
Mark et al,

This is probably what I recall.

I started on ICL 1900 cobol in about 1970, which only had DISPLAY and
COMPUTATIONAL fields. I then moved via ICL 2900 series which had COMP-3,
to IBM 370.

We did a lot of conversions from ICL to IBM, so for efficiency, we also
only used COMP-3 for calculations (of the appropriate length).

Chris

Just had a look at my Cobol cross referencing program that work with ANSI Cobol as found in MVS 3.8J as in Turnkey-4.

That uses comp?? with sign i.e., PIC S9(6)? COMP.

If you want to look at it you can find it at :



and the archive file is? MVS3.8J-cobxref.zip

Contained within is :

?Length?? Method??? Size? Cmpr??? Date??? Time?? CRC-32?? Name
--------? ------? ------- ---- ---------- ----- --------? ----
???? 803? Defl:X????? 450? 44% 2015-12-23 18:28 1098e122 compile-cobxref.jcl
?? 63188? Defl:X??? 15780? 75% 2015-12-23 18:34 cbc20304 mak-xref-pds-0.37.jcl
??? 2126? Defl:X???? 1104? 48% 2015-12-23 19:27 8983b122? Read.me
??? 1140? Defl:X????? 420? 63% 2015-12-23 18:31 1d9bd66f run-cobxref.jcl
--------????????? -------? ---??????????????????????????? -------
?? 67257??????????? 17754? 74%??????????????????????????? 4 files

The one you want is mak-xref-pds-0.37.jcl

It is the source code along with the required JCL (MVS 3.8J).


If you wish to use it you need to change lines 1 & 3 as well as the DSN statements in lines 5,10,11? to match your user name etc, i.e., :-


//JCL001??? JOB (VBC001),VBCOEN,
//* change next line to match your needs
//???????????? USER=VBCOEN,PASSWORD=password,
//???????????? CLASS=A,MSGCLASS=A,MSGLEVEL=(1,1),REGION=64K
/*JOBPARM ROOM=1001
//PDSCREAT EXEC PGM=IEBUPDTE
//* ,PARM=NEW
//SYSPRINT DD SYSOUT=A
//*? change next 2 lines to match your needs
//SYSUT1?? DD DSN=VBCOEN.TEST.COBOL,DISP=SHR
//SYSUT2?? DD DSN=VBCOEN.TEST.COBOL,DISP=SHR
//**??????????? DISP=(NEW,KEEP,CATLG),
//*??????????? DISP=(,CATLG),
//*??????????? UNIT=3350,
//*??????????? SPACE=(CYL,(1,5,10)),
//*??????????? DCB=(RECFM=FB,LRECL=80,BLKSIZE=19040)
//*
//*? use next 2 ./ lines 1st time run and omit the two after
//*? //SYSIN? DD *
//*
//*./ ADD NAME=COBXREF,SEQFLD=016,LIST=ALL
//*./ NUMBER NEW1=100,INCR=100
//SYSIN??? DD *
./ REPL NAME=COBXREF,LIST=ALL,SEQFLD=016
./ NUMBER NEW1=100,INCR=100
.

The above JCL hopefully is easy to understand.

Vince

Started IBM 1961 (1401 and 7094), then 360, ICL 1900, IBM 370, ICL 29/39 series developing VME and dump cracking) and COBOL systems for various ICL customers etc.

The above program is the only one I have on my systems that is not source restricted.