Hi experts,
I have to fill rows into a database with an insert-statement.
The problem is the primary (unique) key. The column is named TS_INSERT and it should be the TS, when the row was inserted.
But when I write:
INSERT INTO table1
SELECT CURRENT TIMESTAMP
, var2
, var3
...
Instead of filling or creating new tables I can make a second SELECT.
First I simply lokk for LOW-RANGE.
If LOW-RANGE is in the table I use the SELECT I postet first otherwise LOW-RANGE is my hit.
Thanks for all.
If anyone knows a simple 1-select-way post it. For now I will use the...
Thanx for the fast answer but it will not run.
select COL1+1
from (select Col1 from tbl
where Col1 between LOW-RANGE and HIGH-RANGE
union
select LOW-RANGE -1
union
select HIGH-RANGE -1 ) as t1
where
not exists
(select * from tbl as t2
where...
I have a table where COL1 is an increasing number starting with 1.
Rows can be deleted.
Now I need a SELECT-statement to get the first unused number within a given range.
Example:
COL1
1
2
3
4
6
8
12
13
14
I neet the first free number between 10 and 20.
The result has to be 10.
How can I...
One of my hard drives is about 3 years old and it seems it doesn't work very properly when applications manipulate many data.
But (except once) I NEVER had found damaged sectors or even data loss durig the SCANDISK surface scan.
I regulary use Norton Disk Doctor once per month to scan this...
Hi,
first the things I already know:
Windows checks at startup the "hard disk error bit" and the "clean shutdown bit". If any of them is set to ZERO, Windows performs a SCANDISK.
You can find Infos about the bits here:http://annamaria.net/tools/scandisk.htm
(the article is...
As long as I compile my source with an host-c-compiler (C/370) I assume that '\n' is translated by 0x15.
But simple write the two bytes in binary doesn't result in a CRLF. I tried it in more than one way:
putc('\r',out);
putc('\n',out);
or
fprintf(out,"\r\n");
or
char r = 0x0D...
There must be a difference between writing 0x0D and 0x15 (CR and LF in EBCDIC) in binary and '\n' in text-mode but I didn't find it. The '\n' in text works, the other not.
Maybe it's z/OS that needs some more to interpret the two bytes as CRLF.
If I reopen the output with
out =...
First something I find out:
A "real LF" is a combination of CarrierReturn (CR) and LF.
If you write '\n' to a text-file it is automatic converted to a real LF. If you write it to a binary-file no conversion will happen and so no real LF is in your output.
> Have you tried fixing this...
To explain why I have to insert LineFeeds (LF) in a binary dataset:
The dataset was transfered "binary" from an UNIX-system to the z/OS-Host. The original format was VB, this means every line has a different lenght defined by an 4-byte-length-field at the beginning of each row.
But...
Hello,
I have a "binary" dataset on an z/OS-system where I have to put some LineFeeds at special positions.
If I open the output-dataset in "binary"-mode (e.g. "wb") the '\n' will not be a real LineFeed and if I open it in "text"-mode all HEX'15' of my...
If you use SDSF I have a REXX that my be helpful:
Run this script in a loop until
return ^= "XXMAXRC> JobId empty"
/* REXX */
/* Receive MAXRC out of SDSF...
You HAVE to use the IKJEFT01-JCL even if your main program doesn't use DB2-commands. An you have to bind a plan for this program. Ohterwise you cannot connect to the DB2-system an receive a SQL-Code -927.
Regards,
Thomas
Here is a JCL-sample for a program that uses DB2 itself or in a sub-program:
//GO EXEC PGM=IKJEFT01,DYNAMNBR=20,REGION=4M
//STEPLIB DD DISP=SHR,DSN=TEST.LM
// DD DISP=SHR,DSN=PROD.LM
// DD DISP=SHR,DSN=DBNT.DSNEXIT
// DD DISP=SHR,DSN=DBNT.DSNLOAD
//SYSOUT DD...
Hmmm...
First of all two questions:
1) Do you use a PREFIX and if YES did you write the filename in quotes '...'?
2) Where do you use the ISPSTART-Command? Do you invoke ISPF-Funktions or -Panels?
It should be working when you start a REXX with 'TSO rexxname'.
Try 'TSO ISRDDN' and look at...
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.