RE: SQL in CL

DBelcher

Active Member
RE: SQL in CL

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C05097.70CC300C
Content-Type: text/plain;
charset="iso-8859-1"

Vimal,

Yes it is possible. Now that I've answered that question ;) I have a
question for you...what do you want to do, i.e. updates, deletes, inserts,
etc.. The code below will accomplish deletes

(This line is in a CL)
RUNSQLSTM SRCFILE(KVGEN/QSQLSRC)SRCMBR(DBAYREPETH) COMMIT(*NONE)

(This line is in the source file with a member name of DBAYREPETH)
DELETE FROM ICSDBETH/DBAYREP WHERE AYJGS2='A' and AYASCD=1999

I've also written CL where I defined (DCLF) and read a file (RCVF) that
contained information that I then provided to a RUNSQLSTM statement, such as
library name and file name of a target file, and library name and file name
of an SQL statement. It wasn't very hard to figure out once I got over the
"hump" of realizing I had to use the combination of RUNSQLSTM with a source
member.

HTH

Doug Belcher
KV Pharmaceutical
St Louis MO
Opinions expressed are not necessarily those of my employer


>

Doug Belcher
St Louis MO
Opinions expressed are not necessarily those of my employer
 
Doug,

Just a thought - you might want to consider setting up your CLP to take advantage of JDE's Dreamwriter, and then pass the file & library names to your CLP via processing options. One advantage to this is the info is more readily visible to you w/o having to look up the file name containing this info, etc. Also, you can have different versions point to different SQL source members!

Regards,


Sally White
SJSoftware, LLC
 
Back
Top