IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Inserting records with semicolon


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Sriram K

New User


Joined: 17 Feb 2009
Posts: 32
Location: Bangalore

PostPosted: Tue May 05, 2009 7:13 pm
Reply with quote

//STEP0035 EXEC PGM=IKJEFT01,DYNAMNBR=20
//STEPLIB DD DSN=S*.***.DSNEXIT,DISP=SHR
// DD DSN=S*.***.DSNLOAD,DISP=SHR
// DD DSN=LOADLIB,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD DSN=OUTPUT.FILE
//
//SYSUDUMP DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD DSN=INPUT.FILE
//SYSTSIN DD *
DSN SYSTEM(TESTING)
RUN PROGRAM(****) PLAN(****)


With the help of the above step im trying to insert a record into the table. Record has name, address, city etc.. And when the address is entered as 123; street - that particular record is giving error since it found ';' in the
insert query.

SQLCODE = -010. String not terminated. But the same is working in spufi.

Let me know how to handle the records when it encounters semicolon (;) inbetween.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Tue May 05, 2009 7:30 pm
Reply with quote

You are not telling anything useful!
what program are You using for the update ??

technically correct, but useless advice... fix the program icon_biggrin.gif
Back to top
View user's profile Send private message
Debasis Misra
Warnings : 1

New User


Joined: 16 Sep 2008
Posts: 72
Location: Bangalore

PostPosted: Wed May 06, 2009 2:12 pm
Reply with quote

My unserstanding:

Sriram K is trying to insert the records in the DB2 table by the utility IKJEFT01.

Here,
INPUT.FILE --- will contain the data in the DB2 query form
(generally what we are executing in the spufi).
OUTPUT.FILE -- will contains the information about the execution of the
query.
(generally what we are getting in the spufi o/p).

Now, in the query with which value or string he is trying to update a particular field, that string contains semicolon (;), like he is trying to insert a row where the ADDRESS coloumn will be populated by the string
"123; street".

In this string semicolon(;) is there, so its terminating the query.

But if he is trying to execute the same query with the ADDRESS coloumn as "123; street" in the spufi, he is able to do it.

--------
Hi Sriram K,

Please response to my understanding ASAP, if its not correct please explain it properly to get the correct answer.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Wed May 06, 2009 2:28 pm
Reply with quote

Hi Debasis ! Your understanding is wrong icon_biggrin.gif

IKJEFT01 itself will do nothing

the execution chain is ...
IKJEFT01 TMP ( terminal monitor program, TSO )
DSN ( command )to identify/setup the DB2 environment to be used
RUN ( comman ) to run/execute a program with a certain plan ( from a certain library )

the responsibility for reading/validating the input, and building the proper DB2 queries ( read/updates) is solely into the program

The OP/TS does not tell what program he is using for the task
so we do not know what should be the content of the input file

again he did not tell really anything useful
SPUFI processes the query correctly , ( gives the expected result )
it means that SPUFI parses correctly the input and builds the proper query
so SPUFI works the proper way nd does not have to be fixed icon_biggrin.gif icon_biggrin.gif

the program whose name is still unknown
Quote:
RUN PROGRAM(****) PLAN(****)

does not process the query correctly ( does not give the expected results )
it means that ***** as the TS calls it
does not parse/process correctly the input,
does not build the proper query....
so it needs to be fixed

edited to add one more comment
or if the **** program being excuted is a general purpose DB2 application,
then the input is not built according to the
program specifications and needs to be reviewed.
but again since the TS simply told us that an unknown program
gives bad results
there is no advice we can give
Back to top
View user's profile Send private message
Sriram K

New User


Joined: 17 Feb 2009
Posts: 32
Location: Bangalore

PostPosted: Wed May 06, 2009 2:28 pm
Reply with quote

Hi debasis,

Your understanding is correct.
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Wed May 06, 2009 3:30 pm
Reply with quote

Sriram K,
Quote:
Hi debasis,

Your understanding is correct.

I hope this is not a quiz show.
Because, i understood exactly the way enrico explained.

By any chance does you 4'stars contain DSNTEP2.

Thank You,
Sushanth
Back to top
View user's profile Send private message
Debasis Misra
Warnings : 1

New User


Joined: 16 Sep 2008
Posts: 72
Location: Bangalore

PostPosted: Wed May 06, 2009 3:41 pm
Reply with quote

Its, DSNTIAD.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Wed May 06, 2009 3:46 pm
Reply with quote

I am baffled icon_biggrin.gif
How does Debasis know what program Sriram is trying to use

Psychic day, I suppose
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Wed May 06, 2009 3:51 pm
Reply with quote

Me to wondering about the same thing enrico,

Debasis you can ask SRIRAM to try this link

Post you errors with TSO command you tried, it you get any.

Thank You,
Sushanth
Back to top
View user's profile Send private message
Debasis Misra
Warnings : 1

New User


Joined: 16 Sep 2008
Posts: 72
Location: Bangalore

PostPosted: Wed May 06, 2009 4:05 pm
Reply with quote

previously we have worked on same project so.. icon_biggrin.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Wed May 06, 2009 4:20 pm
Reply with quote

it does not mean that You know what Sriram is doing/trying to do now icon_evil.gif
Back to top
View user's profile Send private message
Sriram K

New User


Joined: 17 Feb 2009
Posts: 32
Location: Bangalore

PostPosted: Wed May 06, 2009 5:25 pm
Reply with quote

Since i knew debasis before i have informed him about this issue. So he got to know about that.

--

And the details are below:

RUN PROGRAM(DSNTIAD) PLAN(DSNTIAD)
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Wed May 06, 2009 5:42 pm
Reply with quote

the link provided by sushanth bobby pin points the issue.
no reason that You could not have found Yourself by reading the docs
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Join multiple records using splice DFSORT/ICETOOL 5
No new posts EZT program to build a flat file with... All Other Mainframe Topics 9
No new posts JCL sortcard to print only the records DFSORT/ICETOOL 11
Search our Forums:

Back to Top