DSNUTILB load
Select messages from
# through # FAQ
[/[Print]\]

MVSFORUMS.com -> Database

#1: DSNUTILB load Author: misi01Location: Stockholm, Sweden PostPosted: Tue Nov 17, 2015 7:47 am
    —
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 ?

#2:  Author: William Collins PostPosted: Tue Nov 17, 2015 8:20 am
    —
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).

#3:  Author: misi01Location: Stockholm, Sweden PostPosted: Tue Nov 17, 2015 8:29 am
    —
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]

#4:  Author: misi01Location: Stockholm, Sweden PostPosted: Tue Nov 17, 2015 8:29 am
    —
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

#5:  Author: William Collins PostPosted: Tue Nov 17, 2015 8:34 am
    —
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.

#6:  Author: William Collins PostPosted: Tue Nov 17, 2015 8:40 am
    —
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.

#7:  Author: kolusuLocation: San Jose PostPosted: Tue Nov 17, 2015 11:11 am
    —
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.

#8:  Author: kolusuLocation: San Jose PostPosted: Tue Nov 17, 2015 12:28 pm
    —
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.

#9:  Author: misi01Location: Stockholm, Sweden PostPosted: Tue Nov 24, 2015 4:41 am
    —
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.



MVSFORUMS.com -> Database


output generated using printer-friendly topic mod. All times are GMT - 5 Hours

Page 1 of 1

Powered by phpBB © 2001, 2005 phpBB Group