Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Inserting records with semicolon

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Inserting records with semicolon
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Tue May 05, 2009 7:30 pm    Post subject: Reply to: Inserting records with semicolon
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Wed May 06, 2009 2:28 pm    Post subject: Reply to: Inserting records with semicolon
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    Post subject:
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: 1013
Location: India

PostPosted: Wed May 06, 2009 3:30 pm    Post subject:
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    Post subject:
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Wed May 06, 2009 3:46 pm    Post subject: Reply to: Inserting records with semicolon
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: 1013
Location: India

PostPosted: Wed May 06, 2009 3:51 pm    Post subject:
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Wed May 06, 2009 4:20 pm    Post subject: Reply to: Inserting records with semicolon
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Wed May 06, 2009 5:42 pm    Post subject: Reply to: Inserting records with semicolon
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm
No new posts how to split records based on specifi... Venkata Ramayya DFSORT/ICETOOL 6 Wed Sep 28, 2016 3:20 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us