Search found 97 matches

by zum13
Fri Apr 19, 2024 5:03 am
Forum: IBM COBOL, GnuCOBOL (OpenCOBOL), OOCobol.
Topic: read a VSAM file from bottom to top and length of a string using COBOL?
Replies: 5
Views: 2112

Re: read a VSAM file from bottom to top and length of a string using COBOL?

Hello. COBOL does have an intrinsic function called LENGTH, which can be used like this: MOVE FUNCTION LENGTH(WA-INPUT-FIELD) TO WA-LENGTH This will give you the length of the alphanumeric field or group field defined in working storage. It won't do anything clever like working out the length of the...
by zum13
Fri Apr 19, 2024 4:46 am
Forum: IBM COBOL, GnuCOBOL (OpenCOBOL), OOCobol.
Topic: convert S9(5)V9(2) Comp 3 to alphanumeric
Replies: 2
Views: 1042

Re: convert S9(5)V9(2) Comp 3 to alphanumeric

Hello. It's just a matter of moving your non-displayable value to a field that is displayable. So, for S9(5)V9(2), a field defined as -9(5).9(2) would give you a result which would be an minus sign (or blank if the number is positive) and your number with leading zeros. Changing the minus to a plus ...
by zum13
Thu Mar 28, 2024 12:44 pm
Forum: DevOps for Mainframes and related news
Topic: What is ZOWE?
Replies: 2
Views: 1644

Re: What is ZOWE?

Hello. At it's most basic, ZOWE is an extension for VSCode that puts an IDE in front of the mainframe. Rather than logging on to TSO, you sign in via ZOWE through your PC and use its editor and features rather than those of ISPF. It'll let you work with datasets and job output from the MVS filesyste...
by zum13
Wed Mar 27, 2024 2:15 pm
Forum: JCL - Job Control Language.
Topic: get the current system date through JCL ?
Replies: 10
Views: 1757

Re: get the current system date through JCL ?

Prior to version 2, JES2 could not be told to substitute symbols into in-stream data so if you did //SYSUT1    DD * &YYMMDD &HHMMSS then the string "&YYMMDD &HHMMSS" is what would appear in the SYSUT1 input. In order to get around this limitation for TCP/IP, a program calle...
by zum13
Sun Mar 24, 2024 2:54 am
Forum: JCL - Job Control Language.
Topic: get the current system date through JCL ?
Replies: 10
Views: 1757

Re: get the current system date through JCL ?

The symbol converter isn't actually necessary. Since version 2, symbols can be put into in-stream data providing JES2 is told to resolve them via the "SYMBOLS" parameter. For example, the following will copy the date and time symbols to sysout: //STEP2   EXEC PGM=ICEGENER //SYSPRINT  DD SY...
by zum13
Fri Mar 22, 2024 10:19 pm
Forum: JCL - Job Control Language.
Topic: get the current system date through JCL ?
Replies: 10
Views: 1757

Re: get the current system date through JCL ?

Hello. There are a number of system symbols that are available for use in JCL which are documented here: https://www.ibm.com/docs/en/zos/3.1.0?topic=symbols-dynamic-system The bulk of these symbols relate to dates and times. If you don't want the complete date/time formats provided, there are enough...
by zum13
Sat Feb 24, 2024 12:08 am
Forum: Ask for Job Guidance and referrals here.
Topic: roles and responsibilities for Console operations in Mainframes
Replies: 4
Views: 674

Re: roles and responsibilities for Console operations in Mainframes

Hello. In most of the places I've worked, the running of the mainframe is divided into two groups. The first is the administration side which is essentially the systems programmers. These folks are responsible for the configuration and software set up of the mainframe. If some new software is requir...
by zum13
Fri Feb 23, 2024 10:26 pm
Forum: IBM COBOL, GnuCOBOL (OpenCOBOL), OOCobol.
Topic: file status 35 in COBOL
Replies: 2
Views: 731

Re: file status 35 in COBOL

For a VSAM file, this error can occur if the file is empty. If that's the case, then you need to load a dummy record into the file. This can be done programatically or you can use the REPRO statement under IDCAMS to get the record in there.
by zum13
Fri Feb 23, 2024 12:50 pm
Forum: Other Mainframe Topics, Off-Topics, FAQs.
Topic: increase the generation without loosing existing generation.
Replies: 10
Views: 1126

Re: increase the generation without loosing existing generation.

In days of old, when you allocated a dataset you needed to tell the system where to put it (i.e. which volume to use). This created problems, particularly where production jobs were concerned. You could, essentially allocate anywhere, but if that anywhere was full your job would fail. It also lead t...
by zum13
Thu Feb 15, 2024 10:57 pm
Forum: IBM DB2 and IMS DB/DC
Topic: call a native stored procedure from a cobol program
Replies: 6
Views: 1383

Re: call a native stored procedure from a cobol program

There's a search page at https://www.redbooks.ibm.com/ that can be accessed by clicking the magnifying glass icon at the top left of the page which will allow you to locate manuals in the catalogue. For searching within a manual, that will depend on which tool you're using to view the PDFs, but Ctrl...
by zum13
Thu Feb 15, 2024 10:46 pm
Forum: Other Mainframe Topics, Off-Topics, FAQs.
Topic: What could be the reason for S722 abend?
Replies: 8
Views: 1326

Re: What could be the reason for S722 abend?

In office we are not allowed to open external links. I search this site on phone and did not think of finding manuals there. Will check, do we have manuals on this site?   IBM's documentation can be accessed in an offline format in a couple of ways, but you will need to download stuff to gain acces...
by zum13
Tue Feb 13, 2024 4:59 am
Forum: IBM DB2 and IMS DB/DC
Topic: call a native stored procedure from a cobol program
Replies: 6
Views: 1383

Re: call a native stored procedure from a cobol program

Hello. Stored procedures are intended to be callable from any program irrespective of which language the procedure has been written in. It does not matter if the procedure is in the same language as the calling program or not, the important thing is that the parameters specified when the procedure w...
by zum13
Wed Feb 07, 2024 2:22 am
Forum: Interview Questions.
Topic: How to rollback the updates in COBOL program?
Replies: 1
Views: 657

Re: How to rollback the updates in COBOL program?

When a DB2 program abends, the current unit of work is automatically rolled back by default (there may be a way to override this, but I've not come across it). Some of the more severe SQLCodes can also cause an automatic rollback of changes. If, however, your program has detected some sort of error ...
by zum13
Tue Feb 06, 2024 11:09 am
Forum: IBM DB2 and IMS DB/DC
Topic: How to solve null indicator sqlcode - 305?
Replies: 1
Views: 754

Re: How to solve null indicator sqlcode - 305?

Hello. A null column is one which can have no value. In order to handle a nullable column, an additional field needs to be defined which will allow DB2 to provide an indication as to whether the column is, in fact, null. This takes the form of a halfword integer (i.e. PIC S9(4) COMP) which needs to ...
by zum13
Fri Feb 02, 2024 9:57 pm
Forum: File-AID and IBM File Manager.
Topic: Creating XREF for IMS DBD in fileaid.
Replies: 1
Views: 1236

Re: Creating XREF for IMS DBD in fileaid.

It's been a while since I last used it, but option 7 is the XREF generation stuff. Chapter 9 in the manual discusses how to use it: https://manualzz.com/doc/37770031/file- ... nce-manual
by zum13
Fri Feb 02, 2024 9:38 pm
Forum: IBM COBOL, GnuCOBOL (OpenCOBOL), OOCobol.
Topic: Compare a flat file with DB2 table.
Replies: 3
Views: 800

Re: Compare a flat file with DB2 table.

OK, there are a couple of options. You can load the key data from your input file into another table in the database and use the "NOT EXISTS" clause in a predicate to identify the non-matching rows in this sort of a way: SELECT A.KEY FROM ORIG_TABLE A WHERE NOT EXISTS (SELECT '1' FROM FILE...
by zum13
Mon Jan 29, 2024 11:43 pm
Forum: IBM COBOL, GnuCOBOL (OpenCOBOL), OOCobol.
Topic: Compare a flat file with DB2 table.
Replies: 3
Views: 800

Re: Compare a flat file with DB2 table.

Hello. I'm going to assume that there is some sort of unique key available in both the input file and table which would mean you could write a program to do standard collation processing to identify the rows you need to remove. The file would need to be in the correct key sequence order as would the...
by zum13
Sun Jan 28, 2024 1:46 am
Forum: IBM COBOL, GnuCOBOL (OpenCOBOL), OOCobol.
Topic: COBOL unstring question for packed decimal.
Replies: 2
Views: 724

Re: COBOL unstring question for packed decimal.

Hello. The clue is pretty much in the name; UNSTRING is intended for use with strings rather than binary data. Using it against binary data can result in false positives if something in the data happens to match your delimiter character, for instance, if you're searching for spaces and your binary d...
by zum13
Thu Jan 25, 2024 10:45 pm
Forum: TSO, ISPF & REXX (Do you still do CLIST?!).
Topic: Difference between 9.99 and 9v99?
Replies: 4
Views: 854

Re: Difference between 9.99 and 9v99?

The only components found in packed decimal are the digits themselves and the sign. The "V" is a direction to the compiler which tells it where you want it to assume the decimal point is. It doesn't affect the stored data in the slightest. If you don't specify it where it is needed, then y...
by zum13
Wed Jan 24, 2024 12:32 am
Forum: TSO, ISPF & REXX (Do you still do CLIST?!).
Topic: Difference between 9.99 and 9v99?
Replies: 4
Views: 854

Re: Difference between 9.99 and 9v99?

Hello. Numbers stored in packed decimal representation usually have to be defined with an implied decimal point because the packed format has no way of specifying a decimal point; there are only the individual digits and the sign. For example, the number "+100.23" as a four byte packed fie...

Go to advanced search