Keyboard Shortcuts
Likes
- H390-MVS
- Messages
Search
Re: REVIEW/RFE profile management change proposal
Some one gave me this and it works :
toggle quoted message
Show quoted text
x3270 -noverifycert Y:wotho4.ethz.ch:3270 Vince On 09/01/2021 09:29, Giuseppe Vitillaro wrote:
On Fri, 8 Jan 2021, Giuseppe Vitillaro wrote:On Thu, 7 Jan 2021, Vince Coen wrote:By the way, with the openssl setup I've on my Raspbian,On 07/01/2021 09:38, Giuseppe Vitillaro wrote:Vince, try to use:x3270 L:wotho4.ethz.ch:3270to assume that Mageia v7.1 security settings is higher than yours as it complains about bad SSL certs. --
- IMPORTANT ¨C This email and the information in it may be confidential, legally privileged and/or protected by law. It is intended solely for the use of the person to whom it is addressed. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Please also delete all copies of this email & any attachments from your systems. If this is an encrypted email, it is your responsibility to maintain the 1024 byte key system even for one-use keys. Once mail has been sent the sending key is not kept and therefore a replacement mail cannot be resent. We cannot guarantee the security or confidentiality of non encrypted email communications. We do not accept any liability for losses or damages that you may suffer as a result of your receipt of this email including but not limited to computer service or system failure, access delays or interruption, data non-delivery or mis-delivery, computer viruses or other harmful components. Copyright in this email and any attachments belongs to Applewood Computers. Should you communicate with anyone at Applewood Computers by email, you consent to us monitoring and reading any such correspondence. Nothing in this email shall be taken or read as suggesting, proposing or relating to any agreement concerted practice or other practice that could infringe UK competition legislation (unless it is against Security requirements). This Email and its attachments (if any) are scanned for virii using Clamd and ClamAV 0.102.4 or later (Linux x64) and others on IBM mainframe systems. Dykegrove Limited T/A Applewood Computers is a company registered in England (no. 01681349) whose registered office is at Applewood House, 17 Stag Green Avenue, Hatfield, Hertfordshire, AL9 5EB |
Re: REVIEW/RFE profile management change proposal
On Fri, 8 Jan 2021, Giuseppe Vitillaro wrote:
On Thu, 7 Jan 2021, Vince Coen wrote:By the way, with the openssl setup I've on my Raspbian,On 07/01/2021 09:38, Giuseppe Vitillaro wrote:Vince, try to use:x3270 L:wotho4.ethz.ch:3270to assume that Mageia v7.1 security settings is higher than yours as it complains about bad SSL certs. little bit more updated of my Gentoo, at home, another problem show up: SSL:SSL_connect failed: reason(0) which may also be your problem. The error, just a guess, probably come from different openssl defaults, defined, on my Raspbian and Ubuntu, both Debian based, in /etc/ssl/openssl.cnf: [system_default_sect] MinProtocol = TLSv1.2 CipherString = DEFAULT@SECLEVEL=2 For a reason I don't clearly understand, with Juergen TK4- host, x3270 (3.6g4) fail with the above error at connection time, it doesn't with my personal 3270 SSL hosts (which probably live in a different SSL environment). It is not easy to change the default configuration at system level, too much things running, in my system, to be sure it is going to work for all combinations. But, it is possible to create a new configuration file, let say /etc/ssl/opensslv1.cnf, a copy of the defaults, where this stanza is modified in [system_default_sect] MinProtocol = TLSv1 CipherString = DEFAULT@SECLEVEL=1 which, in my environment, allow this command: OPENSSL_CONF=/etc/ssl/opensslv1.cnf x3270 L:wotho4.ethz.ch:3270 to open a working connection with Juergen TK4- host, without changing the defaults at system level. To understand the source of the trouble, I guess, Juergen should post his SSL TK4- configuration, the error depends from the SSL configuration of both endpoints, I guess, client and server. Hope this help to understand and solve the problem in the Linux environment. Peppe. P.S. Am I alone thinking SSL is looking every day more like a trouble rather than a solution? ;-) |
Re: COBOL in TK4-: Handling Signed Numbers
Hello Ivo,
Am 08.01.2021 um 01:56 schrieb Ivo Veiga <ivo.trindade@...>: It seems that there is a confusion with the input and the number internal representation. Please consider my comments, code and jcl below.Thank you very very much for your input. While I have not considered your code in great detail yet, I see that you completely assemble the numbers from their textual representation. That¡¯s what I also did, but I still can¡¯t use the resulting numbers for arithmetics: The program crashes. I¡¯m fed up for now, and motivation has reached zero. Maybe I try another time. :wq! PoC |
Re: COBOL in TK4-: Handling Signed Numbers
Hello Ed,
Am 07.01.2021 um 19:05 schrieb Ed Liss <egliss4024@...>: The COBOL compiler with tk? is older than 1976. Yes it is ANSI COBOL but it dates back to MVT days (1960's).I did not find an older documentation. Even contains only newer stuff, apparently. 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 -.That¡¯s what I did, but I still can¡¯t use the resulting numbers for arithmetics: The program crashes. I¡¯m fed up for now, and motivation has reached zero. Maybe I try another time. Thanks also to Joe and others for trying to help! :wq! PoC |
Re: REVIEW/RFE profile management change proposal
On Thu, 7 Jan 2021, Vince Coen wrote:
On 07/01/2021 09:38, Giuseppe Vitillaro wrote:Vince, try to use:x3270 L:wotho4.ethz.ch:3270to assume that Mageia v7.1 security settings is higher than yours as it complains about bad SSL certs. x3270.verifyHostCert: false in your .x3270pro profile. Without I get: "SSL:Host certificate verification failed: self signed certificate (18) using x3270 against the Juergen online TK4-. I'm running x3270 v3.6ga8, up to version 3.5, from my logbook, x3270 didn't verified for self signed certficates. I bet Juergen, as I do, use a self signed SSL certificate, the SSL error come from the fact the certificate he is using for his TK4- is not signed from any recognized public certification authority, not because an SSL version mismatch. Peppe. |
Re: COBOL in TK4-: Handling Signed Numbers
Liebe Patrik,.
It seems that there is a confusion with the input and the number internal representation.? Please consider my comments, code and jcl below. With the code, by reading some records you've shared, read from the sysin, I got the following output: Jan? 7 10H02M29S: HAS? ? ? ? ? ? ?823 B, AND TOOK? ? ? ?3.0 s, to scan. Score is? ?52.20+
Jan? 7 10H09M45S: HAS? ? ? ? ? 21,572 B, AND TOOK? ? ? ?3.2 s, to scan. Score is? ?23.00+
Jan? 7 10H10M50S: HAS? ? ? ? ? 31,572 B, AND TOOK? ? ? ?3.8 s, to scan. Score is? ? 2.90+
Jan? 7 10H12M27S: HAS? ? ? ? ? 89,374 B, AND TOOK? ? ? ?4.1 s, to scan. Score is? ?15.40-
The JCL I ran was: //COB002JC? JOB 1,NOTIFY=&SYSUID
//*/
//COBRUN? EXEC IGYWCL
//COBOL.SYSIN? DD DSN=&SYSUID..SOURCE(COB002),DISP=SHR
//LKED.SYSLMOD DD DSN=&SYSUID..LOAD(COB002),DISP=SHR
//*/
// IF RC = 0 THEN
//*/
//RUN? ? ?EXEC PGM=COB002
//STEPLIB? ?DD DSN=&SYSUID..LOAD,DISP=SHR
//PRTDONE? ?DD SYSOUT=*,OUTLIM=15000
//PRTLINE? ?DD SYSOUT=*,OUTLIM=15000
//SYSOUT? ? DD SYSOUT=*,OUTLIM=15000
//CEEDUMP? ?DD DUMMY
//SYSUDUMP? DD DUMMY
//SYSIN? ? ?DD *
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
//*/
// ELSE
// ENDIF
And finally the source code: ? ? ? ?IDENTIFICATION DIVISION.
? ? ? ?PROGRAM-ID.? ? COB002.
? ? ? ?AUTHOR.? ? ? ? Z01987 IVO VEIGA.
? ? ? *
? ? ? ?ENVIRONMENT DIVISION.
? ? ? *
? ? ? ?INPUT-OUTPUT SECTION.
? ? ? ?FILE-CONTROL.
? ? ? ? ? ?SELECT INP-RECS ASSIGN TO SYSIN.
? ? ? ? ? ?SELECT PRT-LINE ASSIGN TO PRTLINE.
? ? ? ? ? ?SELECT PRT-DONE ASSIGN TO PRTDONE.
?
? ? ? ?DATA DIVISION.
? ? ? ?FILE SECTION.
?
? ? ? ?FD? INP-RECS RECORD CONTAINS 80 CHARACTERS RECORDING MODE F.
? ? ? ?01? INP-REC? ? ? ? ?PIC X(80) VALUE SPACES.
?
? ? ? ?FD? PRT-LINE RECORD CONTAINS 132 CHARACTERS RECORDING MODE F.
? ? ? ?01? PRT-REC.
? ? ? ? ? ?05 PRT01-REC? ? ?PIC X(132) VALUE SPACES.
? ? ? ? ? ?
?
? ? ? ?FD? PRT-DONE RECORD CONTAINS 80 CHARACTERS RECORDING MODE F.
? ? ? ?01? PRT-REC-DONE.
? ? ? ? ? ?05? PRT-DATE? ? ?PIC X(8)? VALUE SPACES.
? ? ? ? ? ?05? FILLER? ? ? ?PIC X(1)? VALUE SPACES.
? ? ? ? ? ?05? PRT-TIME? ? ?PIC X(4)? VALUE SPACES.
? ? ? ? ? ?05? FILLER? ? ? ?PIC X(2)? VALUE SPACES.
? ? ? ? ? ?05? PRT-COMMENT? PIC X(27) VALUE SPACES.
? ? ? ? ? ?05? FILLER? ? ? ?PIC X(2)? VALUE SPACES.
? ? ? ? ? ?05? PRT-MY-NAME? PIC X(36) VALUE SPACES.
?
? ? ? ?WORKING-STORAGE SECTION.
?
? ? ? ?01? FILLER.
?
? ? ? ? ? ?05? STATISTICS-INPILE-FORMAT.
? ? ? ? ? ? ? ?10? MONTHNAME? ? ? ? PIC X(3).
? ? ? ? ? ? ? ?10? FILLER? ? ? ? ? ?PIC X.
? ? ? * DAY OF MONTH CHANGED FROM 9(2) TO X(2) AS THE FIRST BYTE MIGHT?
? ? ? * HAVE SPACES X'40'? ? ? ??
? ? ? ? ? ? ? ?10? DAY-OF-MONTH? ? ?PIC X(2).
? ? ? ? ? ? ? ?10? FILLER? ? ? ? ? ?PIC X.
? ? ? ? ? ? ? ?10? TIMESPEC.
? ? ? ? ? ? ? ? ? ?15? T-HOUR? ? ? ?PIC 9(2).
? ? ? ? ? ? ? ? ? ?15? FILLER? ? ? ?PIC X.
? ? ? ? ? ? ? ? ? ?15? T-MINUTE? ? ?PIC 9(2).
? ? ? ? ? ? ? ? ? ?15? FILLER? ? ? ?PIC X.
? ? ? ? ? ? ? ? ? ?15? T-SECOND? ? ?PIC 9(2).
? ? ? ? ? ? ? ?10? FILLER? ? ? ? ? ?PIC X(2).
? ? ? ? ? ? ? ?10? SCORE-SIGN? ? ? ?PIC X(1).
? ? ? ? ? ? ? ? ? ?88 SCORE-POSITIVE VALUE " " "+".
? ? ? ? ? ? ? ? ? ?88 SCORE-NEGATIVE VALUE "-".
? ? ? ? ? ? ? ?10? SCORE-TXT.
? ? ? ? ? ? ? ? ? ?15? SCORE-INT? ? PIC 9(3).
? ? ? ? ? ? ? ? ? ?15? SCORE-DECPT? PIC X(1).
? ? ? ? ? ? ? ? ? ?15? SCORE-DEC? ? PIC 9(2).
? ? ? ? ? ? ? ?10? FILLER? ? ? ? ? ?PIC X.
? ? ? ? ? ? ? ?10? SCANTIME.
? ? ? ? ? ? ? ? ? ?15? SCANTIME-INT PIC X(5).
? ? ? ? ? ? ? ? ? ?15? SCANTIME-DCPT PIC X(1).
? ? ? ? ? ? ? ? ? ?15? SCANTIME-DEC PIC X(1).
? ? ? ? ? ? ? ?10? FILLER? ? ? ? ? ?PIC X.
? ? ? ? ? ? ? ?10? BYTES? ? ? ? ? ? PIC X(12).
? ? ? ? ? ? ? ?10? FILLER? ? ? ? ? ?PIC X(36).
?
? ? ? ? ? ?05? SCORE-Z.
? ? ? ? ? ? ? ?10? SCORE-INT-Z? ? ? PIC 9(3).
? ? ? ? ? ? ? ?10? SCORE-DEC-Z? ? ? PIC 9(2).
?
? ? ? ? ? ?05? SCORE-ZR REDEFINES SCORE-Z PIC S9(3)V9(2).
?
? ? ? ? ? ?05? SCORE-P PIC S9(3)V9(2) COMP-3.
?
? ? ? ? ? ?05? SCANTIME-Z.
? ? ? ? ? ? ? ?10? SCANTIME-INT-Z? ?PIC 9(5).
? ? ? ? ? ? ? ?10? SCANTIME-DEC-Z? ?PIC 9(1).
?
? ? ? ? ? ?05? SCANTIME-ZR REDEFINES SCANTIME-Z PIC S9(5)V9(1).
?
? ? ? ? ? ?05? SCANTIME-P PIC S9(6)V9(1) COMP-3.?
?
? ? ? ? ? ?05? WK02-OUTPUT-LINE.
? ? ? ? ? ? ? ?10? PRT01-MONTH PIC X(3) VALUE SPACES.
? ? ? ? ? ? ? ?10? FILLER? ? ? PIC X(1) VALUE SPACES.
? ? ? ? ? ? ? ?10? PRT01-DAY? ?PIC X(2) VALUE SPACES.
? ? ? ? ? ? ? ?10? FILLER? ? ? PIC X(1) VALUE SPACES.
? ? ? ? ? ? ? ?10? PRT01-HR? ? PIC X(2) VALUE SPACES.
? ? ? ? ? ? ? ?10? FILLER? ? ? PIC X(1) VALUE "H".
? ? ? ? ? ? ? ?10? PRT01-MIN? ?PIC X(2) VALUE SPACES.
? ? ? ? ? ? ? ? 10? FILLER? ? ? PIC X(1) VALUE "M".
? ? ? ? ? ? ? ?10? PRT01-SEC? ?PIC X(2) VALUE SPACES.
? ? ? ? ? ? ? ?10? FILLER? ? ? PIC X(3) VALUE "S: ".
? ? ? ? ? ? ? ?10? FILLER? ? ? PIC X(4) VALUE "HAS ".
? ? ? ? ? ? ? ?10? PRT01-SIZE? PIC ZZZ,ZZZ,ZZZ,ZZZ VALUE ZEROES.
? ? ? ? ? ? ? ?10? FILLER? ? ? PIC X(13) VALUE " B, AND TOOK ".
? ? ? ? ? ? ? ?10? PRT01-SCANT PIC ZZZ,ZZZ.Z VALUE ZEROES.
? ? ? ? ? ? ? ?10? PRT01-WEIRD PIC X(23) VALUE SPACES.
? ? ? ? ? ? ? ?10? PRT01-SCR? ?PIC ZZZ.ZZ+ VALUE ZEROES.
? ? ? ? ? ? ? ?10? FILLER? ? ? PIC X(43) VALUE SPACES.
?
? ? ? ? ? ?05? PGM-COUNT? ? ? ? PIC 9(05).
?
? ? ? ? ? ?05? YYYYMMDD? ? ? ? ?PIC 9(8).
?
? ? ? ? ? ?05? INTEGER-FORM? ? ?PIC S9(9).
?
? ? ? ? ? ?05? REFMOD-TIME-ITEM PIC X(8).
?
? ? ? ? ? ?05? WK01-END-OF-FILE PIC X(1) VALUE "N".
? ? ? ? ? ? ? ?88 END-OF-INPUT VALUE "Y".
?
? ? ? ****
? ? ? *? ? ? ? ? ? ? ? ? PROCEDURE DIVISION? ? ? ? ? ? ? ? ? ? ? ? ? *
? ? ? ****
? ? ? ?PROCEDURE DIVISION.
? ? ? *
? ? ? ?A000-START.
? ? ? ? ? ?OPEN INPUT INP-RECS.
? ? ? ? ? ?OPEN OUTPUT PRT-LINE.
? ? ? ? ? ?MOVE " s, to scan. Score is? " TO PRT01-WEIRD.
? ? ? ? ? ?PERFORM READ-INP THRU READ-INP-END.
? ? ? ? ? ?PERFORM P000-MAIN THRU P000-MAIN-END
? ? ? ? ? ? ?UNTIL END-OF-INPUT.
? ? ? ? ? ?PERFORM A000-DONE.
? ? ? ? ? ?CLOSE? ?PRT-LINE.
? ? ? ? ? ?STOP RUN.
? ? ? *
? ? ? ?READ-INP.
? ? ? ? ? ?READ INP-RECS? INTO STATISTICS-INPILE-FORMAT
? ? ? ? ? ? ?AT END MOVE "Y" TO WK01-END-OF-FILE.
? ? ? ?READ-INP-END.
? ? ? *
? ? ? ?P000-MAIN.
? ? ? ? ? ?ADD 1 TO PGM-COUNT.
? ? ? ? ? ?MOVE MONTHNAME TO PRT01-MONTH.
? ? ? ? ? ?MOVE DAY-OF-MONTH TO PRT01-DAY.
? ? ? ? ? ?MOVE T-HOUR TO PRT01-HR.
? ? ? ? ? ?MOVE T-MINUTE TO PRT01-MIN.
? ? ? ? ? ?MOVE T-SECOND TO PRT01-SEC.
? ? ? ? ? ?MOVE SCORE-INT TO SCORE-INT-Z.
? ? ? ? ? ?MOVE SCORE-DEC TO SCORE-DEC-Z.
? ? ? ? ? ?MOVE SCORE-ZR TO SCORE-P.
? ? ? ? ? ?IF SCORE-NEGATIVE
? ? ? ? ? ? ? SUBTRACT SCORE-P FROM ZERO GIVING SCORE-P.?
? ? ? ? ? ?MOVE SCORE-P TO PRT01-SCR.? ?
? ? ? ? ? ?MOVE SCANTIME-INT TO SCANTIME-INT-Z.
? ? ? ? ? ?MOVE SCANTIME-DEC TO SCANTIME-DEC-Z.
? ? ? ? ? ?MOVE SCANTIME-ZR? TO SCANTIME-P.
? ? ? ? ? ?MOVE SCANTIME-P TO PRT01-SCANT.
? ? ? ? ? ?MOVE BYTES TO PRT01-SIZE.? ? ??
? ? ? ? ? ?WRITE PRT-REC FROM WK02-OUTPUT-LINE.
? ? ? *? ??
? ? ? ? ? ?
? ? ? ? ? ?PERFORM READ-INP THRU READ-INP-END.
? ? ? ?P000-MAIN-END.? ?
? ? ? *
? ? ? ?A000-DONE.
? ? ? ? ? ?OPEN OUTPUT PRT-DONE.
? ? ? ? ? ?MOVE SPACES TO PRT-REC-DONE.
? ? ? ? ? ?ACCEPT REFMOD-TIME-ITEM FROM TIME.
? ? ? ? ? ?MOVE FUNCTION CURRENT-DATE(1:8) TO YYYYMMDD.
? ? ? ? ? ?MOVE YYYYMMDD? ? ? ? ?TO PRT-DATE.
? ? ? ? ? ?MOVE REFMOD-TIME-ITEM (1:4) TO PRT-TIME.
? ? ? ? ? ?MOVE "z/OS COBOL TEST PROGRAM" TO PRT-COMMENT.
? ? ? ? ? ?WRITE PRT-REC-DONE.
? ? ? ? ? ?CLOSE PRT-DONE.
? ? ? ? ? ?CLOSE INP-RECS.
(end of the code in the CLOSE INP-RECS line above) The way you defined the input record does not match the input.? The Picture S9(3)V99 for a zoned decimal would define a storage with 5 bytes, with no space for commas or any decimal point and not for a sign as well. For instance '45567' would be X'F4F5F5F6F7'.? But if your input record has for instance "+015.14", we have 7 bytes that will not correspond to a numeric decimal, either packed or zoned. It will be instead X'4EF0F1F54BF1F4'.? So, as I am quite rusted with COBOL, my code is probably not the best example.? I took some guidance from the Stack Overflow link you've provided (I did not care about validating the input records, though) and then added some code to try as much as possible to make it self explanatory to you. Yet, although I have used my Master the Mainframe account and all zOS environment, I guess I sticked to the old coding, so I guess it will also be applicable to your tk4 (almost sure). Please forgive the PRT01-WEIRD constant that I had to create, because it was not compiling due to some character that did not work in the working storage section, but did in the procedure division.?? Mit freudlichen Gr¨¹?e aus Brazilien, Ivo |
NJE38 V2.2
NJE38 version 2.2 is now available.? This version now contains the following new features: 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.
|
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
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, |
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
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.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.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 Ren¨¦,
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, |
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.htmThank you. Honestly, this wold open another pandora¡¯s box, so for now I¡¯ll put that aside. :wq! PoC |