Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
- H390-MVS
- Messages
Search
Re: Hercules Beginner Needs Some Help
On Sun, Apr 7, 2024 at 08:13 PM, Craig Kaercher wrote:
I am not new to mainframes, but am new to Hercules, and in getting started I have some questions:Hello Craig, Welcome to the community! It would help if you could tell us which MVS system you are running under Hercules. I know of four: Jay Moseley system, MVS/CE, TK4- and TK5. Is it one of those? or an other one? Cheers, Rene FERLAND, Montreal |
Hercules Beginner Needs Some Help
Craig Kaercher
Hello All,
I am not new to mainframes, but am new to Hercules, and in getting started I have some questions: 1.? Why is there no system libraries?? No SYS4.* or SYS2.*.? Was that supposed to come with the install.? If not, where can I get them? 2.? The same question applies to the compile/link utilities.? Should they be there and if not where can I get them? 3.? For jcl that involves no tapes,, super simple, what should the CLASS and MSGCLASS be?? I would normally say CLASS=X,MSGCLASS=Y.? Is it different on Hercules?? I am trying to run a compile which fails on a JCL error, but it won't give me what the error is.? I have tried JCLCHK but that is not available. I am probably going to have more questions as I get started, but I just want to get my first compile/link/execute working.? Thanks again for all the help. Craig |
Re: COBOL getting system time and/or date
Page 45 ,,,
?(The use of CURRENT-DATE, TIME-OF-DAY, and RETURN-CODE is explained in, the Programmer's.Guide.) Page 3 of 508 in Preface of the same doco ...
IBM as Full American National Standard COBOL Compiler and Library, Version 2, programmerws Guide. Order No. GC28-6399 Pretty sure it can be found in same folder in bitsavers too, i.e. try http://www.bitsavers.org/pdf/ibm/360/os/cobol/GC28-6399-2_COBOL_Compiler_and_Library_Version_2_Programmers_Guide_Jul72.pdf
?
John. Sent:?Sunday, April 07, 2024 at 7:03 PM
From:?"Joe Monk via groups.io" <joemonk64@...> To:[email protected] Subject:?Re: [H390-MVS] COBOL getting system time and/or date So in your code, in working-storage:
?
?
01 ?CURR-DATE.
? ? ? 05 ?CURR-DATE-SYS ? ? ? ? ? ? ? ? ? ? ? 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? ? ? ? ? ? ? ? ? ? ? PIC X(02).
? ? ? ? ? ? 10 ?FILLER ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? PIC X VALUE ":".
? ? ? ? ? ? 10 ?CURR-TIME-FMT-MM ? ? ? ? ? ? ? ? ? ? ?PIC X(02).
? ? ? ? ? ? 10 ?FILLER ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? PIC X VALUE ":".
? ? ? ? ? ? 10 ?CURR-TIME-FMT-SS ? ? ? ? ? ? ? ? ? ? ? ?PIC X(02).
?
And at the very beginning of your code:
?
MOVE CURRENT-DATE TO CURR-DATE-SYS.
MOVE TIME-OF-DAY ? ? ?TO CURR-TIME-SYS.
MOVE CURR-TIME-HH ? TO CURR-TIME-FMT-HH.
MOVE CURR-TIME-MM ?TO CURR-TIME-FMT-MM.
MOVE CURR-TIME-SS ? TO CURR-TIME-FMT-SS.
?
Now, you can manipulate the date and time any way you want.
?
Joe
On Sun, Apr 7, 2024 at 3:46?AM Joe Monk via <joemonk64=[email protected]> wrote:
|
Re: COBOL getting system time and/or date
So in your code, in working-storage: 01 ?CURR-DATE. ? ? ? 05 ?CURR-DATE-SYS ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?PIC X(08) VALUE SPACES. ? ? ? 05 ?FILLER ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? REDEFINES CURR-DATE-SYS. ? ? ? ? ? ? 10 ?CURR-DATE-MM? ? ? ? ? ? ? ? ? ? ? ? ? ? ?PIC X(02). ? ? ? ? ? ? 10 ?FILLER ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? PIC X VALUE "/". ? ? ? ? ? ? 10 ?CURR-DATE-DD ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?PIC X(02). ? ? ? ? ? ? 10 ?FILLER ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? PIC X VALUE "/". ? ? ? ? ? ? 10 ?CURR-DATE-YY ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? PIC X(02). 01 ?CURR-TIME. ? ? ? 05 ?CURR-TIME-SYS ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?PIC 9(06) VALUE ZERO. ? ? ? 05 ?FILLER ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? REDEFINES CURR-TIME-SYS. ? ? ? ? ? ? 10 ?CURR-TIME-HH ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?PIC 9(02). ? ? ? ? ? ? 10 ?CURR-TIME-MM ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?PIC 9(02). ? ? ? ? ? ? 10 ?CURR-TIME-SS ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? PIC 9(02). 01 ?CURR-TIME-FMT. ? ? ? 05 ?CURR-TIME-FMTD ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? PIC X(08) VALUE SPACES. ? ? ? 05 ?FILLER ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? REDEFINES CURR-TIME-FMTD. ? ? ? ? ? ? 10 ?CURR-TIME-FMT-HH ? ? ? ? ? ? ? ? ? ? ? PIC X(02). ? ? ? ? ? ? 10 ?FILLER ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? PIC X VALUE ":". ? ? ? ? ? ? 10 ?CURR-TIME-FMT-MM ? ? ? ? ? ? ? ? ? ? ?PIC X(02). ? ? ? ? ? ? 10 ?FILLER ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? PIC X VALUE ":". ? ? ? ? ? ? 10 ?CURR-TIME-FMT-SS ? ? ? ? ? ? ? ? ? ? ? ?PIC X(02). And at the very beginning of your code: MOVE CURRENT-DATE TO CURR-DATE-SYS. MOVE TIME-OF-DAY ? ? ?TO CURR-TIME-SYS. MOVE CURR-TIME-HH ? TO CURR-TIME-FMT-HH. MOVE CURR-TIME-MM ?TO CURR-TIME-FMT-MM. MOVE CURR-TIME-SS ? TO CURR-TIME-FMT-SS. Now, you can manipulate the date and time any way you want. Joe On Sun, Apr 7, 2024 at 3:46?AM Joe Monk via <joemonk64=[email protected]> wrote:
|
Re: COBOL getting system time and/or date
Our version string: CB545 V2 LVL78 01MAY72 - IBM OS AMERICAN NATIONAL STANDARD COBOL. , so we have the 360 OS CB545 V2 compiler... Joe On Sat, Apr 6, 2024 at 9:35?PM Ivo Veiga <ivo.trindade@...> wrote: With more time, did a bit more research. |
Re: VSAM cluster allocation error
Hi,
To define a VSAM cluster in MVS 3.8 you need a volume record in the catalog. This record will be created if you define a data space or define a cluster with the keyword UNIQUE. If the volume record is created, that volume will be owned by the catalog. You cannot define VSAM objects on that volume located in another catalog. In this case the keyword UNIQUE is the easiest way to create the volume record in the catalog. If UNIQUE is not specified, the default is SUBALLOCABLE. For VSAM master catalogs and user catalogs no data space is needed. To delete a volume record in the catalog and releasing the volume ownership, you have to delete all the VSAM objects from that volume. Finally you execute a DELETE SPACE to delete the volume record. I hope, you can succeed this exercise. Index components are much smaller than data components and require less space.That is partially true unless you specify REPLICATE, In that case each index record will be replicated over the complete track to avoid massive SEARCH's (head movements). Cheers, Rob |
Re: COBOL getting system time and/or date
With more time, did a bit more research.
For my TK4 COBOL Compiler, I see in the printout the following version information: CB545 V2 LVL78 01MAY72 - IBM OS AMERICAN NATIONAL STANDARD COBOL. I have tried to use reserved words DAY, TIME and DATE, but for this compiler, this has not worked.? The current-date for my environment come as Month/Day/Year - I have inverted month and day for the display using "move corr" (corresponding). Did not try the accept statement, but it should work for the available reserved words CURRENT-DATE and TIME-OF-DAY (I have tried only with MOVE). Attachments: COB005.CBL: JCL plus COBOL source for my TK4 environment. Screenshot with the output from COB005 execution with both CURRENT-DATE formatted (d/m/y) and as provided from the system (m/d/y) plus the TIME-OF-DAY. Screenshot with the header of the compiler output, with the version info I've mentioned above. Screenshot with the compiler errors for DAY, TIME and DATE. Reference used, that include the reference for DAY, TIME and DATE that did not work (therefore should not be the correct reference for the compiler version I have in my TK4): SC28-6456-0_IBM_OS_COBOL_Compiler_and_Library_Ver_4_Programmers_Guide_May72.pdf? (see also screenshot attached with the 1st page of the pdf) COB005.CBL
COB005.CBL
Current Date Time of Day ok.JPG
Date Time Day COBOL Version May72.JPG
Date Time Day not available.JPG
Reference COBOL V4.JPG
|
Re: COBOL getting system time and/or date
toggle quoted message
Show quoted text
|
Re: COBOL getting system time and/or date
In the GC28-6399-2 manual ("IBM OS Full American National Standard COBOL Compiler and Library, Version 2 Programmer's Guide") which I must have downloaded from bitsavers, it mentions ILBODTEO (p. 281). I wish I had time to check that out.
I remember writing a date routine about 1980 and must have used CURRENT-DATE, Others in the team were getting confused by whether 1900 and 2000 were leap years. |
Re: COBOL getting system time and/or date
¿ªÔÆÌåÓýFor the MVS Cobol Compile which I seem
to recall is the MVT one :
My Cobool xref Cobxref program has : 041800???? MOVE???? CURRENT-DATE TO HDDATE. 041900???? IF?????? HDDATE NOT = '000000' 042000????????????? MOVE HD-Y TO HD2-Y 042100????????????? MOVE HD-M TO HD2-M 042200????????????? MOVE HD-D TO HD2-D 042300????????????? MOVE HDDATEB TO H1DATE. 042400???? MOVE???? TIME-OF-DAY TO HDTIME. and in WS? : 037200 01? HDTIME. 037300???? 03? HD-HH?????????????? PIC 99. 037400???? 03? HD-MM?????????????? PIC 99. 037500???? 03? HD-SS?????????????? PIC 99. 037600 01? HDTIMEB. 037700???? 03? HD2-HH????????????? PIC 99. 037800???? 03? FILLER????????????? PIC X?? VALUE ':'. 037900???? 03? HD2-MM????????????? PIC 99. 038000???? 03? FILLER????????????? PIC X?? VALUE ':'. 038100???? 03? HD2-SS????????????? PIC 99. 038200 01? HDDATE. 038300???? 03? HD-M??????????????? PIC 99. 038400???? 03? FILLER????????????? PIC X. 038500???? 03? HD-D??????????????? PIC 99. 038600???? 03? FILLER????????????? PIC X. 038700???? 03? HD-Y??????????????? PIC 99. Vince On 03/04/2024 16:42, Alejandro olivan Alvarez wrote: Hi guys. |
Re: COBOL getting system time and/or date
Hi Jay,
If you don't mind Then I am happy to add a Y2KGEDT ( Get date and time ) and simply return DD/MM/YYYY HH:MM:SS that you can freely add to your set of programs, or distribute as you wish. I have extracted cbt 664 to my system to make the style compatible with yours. Regards, |
Re: COBOL getting system time and/or date
"ILE" is the Integrated Language Environment of AS/400, OS/400, iSeries, System i, IBM i platform. It has nothing to do with LE/370 or LE/390, etc. -- and nothing to do with mainframes, other than heritage. |
Re: COBOL getting system time and/or date
¿ªÔÆÌåÓýCorrect, I tried it, does not work.36 ? ? IKF3001I-E ? ? FUNCTION NOT DEFINED. DISCARDED. ? ? best regards, ¸é±ð²Ô¨¦.
|
Re: COBOL getting system time and/or date
I don't think MVS3.8J is ILE compatible, it's far older then LE Libraries --- ¦Ó¦Ò³¾
On Wednesday, 3 April 2024 at 19:04, Rahim Azizarab via groups.io <rahimazizarab@...> wrote:
|
Re: COBOL getting system time and/or date
regards; Rahim??? ??
On Wednesday, April 3, 2024 at 10:42:41 AM CDT, Alejandro olivan Alvarez <alejandro.olivan.alvarez@...> wrote:
Hi guys. I'm missing something again regarding our beloved MVT COBOL F compiler.. this time, I'm trying to get the system date and or time, but I'm missing miserably. I've looked for the right syntax in my collection of vintage bitsavers cobol books but I do not find anythin in the 64' and 68/ OS/360 books I have. As always, the 72' OS VS COBOL book seems the most plausible? to me... but i barely mentions the matter on page 401 for ACCEPT. So, I'm trying this: ACCEPT CD-CURRENT-DATE FROM DATE.
To which the compiler complains: ?
IKF3001I-E DATE NOT DEFINED. SYSTEM UNIT ASUMED.?So I guess I maybe missing something on the JCL, or something on the syntax is different... does anyone knows how to get data and or time? Thanks. Cheers. Alejandro. |
Re: COBOL getting system time and/or date
It is current date not date. regards; Rahim??? ??
On Wednesday, April 3, 2024 at 10:42:41 AM CDT, Alejandro olivan Alvarez <alejandro.olivan.alvarez@...> wrote:
Hi guys. I'm missing something again regarding our beloved MVT COBOL F compiler.. this time, I'm trying to get the system date and or time, but I'm missing miserably. I've looked for the right syntax in my collection of vintage bitsavers cobol books but I do not find anythin in the 64' and 68/ OS/360 books I have. As always, the 72' OS VS COBOL book seems the most plausible? to me... but i barely mentions the matter on page 401 for ACCEPT. So, I'm trying this: ACCEPT CD-CURRENT-DATE FROM DATE.
To which the compiler complains: ?
IKF3001I-E DATE NOT DEFINED. SYSTEM UNIT ASUMED.?So I guess I maybe missing something on the JCL, or something on the syntax is different... does anyone knows how to get data and or time? Thanks. Cheers. Alejandro. |
Re: COBOL getting system time and/or date
I don't believe this compiler had any means to retrieve the system date/time. You can use my date routine - y2kgetd - to retrieve the current date. I have attached a simple jobstream/program showing how to do that.
If you require the time, you will need to write an assembler subprogram to accomplish that. Jay |
to navigate to use esc to dismiss