suppose you have a db2 server with tcipip# 192.168.1.100 and a db2instance listening to port 50000. There is a database called mydbase running under control of that instance. You need te access that database by means of ODBC.
It is just 3 simple lines, just do not forget to execute them in the...
I use this syntaxselect empno
, sex
, salary
, case when sex = 'F'
then salary * -1
else salary
end as sort_col
from employee
order by sort_col
Nonsence example, but when you replace "sex = male/female" by some kind of "debit/credit" code it...
Try this syntax
select *
from table ( select empno as xx
, salary as monthly_insult
, bonus as robbed_by_banker
from employee
) a
where a.monthly_insult + a.robbed_by_banker > 10000
JDBC/ODBC connectors are not designed for that. You use it to connect to a specific database and that database is the scope. You could try to use the "SYSPROC.ADMIN_CMD" for the LIST DB DIRECTORY.
Could you supply more info about the 2 configurations? When you make a backup from the source computer, make sure that it is an uncompressed offline backup!
Do not rely on the control centre too much but try to make your own backup/(redericted) restore scripts.
Believe me, it works, but the...
Sounds over-complex to me. Are there many non-cobol routines?
If not: Just compile to "*.int" modules on your windows development machines, on the aix compile the "*.int" into "*.gnt" and just execute the "*.gnt"s.
All your sources and copybook can remain on the windows environment. I do not...
pre-compile, compile. linkedit & bind. Life as usual for a mainframe programmer. But when you want that to work in the outside world..
The ingredients are there:
O.S.: linux
DBMS: DB2 express C
compiler: open-cobol
All for free and yes: DB2 still carries the cobol-pre-compiler. The link/edit...
Hmmm... The topic-starter mentiones .IDX files, so the organization is indexed. This leaves record-length and record layout.
Just trail&error until you can retrieve a whole record and then analyse the hexadecial structure:
PIC X fields should be readable in normal format
PIX 9 packed-deciaml...
Whenever you must access MF files from another language than MFCobol, you can call the MF I/O routines separately.
This module is called extfh (http://docs.hp.com/en/64/fh/fhexfh.htm)
Remember: "backup is for dummy's, restore is for pro's"
So, what is your recovery stratigy? Do you have a dedicated database server? How fast can you re-build that server and restore the database? How well did you secure your backup-images and transaction log files?
Did you test? How long did...
The same syntax as used in "create table":
INOUT1 char (3)
INOUT2 char (3) NOT NULL
So every paramteter which is nullable should be called with the indicator variable. No difference with tables.
Sane coding standards:
next sentence and end-if are mutual exclusive in 1 line,
even better in 1 section
even better in 1 program.
In the past I had to maintain old '74 programs. In the section were you made you changes it was good habit to convert all IF statements and add END-IF's and take...
You're talking to a database, so talk SQL. Concatenate? Translate that phrase into JOIN or UNION.
Build a SQL query which returns the result you request. Then use that same SQL in your export statement.
I'd go for the command-line. Google for "IMPORT" or "LOAD". I'm sure it can be done using stored-procedures, but why the <beep> should you, being a novice in DB2?
It can be done with static SQL. You should realize that
where x in ('1','2','3')
andwhere x in ('1','2','3','1','1','1','1','1')
generate the same result. DB2 performance does not suffer.
This means that you can code like this
01 w-group.
49 w-gr-01 pic x(1).
49 w-gr-02 pic x(1)...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.