MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

DSNUTILB load

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
misi01
Intermediate


Joined: 02 Dec 2002
Posts: 332
Topics: 80
Location: Stockholm, Sweden

PostPosted: Tue Nov 17, 2015 7:47 am    Post subject: DSNUTILB load Reply with quote

I'm confused with this. I've run The basic table is defined as:-

Code:
CREATE TABLE system.tablename
  ( 
    LPNR_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                                 
       (                                                         
         "LPNR_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
View user's profile Send private message Send e-mail
William Collins
Supermod


Joined: 03 Jun 2012
Posts: 437
Topics: 0

PostPosted: Tue Nov 17, 2015 8:20 am    Post subject: Reply with quote

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
View user's profile Send private message
misi01
Intermediate


Joined: 02 Dec 2002
Posts: 332
Topics: 80
Location: Stockholm, Sweden

PostPosted: Tue Nov 17, 2015 8:29 am    Post subject: Reply with quote

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 STF1994-09-141994-09-1419325536
256 |05 <602E00000000000000000000000000000000000000000000000


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
View user's profile Send private message Send e-mail
misi01
Intermediate


Joined: 02 Dec 2002
Posts: 332
Topics: 80
Location: Stockholm, Sweden

PostPosted: Tue Nov 17, 2015 8:29 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
William Collins
Supermod


Joined: 03 Jun 2012
Posts: 437
Topics: 0

PostPosted: Tue Nov 17, 2015 8:34 am    Post subject: Reply with quote

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
View user's profile Send private message
William Collins
Supermod


Joined: 03 Jun 2012
Posts: 437
Topics: 0

PostPosted: Tue Nov 17, 2015 8:40 am    Post subject: Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 11813
Topics: 74
Location: San Jose

PostPosted: Tue Nov 17, 2015 11:11 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 11813
Topics: 74
Location: San Jose

PostPosted: Tue Nov 17, 2015 12:28 pm    Post subject: Reply with quote

test to check if the preview is working

Code:


test


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
Back to top
View user's profile Send private message Send e-mail Visit poster's website
misi01
Intermediate


Joined: 02 Dec 2002
Posts: 332
Topics: 80
Location: Stockholm, Sweden

PostPosted: Tue Nov 24, 2015 4:41 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group