View previous topic :: View next topic |
Author |
Message |
misi01 Advanced
Joined: 02 Dec 2002 Posts: 616 Topics: 171 Location: Stockholm, Sweden
|
Posted: Tue Nov 17, 2015 7:47 am Post subject: DSNUTILB load |
|
|
I'm confused with this. I've run The basic table is defined as:-
Code: | CREATE TABLE system.tablename
(
LÖPNR_KONSTANT CHAR(2) NOT NULL
,KONSTANTTEXT CHAR(250) NOT NULL
)
|
If I run an unload using DNSUTILB against the table, I get a file that is RECFM VB and LRECL 256.
Now to the strange part (to my way of thinking). If I now LOAD the table using the following
Code: |
//SYSRECAC DD DSN=MISI01.HAFO.Q25X0200.VARIABLE,DISP=SHR
//*
//SYSUT1 DD UNIT=SYSDA,SPACE=(4000,(20,20),,,ROUND)
//SYSPRINT DD SYSOUT=*
//UTPRINT DD SYSOUT=*
//* THIS TABLE IS ONE OF MANY IN THE SAME TABLESPACE
//* FOR THIS REASON, YOU SHOULD DELETE THE CONTENTS (IF REQUIRED)
//* BEFORE RUNNING THIS JCL
//SYSIN DD *
LOAD DATA INDDN(SYSRECAC) RESUME YES LOG NO NOCOPYPEND
EBCDIC CCSID(00278,00000,00000)
INTO TABLE system.tablename
(
"LÖPNR_KONSTANT" POSITION (1) CHAR(2)
,KONSTANTTEXT POSITION (3) CHAR(250)
)
/*
//*
|
I get an error
Quote: |
INPUT FIELD 'KONSTANTTEXT' NOT ENTIRELY WITHIN INPUT RECORD
|
for LOADS of records.
(I've even tried changing the 250 to 100 and still get the same error).
Any suggestions ? _________________ Michael |
|
Back to top |
|
|
William Collins Supermod
Joined: 03 Jun 2012 Posts: 437 Topics: 0
|
Posted: Tue Nov 17, 2015 8:20 am Post subject: |
|
|
Have you looked at the content of the dataset from the unload? I'd suspect the records are variable-length, implying loss of trailing data, like blanks or binary zeros.
The LRECL of 256 is four for the RDW and 252 for the data, which is makes sense, but not why they are variable-length.
So, what does the unload step look like, and what messages were produced?
If you need to get the load going, DFSORT to the rescue:
Code: | OPTION COPY
INREC OVERLAY=(257:X)
OUTFIL VTOF,BUILD=(5,252) |
That will first make a record 257 bytes long, with any intervening positions between the end of the input record also being set to blank.
The OUTFIL will then convert to fixed-length records, and the BUILD only includes the original data (ignoring the spare blank from the OVERLAY). |
|
Back to top |
|
|
misi01 Advanced
Joined: 02 Dec 2002 Posts: 616 Topics: 171 Location: Stockholm, Sweden
|
Posted: Tue Nov 17, 2015 8:29 am Post subject: |
|
|
Nice idea William (I'd suspect the records are variable-length, implying loss of trailing data, like blanks or binary zeros.)
These are the firt records from the DFSORT job
Quote: |
256 |01 ` Ö ` %
256 |02051010039050030055019012080082053054029018013083001014
256 |03025032018
256 |0400HAFO STÖF1994-09-141994-09-1419325536
256 |05 ê<602E000ä000ä000ä000ä000ä000ä000ä000ä000ä000ä000ä000ä000ä000ä000ä00
|
Question is, should it be 252 rather than 256 ? (At the end of the day, my confusion remains. If I use an IBM utility to unload a table, it seems strange that I don't seem to be able to use the same utility to REload the table)[/quote] _________________ Michael |
|
Back to top |
|
|
misi01 Advanced
Joined: 02 Dec 2002 Posts: 616 Topics: 171 Location: Stockholm, Sweden
|
Posted: Tue Nov 17, 2015 8:29 am Post subject: |
|
|
BTW. Is it just me or is the Preview button playing silly b*ggers. I never get to see a preview of what I'm appending; totally empty _________________ Michael |
|
Back to top |
|
|
William Collins Supermod
Joined: 03 Jun 2012 Posts: 437 Topics: 0
|
Posted: Tue Nov 17, 2015 8:34 am Post subject: |
|
|
It's not just you. I edited your original post to put another set of code tags on, tried the Preview and thought I'd pickled it entirely. Preview is not currently working. |
|
Back to top |
|
|
William Collins Supermod
Joined: 03 Jun 2012 Posts: 437 Topics: 0
|
Posted: Tue Nov 17, 2015 8:40 am Post subject: |
|
|
The data part of the record starts at position five, and the LRECL (maximum record-length) is 256. Your two columns are two and 250. Everything points to it should be 252.
Why the unload is giving you variable-length data is a good question, which is why I was interested in the control cards and output from that step. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12359 Topics: 75 Location: San Jose
|
Posted: Tue Nov 17, 2015 11:11 am Post subject: |
|
|
misi01,
Look at the SYSPUNCH dataset from your UNLOAD step which will show you the positions of the data being unloaded. I am guessing that you have TEMPLATE which is defined as Variable for Unload. Ideally I would use DSNTIAUL utility to unload.
On the Preview issue, I am going to look into and try to fix it. _________________ Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12359 Topics: 75 Location: San Jose
|
Posted: Tue Nov 17, 2015 12:28 pm Post subject: |
|
|
test to check if the preview is working
Looks like I fixed the issue. Any new post can viewed with preview. I will work on fixing on the older posts too
checking if I can preview this post after posting. Looks like I can preview the posting. _________________ Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
misi01 Advanced
Joined: 02 Dec 2002 Posts: 616 Topics: 171 Location: Stockholm, Sweden
|
Posted: Tue Nov 24, 2015 4:41 am Post subject: |
|
|
It seems the problem was the fact that I was creating the file in MFE (Mainframe Express) and uploading it to the mainframe. Trouble with that was that the resulting file really was a variable length one, so each record was "chopped" after the last significant character.
When I then unloaded/reloaded from within TSO, no problems. _________________ Michael |
|
Back to top |
|
|
|
|