COBOL/400 Questions


QTMMSNDM without RPG
Is it possible to use the QTMMSNDM API for sending emails from the AS/400 without using RPG? We use COBOL/CL and would struggle to get any 3rd Party software loaded either. SNDDST will not do what I need.

Answer Question   |  May 8, 2013  9:46 AM
AS/400, COBOL/400, QTMMSNDM
asked by:
5 pts.

24 digit number: Arithmetic operations?
Hi, I need to work with numbers which are digits long. Why? Because this is the way to create a German IBAN code from Bank Code and Bank account: Concatenate Bank Code (8 digits) plus Account nbr (10 digits, leading zeroes) plus “131400″ to a 24 digit number. Compute Modulo 97 of this number. (or [...]

Answer Question   |  March 21, 2013  8:03 AM
COBOL/400, IBMi, RPG
asked by:
75 pts.

How to find the copybook?
Hi, I need to make few changes to a copybook in COBOL/400. I know the name of the copybook. Please let me know how to locate it? Regards, M

Answer Question   |  February 22, 2013  4:05 AM
AS/400, COBOL/400
asked by:
340 pts.

Validate date in COBOL/400
I have date in yyyymmdd format. I want to validate if it lies between a particular period of 2 years let b/w 1 Jan 2012 to 5 April 2014, in COBOL/400…. Please help me as the intrinsic function like that in COBOL are not working in this case. Thanks.

Answer Question   |  January 31, 2013  7:22 PM
COBOL, COBOL/400
asked by:
10 pts.

Debugging in AS/400
Hi Group, Could anyone please explain me the steps that are involved in Debugging a Job that is Active in Production Environment. Regards, MVRK

Answer Question   |  January 13, 2013  6:37 AM
AS/400, COBOL/400
asked by:
340 pts.

Writing data into a Flat file using COBOL/400
Hi Group, I have created a flat file (file with just record length) Now i would like to pass data into it through a COBOL/400 pgm.  How to define that flat file in cobol/400 and write data into it? Regards, MVRK

Answer Question   |  February 27, 2012  5:17 PM
AS/400, COBOL/400
asked by:
340 pts.

AS/400 COBOL
one physical file have 6 key fields,now i want to retrive the 10th record based on one key field,how to retrive in cobol/400 with without using logical file ex:- emp pf have 6 key fields,and emp have records,now i want to retrive particular record in emp(10 th record only),in my cobol pgm some times use [...]

Answer Question   |  March 31, 2012  10:07 AM
AS/400, AS400 physical file, COBOL/400
asked by:
345 pts.

AS400 COBOL one pf have one lf but key fields are different
i have one physical file,that pf have one logical file,but pf have 4 key fields,logical file have 2 key fields,now both(pf,lf) are using in cobol/400 code   SELECT pf-file ASSIGN TO DATABASE-pf1 [Br _extended=”true” />ACCESS IS dynamic[Br _extended=”true” />ORGANIZATION IS INDEXED [Br _extended=”true” />RECORD KEY IS EXTERNALLY-DESCRIBED-KEY [Br _extended=”true” />FILE STATUS IS pf-STATUS. [Br _extended=”true” />[Br [...]

Answer Question   |  March 31, 2012  11:30 AM
AS/400, AS400 physical file, COBOL, COBOL/400
asked by:
345 pts.

Number of copies how to print in printer file
i want to print 10 no of identical copies to print,how to we do to print in cobol/400

Answer Question   |  March 31, 2012  12:12 PM
AS/400, AS/400 print errors, AS/400 printing, COBOL/400
asked by:
345 pts.

COBOL/400 subfile single page load(page by page load)
Hi! can any one give me sample code of cobol/400 program which loads a subfile records page by page. My problem here is I am able to code page by page records loading from a PF but when the Subfile is dispalyed it is not properly displaying the pages. Fro example after loading and displaying [...]

Answer Question   |  March 31, 2012  8:10 AM
COBOL, COBOL/400, iSeries, Subfile, V5R3
asked by:
5 pts.

COBOL/400
Hi Group, In COBOL/400 PGM the file has been declared with ACCESS as SEQUENTIAL and ORGANIZATION as SEQUENTIAL. How to delete a record from such file? Regards, M

Answer Question   |  March 31, 2012  4:42 AM
COBOL, COBOL statements, COBOL/400, PGM
asked by:
340 pts.

* CPF6412 – compilation error
When I compile my cobol cbl program , i get this strange error. . EXCKRD5F 1 >8X ” X ” N . EXCKRDAF 1 ? X ” X ” X à  MSGID MI Instruction Stream Semantic Diagnostics  * CPF6412 Attributes of instruction X’56F9′ operand 1 not valid. Probable compiler error.  * CPF6412 Attributes of instruction [...]

Answer Question   |  March 31, 2012  10:01 AM
COBOL, COBOL Programs, COBOL/400
asked by:
350 pts.

COBOL/400, DB2/400
Hi Group, I have a Physical file. It has 3 members, memb1, memb2 and memb3. In my cobol/400 program i need to access all the 3 members and put data into them. What is the select statement for the multimember PF? How to declare the file section for multi member PF? The  COBOL/40o pgm should [...]

Answer Question   |  July 6, 2011  5:35 AM
COBOL/400, DB2/400
asked by:
340 pts.

COBOL/400
Hi Group, I have the code in this format IDENTIFICATION DIVISION PROGRAM-ID. PGM. ——– ——– DATA DIVISION. FILE SECTION FD  PHONEFILE 01  PHONE-REC. ———— ———— PROCEDURE DIVISION. <In Procedure division i have written an record into the PHONEFILE> WRITE PHONE-REC. I would like to pass the PHONE-REC record to a sub-program. <My question is, Can [...]

Answer Question   |  June 24, 2011  5:45 PM
AS/400, COBOL, COBOL statements, COBOL/400
asked by:
340 pts.

COBOL/400
Hi Group, How to invoke an auto start Job in cobol/400 application? Regards, M

Answer Question   |  May 18, 2011  4:53 PM
AS/400, AS/400 jobs, COBOL/400
asked by:
340 pts.

Find/Replace/Reformat Text in COBOL or CL400
As part of a rebranding exercise I need to create a program to find/replace variable length text within a file. I know I can do this easily enough via INSPECT/REPLACE (or maybe QCLSCAN in a CL) but has anybody got ideas about how to reformat afterwards (data in the file is stored typically in multiple [...]

Answer Question   |  May 9, 2011  10:17 AM
CL programming, CL programs, CL/400, COBOL/400
asked by:
5 pts.

How to handle Null value in COBOL/400.
I have created a view that have Null value.I have populated this field on the basis of some conditions.But when i am reading this view in COBOL program it is going in infinite loop & reading the same record.

Answer Question   |  May 12, 2011  5:49 AM
COBOL, COBOL Programs, COBOL/400, COBOL/400 Errors
asked by:
100 pts.

Difference between two strings using CL/400, AS/400, COBOL/400
I am working on a requirement where in I need to find the numerical difference between two character strings. The two strings are 8 character long and can have spaces as values. The two strings are “from” and “to” fields. I will have to find out the last value used and then subtract it from [...]

Answer Question   |  May 2, 2011  10:10 AM
AS/400, CL/400, COBOL/400
asked by:
20 pts.

Batch Jobs in AS/400
Hi Group, We have an application developed in RPG/400, COBOL/400, CL/400 & ILE. There are few batch jobs that are supposed to be run at the End of the Day. The execution time for these batch jobs is very high.  What measures can be taken to reduce the down time?  Suppose we want to move [...]

Answer Question   |  April 25, 2012  1:52 AM
AS/400, AS/400 batch jobs, COBOL/400, RPG/400
asked by:
340 pts.

Why this error code in COBOL program: CPD7914
Need help getting pass this error message. using this input file definition * Beginning of data *****************************   R DCREFR                                           DCCODE         3          ALIAS(DC_CODE)         DCMEANING     50          ALIAS(DC_MEANING)  Which is called by this DSS file definition:                                         UNIQUE                                                     REF(DCREF)                     R DCPHYR                                                     DCCODE    R                                                DCMEANING R                                              K DCCODE                                        A*     DCPHY                                               A          [...]

Answer Question   |  March 25, 2011  6:00 PM
AS/400 error messages, COBOL, COBOL Programs, COBOL/400
asked by:
385 pts.