Home The Company Publications Products Links Tips Jobs

NAT1512 Under NAT413
WRITE FILE With Record Fomat VB

Last update: 7 April 2005

I experienced differences during parallel tests between production (NAT232) and development (NAT413) jobs, which are writing work files with record format VB.

Error message in development:

Logon accepted to library LIB1. 
NEXT PGM1 
PGM1 3770 NAT1512 Record too large for WORK file 2.
NEXT FIN 
NAT9978 Error occurred during execution/compilation. 

Production (NAT232) and development (NAT413) ran with same values

  • DCB specifications
  • NATPARM for BATCH workfile
  • Natural Sysparm

Program excerpt:

0570 1 #WORK-REC-2 (A20) 
0580 1 REDEFINE #WORK-REC-2 
0590 2 #ORDER-SOURCE (N6) 
0600 2 #SOLR-TYPE-CDE (A1) 
0610 2 #ACCT-NBR (N10) 
0620 2 #NBR-COPIES (N3) 

3770 WRITE WORK FILE 2 #WORK-REC-2

JCL from development

//CMWKF02 DD DSN=TEST.EXTRACT, 
// DCB=(LRECL=20,BLKSIZE=0,RECFM=VB), 
// SPACE=(CYL,(1,1),RLSE),DISP=(NEW,CATLG,DELETE) 

Dataset information, when it failed in development:
Organization . . . : PS 
Record format . . . : VB 
Record length . . . : 20 
Block size . . . . : 27998

JCL from production:
//CMWKF02 DD DSN=PROD.EXTRACT, 
// DCB=(LRECL=20,BLKSIZE=0,RECFM=VB), 
// SPACE=(CYL,(1,1),RLSE),DISP=(NEW,CATLG,DELETE) 

Dataset information, when it ran in production:
Organization . . . : PS 
Record format . . . : VB 
Record length . . . : 24 
Block size . . . . : 27998

NATPARM for development and production:
NTSYS BATCH, Batch 
'CC=ON,DU=ON,ECHO=OFF,IM=D,ITERM=ON,WH=ON,', 
'SORT=(WRKSIZE=256,STORAGE=MAIN,EXT=ON),', 
'PRINT=((1-31),AM=STD,OPEN=ACC,CLOSE=CMD,', 
'BLKSIZE=27998),', 
'WORK=((1-32),AM=STD,BLKSIZE=27998,', AM=OFF
'OPEN=OBJ,CLOSE=CMD),DELETE=OFF,', 
'PROFILE=BATCH' 

Natural sysparm profile for development and production:
BATCH IM=D

The only difference is that LRECL in production has been increased automatically by 4 bytes. Hmmm..... by Natural or the OP system?

Of course, I opened support request 572876. ServLine24 has several issues and solutions regarding NAT1512, but only one for NAT413 (TRUNC subparameter does not work).

Solution and explanation:

NAT228 and NAT232 allowed you to write 100 bytes (1 AREA (A100)) to a file defined as VB and LRECL=100, for example.

In NAT3 and higher, LRECL must be 104 or Natural will complain with NaT1512 (unless you use TRUNC=ON in which case the record will be truncated).

Another solution, I think a better one, is to include the new VMAX=NAT Natural parameter into the NTWORK macro. VMAX controls the LRECL setting for an output file with variable record format (RECFM=V). So you won't have to change your DCB in the JCL.

At this time (7 April 2005), VMAX=NAT doesn't work. I added 4 bytes to LRECL.

Top Page


Back to NATURAL Tips, Tricks, Techniques -- Overview