Mainframe Languages

356

Solutions

429

Contributors

There are many computer languages, and they have been evolving from machine language into a more natural way of writing. Languages are generally classified into machine language (direct machine code); assembly (using mnemonics to present the instructions to be translated later into machine language by an assembly program); procedural languages, also known as high-level languages (HLL) (Pascal, FORTRAN, Algol, JCL, COBOL, REXX, PL/I, Basic, and C are common), along with several other types. Mainframe programming is largely done in the procedural languages.

Share tech news, updates, or what's on your mind.

Sign up to Post

I don't know why,
in runtime, when I give right keys, my rgple program
gives an error "Error I/E CPF5029 in file tabview1"
in the CHAIN instruction.
Instead if the keys are not in the table so the chain
instruction doesn't break.
WHY?
In compilation, everything is right.
The table has been created with sql statment CREATE TABLE..
and tabview1 is a DDS LF on this table which gives the right key fields
to the table (4 fields).
[code]KEY           KLIST                          
              kfld                    CDCUSTK
              kfld                    ORDNUMK
              kfld                    ROWK  
              kfld                    STK    
                                             
KEY           CHAIN     PR            <======= I/E Error
[/code]
0

Howdy 'all,

    I'm working in COBOL with a double control break to print a hospital record. The input is one record per line, with, hospital info first, then patient info. There are multiple records per hospital, and multiple services per patient.
    The idea is, using a double control break, to print one hospital name, then all the patients from that hospital. Then print the patient name just once for all services, like the below.
   I'm having trouble with my output, and am hoping someone can help me get it in order.

I am using AccuCobol to compile
experts-exchange does not allow .cob and .dat so the extentions were changed to .txt
The files are:  the .cob lab5b.cob
the input / output: lab5bin.dat, lab5bout.dat

The assignment:
http://www.cse.ohio-state.edu/~sgomori/314/lab5.html


Hospital Number: 001
Hospital Name: Mount Carmel

00001       Griese, Brian              Ear Infection                    08/24/1999             300.00
                                                    Diaper Rash                     09/05/1999              25.00
                                                    Frontal Labotomy             09/25/1999          25,000.00
                                                    Rear Labotomy                09/26/1999          25,000.00
                                                    Central Labotomy             09/28/1999          24,999.99


     The total amount owed for this patient is: $..........
[embed=doc 257056]
[embed=doc 257057]
[embed=doc 257058]
0
How do you link WinHLLAPIAsync emulator API with RegisterWindowsMessage() to track emulator events?
0
Hi,

does anyone knows a good tutorial for introduction to COBOL ?
0
Probably a simple flag, but I can't see how to stop the spoolfiles from being generated.  For instance if I do an UPDATE/WHERE and no rows match criteria (which is fine) I end up with a spooled job log.

Regards,
Richard
0
I have MicroFoucs Cobol 5 running on a Solaris 10 box and I am trying to run mflicense to manage licenses but it shows scrambled.
I am using vt100 but I also tried if vt220 or dtterm but it remains the same. What should I to fix that ? I dont know how to use tic or mftic.
Thank you
0
In my RPGLE, First step i need to send data to debit server program this will be running in batch as a background process, in this data queue will be created and the necessary data will be sent to the data queue using QSNDDTAQ.
Second step i will be displaying the popup till i get response from the batch process(through data queue), so i need to know whether the dtaq created in the batch process or not, to receive the dtaq, so i want to check the whether the data queue object created or not.

Eg:

Call Debit server program
Call Display popup

Debit server program:(Batch process)
Sending request to another application
expecting response
Got the response
create the dtaq
qsnddtaq the response to the display popup pgm.

Display popup pgm:
Display the popup with invite keyword
it has to receive the response through the data queue, so i need to know whether the data queue created in the batch process, before start doing QRCVDTAQ.







   
0
I am writing a program to do some distribution tasks. One of the things I want to do is update userA's screen when userB pulls an item.  I was told I could use a data que to do this but I am not sure if this is correct, or know how to use a data que?  Anyone have any ideas?  And if data que is the way to go, where can I find out how to use them?
0
I have a RPG program that builds the sql statement dynamically. I have coded this in Java, however; these SQL can take a long time to run, and I end up gettting connection timeouts. Anyway, I need to be able to use a host variable that may be up to 1mg in size. 32k isn't even close for me to run these SQL.

Example

EXEC SQL                                
   declare resultsCursor Scroll Cursor  
   for resultsSqlStmt;                  
EXEC SQL                                
   -----This is where the problem is--- the stmtStr variable needs to be greater that
          32767. It needs at least 1mg.
   Prepare resultsSqlStmt from :stmtStr;
EXEC SQL                                
   open resultsCursor;                  
EXEC SQL                                
   FETCH Next from resultsCursor into    
      :mater01;  
0
see attached for the criteria.

i hope it doesn't look too overwhelming.
i have been using cognos impromptu reporting to do some filtering but it doesn't work to well.

Thus, i was thinking if anyone can code up till step 12, 125 points will be allocated. else if anyone can attempt all, i will give full 500 points ( increase the points from 125.)

the given columns will be (in order of column A ...etc):

CODE1
CUSTOMER
WHWV
ITEM
GRC
TDDS
ICC
TCC
COL
LABEL
NO OF CUST
FIELD FRQ
TOTAL SALES FRQ
FIELD SALES QTY
FIELD QTY
TOTAL SALES QTY
TOP CUST
TOP2 CUST
TOP3 CUST
TOP4 CUST
SC09
SC09-1
SC09-2

after coding , one should see the following 3 additional columns after SC09-2 :

UPDATED SC09
UPDATED SC09-1
UPDATED SC09-2

note: the column name starts with " Field..." means it doesn't help in the coding as coding criteria doesn't refer to them. they are there for reference only.

thanks !
[embed=doc 209160]
0
I have 2 files with the same name "myfileH" but in two different librays "myliibH" and "myLib08".
how do  i declare them in a RPGLE program so the second one is not ignore with the error previously declared.
when compiling
0
We have a COBOL CICS program that stores data in a temp storage queue.  The amount of data that needs to be stored has grown past the limit allowed by CICS.  Is our best option to create multiple queues to hold the additional data, or is there another solution?
0
HI,
I have to renew an old print made for a very old printer witch has broken itself.
I have to use IPDS to enlarge characters.
How can I do to write a PRTF to use it in a RPGLE prgogram to make my new print?
Thanks
0
I'm trying to write a program that computes the distances between 2 points using the 'great circle distance' formula.  I'm using the C - ACOS function and my variables are defined as '8f' floating point.

This is the first time I've tried to do higher math functions in RPG and the first time with float point variables.  I've searched the Internet and found many examples and have used them but cannot get the expected result WHEN USING FLOATING POINT variables.  All the examples use floating point variables.  I get a somewhat close result when I use signed decimal variables.

Is there some rule I don't know about when using floating point variables?  I have the 'FLTDIV' H-statement at the top of my program.  

Thanks.

Kevin
0
Can someone help me or tell if I can generate a text file with COBOL notation from C#?  I will need to dump the file to a specified location with a different name each time it is generated so it can be pulled into an older application.  I have all the record layout detail but need to know where to start.

This is a bit of an explaination of the basic requirements.
COBOL notation is used.  All "x" fields are considered unformatted text.  Justification is usually left, but not required.  "9" fields are numeric with the "v" representing an implied decimal point and "+-" representing the sign ("+" or "-").  Numeric ("9") fields are right-justified, left-zero filled.  Example: 112.40 in a field with a format of 9(4)v9(3)+- should be 0112400+.
0
Can someone help me or tell if I can generate a text file with COBOL notation from C#?  I will need to dump the file to a specified location with a different name each time it is generated so it can be pulled into an older application.  I have all the record layout detail but need to know where to start.

This is a bit of an explaination of the basic requirements.
COBOL notation is used.  All "x" fields are considered unformatted text.  Justification is usually left, but not required.  "9" fields are numeric with the "v" representing an implied decimal point and "+-" representing the sign ("+" or "-").  Numeric ("9") fields are right-justified, left-zero filled.  Example: 112.40 in a field with a format of 9(4)v9(3)+- should be 0112400+.
0
Hi
I am new to COBOL/400 preogramming although know RPG,ILE RPG for 4 years.
Can anyone please guide me is it posible to passing Array as parameter in COBOL/400?
I have done it in ILE  RPG but dn't know how it works in COBOL 400.

Please help, a code example will be of great help

Andy400
0
The compiler found an internal problem; compilation stopped. Problem ID is GCOM-06.
The compiler found an internal problem; compilation stopped. Problem ID is GCOM-03.

I have started to comment out subroutines trying to isolate where the problem is.
So far, I have not been sucessful.

There does not to be any obvious complile errors.  

Anyone have an idea where to go next?
0
Hello! I'm working in the migration project where I convert Cobol programs into SAS programs. I would like to know if anyone knows about a method less tedious to migrate Cobol programs. I'm currently using the Excel to map programs (files, tables). But I think is there another tool to do it. Any ideas? Thanks!!!
0
Hello, I am trying to find an easy "Tool" or function to create a variable from the contents of another variable, or do some kind of Indirect reference. I am getting the variable name by using DSPFFD in a CL. I then want to call an RPG or COBOL program that will take the value of the WHFLDE ie "CUSTNO" and get the value from the field CUSTNO in a PF. My goal is to be able to pass any file name into the CL.  Any help would be much appreciated.
[code]dspffd   whflde = "CUSTNO" 
PF  Custmast
      CUSTNO  10A
      Cname     20A
      Caddr      30A
[/code]
0
I have never written an RPG program, and I have never used the RPG engine so I don't even know how to get into the environment to begin writing code but I would like to create a simple program that will loop through a list of files in a specific library that will run the clrpfm command on each item in the list.  Can someone help me with a basic tutorial/ direction to start?  I have full access to our AS400 so as long as the RPG engine is part of the base OS, I should be able to use it.  Any help would be greatly appreciated.
0
I've a question regarding of my RPG program: a program that load all fields from logical file CVTC01L1, prompt indicated user to enter customer code located on top of screen, if user presses enter without entering any inputs, the program load all data from CVTC01L1; F3 indicate quit & F12 indiocate cancel/restart the query, my problem is when I press F12, record format containing subfile write on screen, but subfile content remained. A subroutine  called SFLCLR is created and seems execute when I press F12. But I really have no ideas why the contents remain on the screen.

Here's code I used. Could anyone help?
[embed=doc 174602]
[embed=doc 174603]
0
Is there a more modern way of accomplishing?  
RPG38 way:
C                     MOVE *ALL'_'   LINE  132

I hate variables defined within the code, so I do    

dline             s            132
c                   move      *all'_'       line        

I would just prefer not to use the MOVE operation.  I prefer using EVAL
0
does anyone know how to drop to the end of a do while loop after an if statement
for example
do while
instruction
instruction
if something then do

****drop out of the loop to the end
end
end
similiar to a break; in c#
0
Hi,

I am trying to delete records from JD Edwards using Iseries access for windows with the following code.

Private DELETE_SMRY_TEXT As String = "DELETE FROM DBPRDDATA.F0411Z1 WHERE VLEDUS = @PAR_USER_ID " _
                   & "AND VLVINV IN @PAR_INVOICE_NBR "

            If Del_Command Is Nothing Then
                Del_Command = New iDB2Command(DELETE_SMRY_TEXT)
            End If
            With Del_Command.Parameters
                .Add(New iDB2Parameter("PAR_USER_ID", iDB2DbType.iDB2VarChar)).Value = "VENDCOMP"
                .Add(New iDB2Parameter("PAR_INVOICE_NBR", iDB2DbType.iDB2VarChar)).Value = "('235890', '235890CB')"
            End With
            With Del_Command
                .Connection = JDEConnection
                .ExecuteNonQuery()
            End With
            Del_Command = Nothing

The above not working.  Nothing happening.  I do not get any error, but records still there in JDE.
However, if I remove sencond parameter as below by removing IN, it works.

Private DELETE_SMRY_TEXT As String = "DELETE FROM DBPRDDATA.F0411Z1 WHERE VLEDUS = @PAR_USER_ID  "

            If Del_Command Is Nothing Then
                Del_Command = New iDB2Command(DELETE_SMRY_TEXT)
            End If
            With Del_Command.Parameters
                .Add(New iDB2Parameter("PAR_USER_ID", iDB2DbType.iDB2VarChar)).Value = "VENDCOMP"
            End With
            With Del_Command
                .Connection = JDEConnection
   …
0

Mainframe Languages

356

Solutions

429

Contributors

There are many computer languages, and they have been evolving from machine language into a more natural way of writing. Languages are generally classified into machine language (direct machine code); assembly (using mnemonics to present the instructions to be translated later into machine language by an assembly program); procedural languages, also known as high-level languages (HLL) (Pascal, FORTRAN, Algol, JCL, COBOL, REXX, PL/I, Basic, and C are common), along with several other types. Mainframe programming is largely done in the procedural languages.

Top Experts In
Mainframe Languages
<
Monthly
>

No Top Experts for this time period. Answer questions to earn the title!