IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Overcome OUTREC - SHORT RECORD Problem.


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Thu Mar 11, 2010 4:17 pm
Reply with quote

Hi,

I am trying the below given SORT job on a VB file with LRECL of 140 but ending up with "OUTREC - SHORT RECORD" error.

Code:

//STEP0001 EXEC PGM=SORT                               
//SORTIN   DD DSN=INPUT.FILE.D0311,
//            DISP=(SHR,KEEP,KEEP)                     
//SORTOUT  DD DSN=&&TEMP1,                             
//            DISP=(NEW,PASS,DELETE),                 
//            UNIT=SYSDA,                         
//            SPACE=(TRK,(1,1),RLSE),                 
//            DCB=(RECFM=VB,LRECL=140,BLKSIZE=0)       
//SYSOUT   DD SYSOUT=*                                 
//SYSIN    DD  *                                       
 SORT FIELDS=COPY                                     
 INCLUDE COND=(24,2,CH,EQ,C'01',AND,                   
               45,10,CH,EQ,C' ',AND,                   
               65,10,CH,EQ,C' ')                       
 OUTFIL OUTREC=(1,4,13X,18,6,117X)                     
//*                                             
//STEP0002 EXEC PGM=ICETOOL                             
//TOOLMSG  DD SYSOUT=*                                 
//DFSMSG   DD SYSOUT=*                                 
//INF1     DD DSN=&&TEMP1,                             
//            DISP=(OLD,PASS,DELETE)                   
//INF2     DD DSN=INPUT.FILE.D0311,
//            DISP=(SHR,KEEP,KEEP)                     
//TMPF     DD DSN=&&TEMP2,                             
//            DISP=(MOD,PASS,DELETE),                   
//            SPACE=(CYL,(100,100),RLSE)               
//OUTF     DD SYSOUT=*                 
//TOOLIN   DD *                                                         
 COPY FROM(INF1) TO(TMPF) USING(RAM1)                                   
 COPY FROM(INF2) TO(TMPF) USING(RAM2)                                   
 SPLICE FROM(TMPF) TO(OUTF) ON(18,6,CH) WITHALL WITH(1,141) USING(RAM3)
//RAM1CNTL DD *                                                         
 OUTFIL FNAMES=TMPF,BUILD=(1,4,5,136,C'BB')                             
/*                                                                     
//RAM2CNTL DD *                                                         
 OUTFIL FNAMES=TMPF,BUILD=(1,4,5,136,C'VV')                             
/*                                                                     
//RAM3CNTL DD *                                                         
 OUTFIL FNAMES=OUTF,INCLUDE=(141,2,CH,EQ,C'VB')                         
//                                                 


Would you please let me know where I am going wrong?

Thanks in advance.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Mar 11, 2010 4:49 pm
Reply with quote

Are you sure you have input records satifying the criteria? As this has something to do with the options to handle short records in your VB file.

You've two steps coded, so, without looking at SYSOUT we can not tell which step has thrown the error, please post the SYSOUT.

Off hand, you may try this
Code:
EXEC PGM=SORT,PARM='VLTESTI=2'
When VLTESTI=2 is specified, SyncSort will treat comparisons to fields not completely contained within the record as false and decide a record’s status for inclusion or omission from fields that are available.
Back to top
View user's profile Send private message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Thu Mar 11, 2010 5:13 pm
Reply with quote

Hi,

Thanks for the suggetion. The error is coming out of STEP0002.

Code:

WER428I  CALLER-PROVIDED IDENTIFIER IS "0002"                           
WER276B  SYSDIAG= 73354, 640421, 640421, 1178748                       
WER164B  6,904K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,     
WER164B     0 BYTES RESERVE REQUESTED, 1,112,850 BYTES USED             
WER146B  12K BYTES OF EMERGENCY SPACE ALLOCATED                         
WER108I  INF2     : RECFM=VB   ; LRECL=   140; BLKSIZE= 27998           
WER110I  TMPF     : RECFM=VB   ; LRECL=   142; BLKSIZE= 27998           
WER410B  5,876K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,
WER410B     0 BYTES RESERVE REQUESTED, 103,514 BYTES USED               
WER244A  TMPF     OUTREC - SHORT RECORD                                 
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE                           


Please suggest how to use 'VLTESTI=2' option with Synctool.

Thanks.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Thu Mar 11, 2010 5:14 pm
Reply with quote

This has nothing to do with the error message, but why dont you use JOINKEYS as you have Syncsort JOIN readily available.
Do you really need a SYNCTOOL SPLICE here?

Also you have padded a VB record at the end which SHOULD NOT be done. If you want to add indicators to a VB record, it should be done at the beginning and not at the end.
Back to top
View user's profile Send private message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Thu Mar 11, 2010 5:44 pm
Reply with quote

Hi, Arun.

Of course, I have used JOIN and got the result. The design document needs to show at least two possibilities to be chosen by customer. Otherwise it will be rejected outright. They demanded a Ezytrieve (which I don't know) or COBOL solution (which takes lot of lines). They believe that SORT is a third party utility and may be removed anytime in future !!!

Please help me to mend my SORT job.

Thanks.
Back to top
View user's profile Send private message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Thu Mar 11, 2010 5:54 pm
Reply with quote

Arun.

I tried it with adding the indicators at the beginning but ended up with same U0016 abend.

Code:

//TOOLIN   DD *                                                       
 COPY FROM(INF1) TO(TMPF) USING(RAM1)                                 
 COPY FROM(INF2) TO(TMPF) USING(RAM2)                                 
 SPLICE FROM(TMPF) TO(OUTF) ON(18,6,CH) WITHALL WITH(1,341) USING(RAM3)
//RAM1CNTL DD *                                                       
 OUTFIL FNAMES=TMPF,BUILD=(1,4,C'BB',5,136)                           
/*                                                                     
//RAM2CNTL DD *                                                       
 OUTFIL FNAMES=TMPF,BUILD=(1,4,C'VV',5,136)                           
/*                                                                     
//RAM3CNTL DD *                                                       
 OUTFIL FNAMES=OUTF,INCLUDE=(1,2,CH,EQ,C'VB')                         
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Mar 11, 2010 9:07 pm
Reply with quote

Hello,

Quote:
They believe that SORT is a third party utility and may be removed anytime in future !!!
Yes, your/their sort product might be replaced one day - it will not be removed outright.

Why would replacing the sort product be an issue?

Quote:
COBOL solution (which takes lot of lines.
It doesn't have to. . . In fact, this type of requirement is so common that many places have a "shell" module that can be easily cloned for new requirements. There is a "sticky" near the top of the COBOL part of the forum that will match/merge 2 files. It works as is and would only need to be changed to accomodate your specifics. Maybe this can help you.
Back to top
View user's profile Send private message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Thu Mar 11, 2010 9:56 pm
Reply with quote

Thank you.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Mar 12, 2010 12:40 am
Reply with quote

You're welcome - good luck icon_smile.gif

d
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Fri Mar 12, 2010 1:51 pm
Reply with quote

Code:
//RAM1CNTL DD *                                                       
 OUTFIL FNAMES=TMPF,BUILD=(1,4,C'BB',5,136)                           
/*                                                                     
//RAM2CNTL DD *                                                       
 OUTFIL FNAMES=TMPF,BUILD=(1,4,C'VV',5,136)                           
/*
I dont think there is really a need to provide some approach which involves multiple passes of data just to make somebody happy.
And here since your output file is VB, you DONT need to specify the length as you never know where the data ends. You can simply omit the length field.
Code:
//RAM1CNTL DD *                                                       
 OUTFIL FNAMES=TMPF,BUILD=(1,4,C'BB',5)                           
/*       
Quote:
COBOL solution (which takes lot of lines
And the lines does nt matter. Do you prefer a few lines of code which performs badly or a lengthy program which does well?
Back to top
View user's profile Send private message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Fri Mar 12, 2010 4:03 pm
Reply with quote

Hi, Arun.

Thanks for the suggestion. I will try it out.
Back to top
View user's profile Send private message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Fri Mar 12, 2010 9:03 pm
Reply with quote

Hi, Arun.

I have tried it the way you suggested. The job has completed successfully but I have not got the expected results. I think there is something wrong the way I used the values with SPLICE parameter.

Input File Data:
Code:

----+----1----+----2----+----3----+----4----+----5----+----6----+----
ABB AG3 AQQ  AQ4ARN01 AR9 AXE AY0 A45 BS          1 BTV BZ5
ABB AG3 AQQ  AQ4ARN02 AR9 AXE AY0 A45 BS          1 BTV BZ5
ABB AG3 AQQ  AQ4ARN03 AR9 AXE AY0 A45 BS          1 BTV BZ5
AG2 AR9 ASF  BZYB3201 B33 CF5 C5M C60 DH6666666666FLT GT5555555555555
AG2 AR9 ASF  BZYB3202 B33 CF5 C5M C60 DH6666666666FLT GT5555555555555
AG1 AH5 AQ5  AQ6ARS01 AR9 AXE AY0 BS1 BZ          4 B37
AG1 AH5 AQ5  AQ6ARS02 AR9 AXE AY0 BS1 BZ          4 B37
AG1 AH5 AQ5  AQ6ARS03 AR9 AXE AY0 BS1 BZ          4 B37
AG1 AH5 AQ5  AQ6ARS04 AR9 AXE AY0 BS1 BZ          4 B37
US8 U2K U80  VK3VQ390 V2P WTC W49 1CX 1S8Z9C0TB7F639C 58UIJHG01010101
US8 U2K U80  VK3VQ391 V2P WTC W49 1CX 1S8Z9C0TB7F639C 58UIJHG01010101


Expected output:
Code:

ABB AG3 AQQ  AQ4ARN01 AR9 AXE AY0 A45 BS          1 BTV BZ5
ABB AG3 AQQ  AQ4ARN02 AR9 AXE AY0 A45 BS          1 BTV BZ5
ABB AG3 AQQ  AQ4ARN03 AR9 AXE AY0 A45 BS          1 BTV BZ5
AG1 AH5 AQ5  AQ6ARS01 AR9 AXE AY0 BS1 BZ          4 B37
AG1 AH5 AQ5  AQ6ARS02 AR9 AXE AY0 BS1 BZ          4 B37
AG1 AH5 AQ5  AQ6ARS03 AR9 AXE AY0 BS1 BZ          4 B37
AG1 AH5 AQ5  AQ6ARS04 AR9 AXE AY0 BS1 BZ          4 B37


Please suggest the changes to be made to my sort card.

Thanks.
Back to top
View user's profile Send private message
Uday Kumar R

New User


Joined: 07 Nov 2007
Posts: 27
Location: Mumbai

PostPosted: Mon Mar 15, 2010 5:24 pm
Reply with quote

Hello,

By looking into the data & expected result (upto 60cols), by doing small modification at step001 sort card would provie the expected result.

//STEP0001 EXEC PGM=SORT
//SORTIN DD DSN=INPUT.FILE.D0311,
// DISP=(SHR,KEEP,KEEP)
//SORTOUT DD DSN=<Output dataset name>,
// DISP=(NEW,PASS,DELETE),
// UNIT=SYSDA,
// SPACE=(TRK,(1,1),RLSE),
// DCB=(RECFM=VB,LRECL=140,BLKSIZE=0)
//SYSOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
INCLUDE COND=(45,10,CH,EQ,C' ',AND,
65,10,CH,EQ,C' ')
/*

Thank you.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Tue Mar 16, 2010 7:02 pm
Reply with quote

ramsri wrote:
I have tried it the way you suggested. The job has completed successfully but I have not got the expected results. I think there is something wrong the way I used the values with SPLICE parameter.
ramsri,

Your initial post shows two input files. And your recent post shows only one!. I can only guess what your actual requirement is.
Back to top
View user's profile Send private message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Thu Mar 18, 2010 8:51 pm
Reply with quote

Hi,

The first input file was actually derived from the sole input file I have given in the 2nd post as per the INCLUDE condtions given in the first step of my SORT jcl.

Code:

//STEP0001 EXEC PGM=SORT                               
//SORTIN   DD DSN=INPUT.FILE.D0311,
//            DISP=(SHR,KEEP,KEEP)                     
//SORTOUT  DD DSN=&&TEMP1,                             
//            DISP=(NEW,PASS,DELETE),                 
//            UNIT=SYSDA,                         
//            SPACE=(TRK,(1,1),RLSE),                 
//            DCB=(RECFM=VB,LRECL=140,BLKSIZE=0)       
//SYSOUT   DD SYSOUT=*                                 
//SYSIN    DD  *                                       
 SORT FIELDS=COPY                                     
 INCLUDE COND=(24,2,CH,EQ,C'01',AND,                   
               45,10,CH,EQ,C' ',AND,                   
               65,10,CH,EQ,C' ')                       
 OUTFIL OUTREC=(1,4,13X,18,6,117X)                     
//*                                             
//STEP0002 EXEC PGM=ICETOOL                             
//TOOLMSG  DD SYSOUT=*                                 
//DFSMSG   DD SYSOUT=*                                 
//INF1     DD DSN=&&TEMP1,                             
//            DISP=(OLD,PASS,DELETE)                   
//INF2     DD DSN=INPUT.FILE.D0311,
//            DISP=(SHR,KEEP,KEEP)                     
//TMPF     DD DSN=&&TEMP2,                             
//            DISP=(MOD,PASS,DELETE),                   
//            SPACE=(CYL,(100,100),RLSE)               
//OUTF     DD SYSOUT=*                 
//TOOLIN   DD *                                                         
 COPY FROM(INF1) TO(TMPF) USING(RAM1)                                   
 COPY FROM(INF2) TO(TMPF) USING(RAM2)                                   
 SPLICE FROM(TMPF) TO(OUTF) ON(18,6,CH) WITHALL WITH(1,141) USING(RAM3)
//RAM1CNTL DD *                                                         
 OUTFIL FNAMES=TMPF,BUILD=(1,4,5,136,C'BB')                             
/*                                                                     
//RAM2CNTL DD *                                                         
 OUTFIL FNAMES=TMPF,BUILD=(1,4,5,136,C'VV')                             
/*                                                                     
//RAM3CNTL DD *                                                         
 OUTFIL FNAMES=OUTF,INCLUDE=(141,2,CH,EQ,C'VB')                         
//                                                 


Sorry for the confusion icon_smile.gif
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Thu Mar 18, 2010 10:37 pm
Reply with quote

ramsri wrote:
Hi,

The first input file was actually derived from the sole input file I have given in the 2nd post as per the INCLUDE condtions given in the first step of my SORT jcl.
Huh...There cant be a much simpler explanation of a requirement. icon_evil.gif
Anyways since already you have a working solution using JOINKEYS which is more efficient than the "non-working" one which you're trying upon, I dont see any point in debating further. Good luck.
Back to top
View user's profile Send private message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Fri Mar 19, 2010 7:44 pm
Reply with quote

Not a problem Arun. Thanks for giving it a try.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
Search our Forums:

Back to Top