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
 

 

Word wrap utility in mainframe

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IBM Tools
View previous topic :: :: View next topic  
Author Message
pvivekkrishnan

New User


Joined: 24 Feb 2010
Posts: 6
Location: coimbatore

PostPosted: Wed Feb 24, 2010 12:00 pm    Post subject: Word wrap utility in mainframe
Reply with quote

Is there any utilty to mock the word-wrap functionality in mainframe?


I have queries that if uploaded into a PS file will have an LRECL of > 100.
Now i use the IKJEFT01 utility to load the data into the tables.however this utilty will take a ps of LRECL 80 at max.
So i need to convert the PS file of LRECL > 100 into one of LRECL 80 by doing a sort of word wrap.


Is there something that can help me? i prefer not using a macro for this .
Back to top
View user's profile Send private message

shobhit.baijal

New User


Joined: 27 Mar 2009
Posts: 6
Location: Chennai

PostPosted: Wed Feb 24, 2010 12:07 pm    Post subject:
Reply with quote

Quote:
I have queries that if uploaded into a PS file will have an LRECL of > 100.


Why don't you perform the word wrap before uploading?
Are you uploading from a text file or somewhere else?
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Wed Feb 24, 2010 12:09 pm    Post subject:
Reply with quote

Hello pvivekkrishnan,

Would you please rephase your problem? If I understand correctly you want to load db2 table using PS file but no sure what problem you are getting. It will be helpful if you provide Code as well .
Back to top
View user's profile Send private message
pvivekkrishnan

New User


Joined: 24 Feb 2010
Posts: 6
Location: coimbatore

PostPosted: Wed Feb 24, 2010 12:10 pm    Post subject:
Reply with quote

No that does not work as a word-wrap does not change the contents of the word/text doc. it merely formats and presents it in a different way. and were you to upload it after word-wrap, it still remains the same.
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Wed Feb 24, 2010 12:13 pm    Post subject:
Reply with quote

Still No luck ... Could you provide an example what you want to achieve?
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Wed Feb 24, 2010 12:17 pm    Post subject: Reply to: Word wrap utility in mainframe
Reply with quote

it might help if instead of a generic description
You would post a sample of the input and the expected output!
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Feb 24, 2010 12:33 pm    Post subject:
Reply with quote

I'm afraid that your problem is far from clear.
I have used IKJEFT01 to process records in excess of 100 bytes many times.

Perhaps if you gave us some useful information such as a detailed description of what you want to achieve, the code that you are using and the output from the failed runs would be a good start. Unfortunately psychic day was Monday this week.
Back to top
View user's profile Send private message
pvivekkrishnan

New User


Joined: 24 Feb 2010
Posts: 6
Location: coimbatore

PostPosted: Wed Feb 24, 2010 12:45 pm    Post subject:
Reply with quote

oK here is a sample:


I have a looong simple query that is
insert into abcdef.xyz (FFF_FF_FF_FF,FFF_FFFCGFGF_HHD,JJJJHHFJJEE_TKHKYP_IKHD,
FKJJKJEE_JKJRT_EJX_GHDHG,FEJHJHJHE_HJHJH_EKHX_DLHJHJHJY_RHJHT,
FEKHKKE_RT_EXHJHJH_CRJHJHJT_DT,FEHJHJHJHJE_RT_EX_CMHHJNHJHC_DT,
FEHJHJE_RHJHJT_DDDEX_SHHHHTO_DHT,FEHJHJHE_RTJHHJH_EX_DHJHJC,
LJHJHST_UPDHJHT_TS,LST_UPDT_USR_ID) VALUES(93232,11222,1,0.233335,3.15068493150685E-05,
'2220-12-23','2220-12-23',NULL,NULL,current timestamp,122);

Please copy paste this stuff in notepad/textpad without word wrap. and once you turn on word wrap that is how i want it to look.
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Wed Feb 24, 2010 12:54 pm    Post subject:
Reply with quote

Hello pvivekkrishnan,

So you are trying to run insert rather than Load . Suggest you to provide exact samle i/p file record length & format . Will be able to provid eyou sort card ...the output of which an be directly apply with Dsntiaul /dsnstep2
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Feb 24, 2010 1:01 pm    Post subject:
Reply with quote

expat wrote:
Perhaps if you gave us some useful information such as a detailed description of what you want to achieve, the code that you are using and the output from the failed runs would be a good start.

Please reread the extract from my original post above.
Please read it very very carefully.
Then take a look at what you have posted.
Where in my post was there a request for the input file.
Where is your post of the required information.

You state that you use IKJEFT01. Well that's really useful isn't it. I use it every single day at work but I bet that you have absolutely no ideas about what I do with it, do you ? .... Well maybe if you saw the code that is being executed it may give you a clue.

So far we know that you upload a file from a PC or server or somewhere. We also know that the LRECL is greater than 100, but you want it to be 80.
This is the sum of information that you think is required to help resolve your problem. Think again !!

Why must it be 80 bytes long.
What does IKJEFT01 do with the data.
What errors do you receive when processing.

Unless you bother to give us what we need to help, please do not expect any help.

I am sorry if I offend you, but IMHO this appears as yet another poorly thought out process with a set solution in mind that can not be deviated from.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Wed Feb 24, 2010 1:03 pm    Post subject: Reply to: Word wrap utility in mainframe
Reply with quote

since this is a MAINFRAME oriented forum,
wordpad/textpad are considered foul language icon_cool.gif

if You speak in TSO terms and wrap the sample with the Code tags
Your benevolence factor will raise a bit and You will get better help!

anyway the reformatting of the long string depends on the utility You will use to load the data

and eventually You will have to write a small REXX script to reformat properly

read the utility documentation about the rules for continuation statements
and have the script take that into account
Back to top
View user's profile Send private message
pvivekkrishnan

New User


Joined: 24 Feb 2010
Posts: 6
Location: coimbatore

PostPosted: Wed Feb 24, 2010 2:31 pm    Post subject:
Reply with quote

This is the jcl snippet i use

//JS0010 EXEC PGM=IKJEFT01,DYNAMNBR=20,
// REGION=4M
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD DISP=SHR,DSN=SNOBSI.NDFOR.UMFCK.OFF
//SYSTSIN DD *
DSN SYSTEM(XXXXX)
RUN PROGRAM(XXXXX) PLAN(XXXXX)
/*

and the data set info for the file is SNOBSI.NDFOR.UMFCK.OFF

Data class . . . . . : STANDARD
Organization . . . : PS
Record format . . . : FB
Record length . . . : 150
Block size . . . . : 6150
1st extent blocks . : 8

and when the jcl is run it won't take anything beyond the 80th column and that's why i have my query and if it is a matter of using a macro then thanks for the useless bit of info.

Please help if you real can
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Wed Feb 24, 2010 4:00 pm    Post subject: Reply to: Word wrap utility in mainframe
Reply with quote

Quote:
and if it is a matter of using a macro then thanks for the useless bit of info.


You asked for a solution, we are telling You that there is none and You are on Your own

Your <derogatory adjective> remark just means that we wasted our time trying to help You

when somebody asks what program are You using, it is because we willing to help You to find a solution
and expects to be told the program name , not a xxxxx stupidity

looks like that You do not deserve to be helped after all
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Wed Feb 24, 2010 6:44 pm    Post subject:
Reply with quote

pvivekkrishnan wrote:
oK here is a sample:

Quote:
I have a looong simple query that is

Word wrap works mostly on spaces and the commas....
If you need to split a long line, YOU need to address the "continuation" rules for the commands you are trying to split....
Does this make sense to you?
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Wed Feb 24, 2010 6:55 pm    Post subject:
Reply with quote

I regularly update MAINFRAME db2 tables using statements created on a toy windows machine on my desktop. I just create a TXT file with each record being a complete SQL statement with the terminating ";". I then define a file on the mainframe with RECFM=FB,LRECL=72 and then use FTP to transfer my TXT file from this toy computer to the real computer to the predefined file. I then define another file with RECFM=FB,LRECL=80 and copy the 72 byte file to the 80 byte file. The 80 byte file now contains sql statements in positions 1 - 72 and 73 - 80 which are not used are blank. I use the 80 byte file as input to "IKJEFT01".
Back to top
View user's profile Send private message
pvivekkrishnan

New User


Joined: 24 Feb 2010
Posts: 6
Location: coimbatore

PostPosted: Thu Feb 25, 2010 9:07 am    Post subject:
Reply with quote

Craq Giegerich & CICS Guy

Thanks,

This is what i was looking for and i am able to do it albeit with a little tweaks on the LRECL for aligning along the commas.

Anway will be able to work forward from here.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Thu Feb 25, 2010 11:44 pm    Post subject:
Reply with quote

pvivekkrishnan wrote:
Craq Giegerich & CICS Guy

Thanks,

This is what i was looking for and i am able to do it albeit with a little tweaks on the LRECL for aligning along the commas.

Anway will be able to work forward from here.


Why? This works just fine!

Code:
INSERT INTO DB2TST1.XXXTABL2 (DUE_DATE, EXTRACT_DATE, BEGIN_DATE, END_DA
E, ADDED_USERID, ADDED_TS, ADDED_PROGRAM) VALUES ( '08/17/2009', '07/01/
2009', '08/01/2009', '08/07/2009', USER, CURRENT TIMESTAMP, 'SPUFI');   
INSERT INTO DB2TST1.XXXTABL2 (DUE_DATE, EXTRACT_DATE, BEGIN_DATE, END_DA
E, ADDED_USERID, ADDED_TS, ADDED_PROGRAM) VALUES ( '08/24/2009', '07/01/
2009', '08/08/2009', '08/17/2009', USER, CURRENT TIMESTAMP, 'SPUFI');   
Back to top
View user's profile Send private message
pvivekkrishnan

New User


Joined: 24 Feb 2010
Posts: 6
Location: coimbatore

PostPosted: Fri Feb 26, 2010 8:17 am    Post subject:
Reply with quote

wow , i got this error on trying

insert into E34343.xxxxx_xXX_Xxxx (xxx_xx_xxxxx,xxx_xxxx_xx,y
yy_yyy_yy,zzz_zz_zz_zzzz_zz,aaaaaa_aa_aaa_aa,bbb_bb_bb_bbb_b
b,ccc_cc_cc_cccc_cc,dd_dd_dd_dddd_dd,eee_ee_Ee_eeee,LST_UPD
T_TS,LST_UPDT_USR_ID) VALUES(9884,17007,1,0.005,1.3698630136
9863E-05,'2010-01-25','2010-01-25',NULL,NULL,current timesta
mp,16);
QLERROR ON insert COMMAND, PREPARE FUNCTION
RESULT OF SQL STATEMENT:
DSNT408I SQLCODE = -104, ERROR: ILLEGAL SYMBOL "yy_yyy_yy". SOME SYMBOLS THAT
DSNT418I SQLSTATE = 42601 SQLSTATE RETURN CODE
DSNT415I SQLERRP = DSNHPARS SQL PROCEDURE DETECTING ERROR



What am i doing wrong here??

also can one avoid the auto update feature of IKJEFT01
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 -> IBM Tools All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Urgent Mainframe Requirments (2-10 yr... Shankar779 Mainframe Jobs 0 Sun Nov 27, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. Mainframe Developer requirement in Ku... capricorn Mainframe Jobs 0 Sun Oct 23, 2016 3:49 pm
No new posts Best IMS DB Unload Utility jjabez10 IMS DB/DC 12 Thu Sep 22, 2016 11:15 pm
No new posts Interface from Mainframe to Confluenc... hblun CLIST & REXX 4 Tue Sep 20, 2016 5:47 pm
This topic is locked: you cannot edit posts or make replies. Mainframe Admin Openings with CTS enikhilk Mainframe Jobs 0 Tue Sep 13, 2016 10:13 am


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