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
 

 

How can i insert Long string through JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Rajen

New User


Joined: 05 May 2005
Posts: 61

PostPosted: Sat Nov 04, 2006 6:14 pm    Post subject: How can i insert Long string through JCL
Reply with quote

Hi Can anyone please tell me how can i insert Long string through JCL SYSTSIN parameter.

I have to insert a long error message in DB2 table.

Example query is given below.

INSERT INTO table
error_message
VALUES ( 'please enter date...(some big message) in valid format -- yyyy/mm/yy')


Now the problem with this message is, it is going beyong 72th (even 80th) column and i need to continue this error message in the next line.

Can anyone tell me how to give continuation in SYSTSIN in JCL?

I tried with continuation at 72th column but its abending giving message like ' Passing string too long'
Back to top
View user's profile Send private message

priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Sat Nov 04, 2006 11:17 pm    Post subject: Re: Inserting Record Thru JCL
Reply with quote

Try like this... putting a plus sign at last for continuation...

Code:
INSERT INTO table
error_message
VALUES ( 'please enter date...(some big message) in +                           
valid format -- yyyy/mm/yy')
Back to top
View user's profile Send private message
Rajen

New User


Joined: 05 May 2005
Posts: 61

PostPosted: Mon Nov 06, 2006 5:16 pm    Post subject: Re: How can i insert Long string through JCL
Reply with quote

Hi Priyesh,
Thanks A lot for reply.

Can you please tell me where should i place that plus '+' sign.

I think it should be at 72th column but just to make sure i am asking.

Thanks,
Rajen.
Back to top
View user's profile Send private message
Kevin

Active User


Joined: 25 Aug 2005
Posts: 234

PostPosted: Mon Nov 06, 2006 6:41 pm    Post subject: Re: How can i insert Long string through JCL
Reply with quote

You could also just make the dataset's LRECL larger, so that you might be able to fit the data on one record.

Just a thought.
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Tue Nov 07, 2006 2:30 am    Post subject: Re: How can i insert Long string through JCL
Reply with quote

Do you really need a continuation. Below query works just fine for me.

Code:
=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
****** ***************************** Top of Data ******************************
000010    INSERT INTO CREATOR.TABLE_NAME
000012    VALUES ('PRIYESH TST',1,'THIS IS A TEST RECORD PLEASE IGNORE THE SAME
000013 , DONT CONSIDER');                                                     
Back to top
View user's profile Send private message
Rajen

New User


Joined: 05 May 2005
Posts: 61

PostPosted: Wed Nov 08, 2006 4:53 pm    Post subject: Re: How can i insert Long string through JCL
Reply with quote

Hi Priyesh,
Thanks again for reply.
I guess u have used comma (,) on 7th or 8th charactor. Earlier i mentioned about that continuation charactor.
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Thu Nov 09, 2006 4:34 am    Post subject: Re: How can i insert Long string through JCL
Reply with quote

Hi Rajen,

That comma (",") is a part of my string to be loaded onto Table, not a continuation character. Thus my field value after upload would looks like below.

Code:
THIS IS A TEST RECORD PLEASE IGNORE THE SAME  , DONT CONSIDER
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Replacing same string with different ... vickey_dw DFSORT/ICETOOL 6 Wed Feb 22, 2017 10:44 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm
This topic is locked: you cannot edit posts or make replies. How to move a long alphanumeric data ... lind sh COBOL Programming 8 Mon Dec 05, 2016 7:51 pm
This topic is locked: you cannot edit posts or make replies. Checking wether a string starts from ... sundaram.naveen CLIST & REXX 9 Thu Oct 06, 2016 11:56 am
No new posts Insert Lines in JCL with Rexx after a... Willy Jensen CLIST & REXX 3 Tue Aug 30, 2016 4:18 pm


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