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 

Another VBM question: Include/OMIT condition

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
newuser
Beginner


Joined: 12 Jun 2003
Posts: 16
Topics: 8

PostPosted: Tue Aug 12, 2003 4:00 pm    Post subject: Another VBM question: Include/OMIT condition Reply with quote

Hi,

I have coded the following Synctool step.
Code:


//STEP0100 EXEC PGM=SYNCTOOL,PARM='VLTESTI=1'                     
//*                                                               
//TOOLMSG   DD SYSOUT=*                                           
//DFSMSG    DD SYSOUT=*                                           
//SYSPRINT  DD SYSOUT=*                                           
//IN        DD DSN=AD30AO.WBQ.OUTU0007.BARERROR.NTP335.D0251D,   
//             DISP=SHR                                           
//T1        DD DSN=&T1,DISP=(,PASS),SPACE=(CYL,(150,50),RLSE)     
//T2        DD DSN=&T2,DISP=(,PASS),SPACE=(CYL,(150,50),RLSE)     
//CON       DD DSN=*.T1,VOL=REF=*.T1,DISP=(OLD,PASS)             
//          DD DSN=*.T2,VOL=REF=*.T2,DISP=(OLD,PASS)             
//OUT       DD DSN=BJ67FT.DEVDAP.SEQNUM.DAPFEED.OUT,             
//         DCB=(RECFM=VBM,LRECL=214,BLKSIZE=0),                   
//         UNIT=DASD,SPACE=(214,(150,50),RLSE),AVGREC=K,         
//             DISP=(,CATLG),RETPD=20                             
//TOOLIN    DD *                                                 
 COPY FROM(IN) USING(CTL1)                                       
 SORT FROM(CON) TO(OUT) USING(CTL2)                               
//CTL1CNTL  DD *                                                 
 INREC FIELDS=(1,5,SEQNUM,8,ZD,6)                       
 OUTFIL FNAMES=T1,INCLUDE=(14,7,CH,EQ,C'HEADER1'),       
 OUTREC=(1,58,SEQNUM,8,ZD,67)                           
 OUTFIL FNAMES=T2,SAVE                                   
//CTL2CNTL  DD *                                         
 SORT FIELDS=(6,8,ZD,A)                                 
 OUTREC FIELDS=(1,5,14)                                 
/*                                                       


The job gives RC=16 stating:
WER250A T1 INCLUDE/OMIT FIELD BEYOND RECORD

Well, I agree there are really short records and 14,7 is beyond the record for these cases...But I thought I could take care of this using

PARM=VLTEST1=1.

Am I missing anything wrong? Any suggestions please..

Thanks
Back to top
View user's profile Send private message
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Wed Aug 13, 2003 1:39 am    Post subject: Reply with quote

I do not think, I understand this correctly.
Code:
INREC FIELDS=(1,5,SEQNUM,8,ZD,6)


You want the first 5 bytes of the input file, then an 8 digit sequence number in ZD and, then '6'. What does '6' mean?

If it means 6 more bytes after 5th byte in input file, then this is the error. The INCLUDE condition asks for the 7 bytes from 14th byte. The 14th byte (after INREC) is first byte after sequence number. But, you have a '6' there. Could this be the reason?

PS: I do not have access to m/f right now.
_________________
ALL opinions are welcome.

Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12377
Topics: 75
Location: San Jose

PostPosted: Wed Aug 13, 2003 12:06 pm    Post subject: Reply with quote

newuser,

I never had luck with passing parms to synctool via parm. remove the parm statement on the program and pass it via $ORTPARM DD statement.Try this

Code:

//$ORTPARM DD *         
  PARM='VLTESTI=1'       


Even if this does not work for you then split the job into 2 steps with SORT as the program name and you can pass parms to it.


Cogito : newuser's inrec fields are correct. For a VB input file , you don't have to specify the length, you just need to specify the start position of the record.

Code:

INREC FIELDS=(1,4,               $ RDW
              5,1,               $ MACHINE CHARACTER AS RECFM IS VBM
              SEQNUM,8,ZD,       $ 8 BYTE SEQUENCE NUMBER
              6)                 $ START POSITION OF THE VARIBALE RECORD




Hope this helps...

cheers

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
newuser
Beginner


Joined: 12 Jun 2003
Posts: 16
Topics: 8

PostPosted: Wed Aug 13, 2003 12:28 pm    Post subject: Reply with quote

Thanks Kolusu,

I also figured the same...Used the $0RTPARM dd as:

Code:


//STEP0100 EXEC PGM=SYNCTOOL
//*
//TOOLMSG   DD SYSOUT=*
//DFSMSG    DD SYSOUT=*
//SYSPRINT  DD SYSOUT=*
//IN        DD DSN=BJ67FT.JDLR.OFFSET,
//             DISP=SHR
//T1        DD DSN=&T1,DISP=(,PASS),SPACE=(CYL,(150,50),RLSE)
//T2        DD DSN=&T2,DISP=(,PASS),SPACE=(CYL,(150,50),RLSE)
//CON       DD DSN=*.T1,VOL=REF=*.T1,DISP=(OLD,PASS)
//          DD DSN=*.T2,VOL=REF=*.T2,DISP=(OLD,PASS)
//OUT       DD DSN=BJ67FT.JDLR.OUTPUT,
//         DCB=(RECFM=VBM,LRECL=214,BLKSIZE=0),
//         UNIT=DASD,SPACE=(214,(150,50),RLSE),AVGREC=K,
//             DISP=(,CATLG),RETPD=20
//CTL1OUT DD DUMMY
//TOOLIN    DD *
COPY FROM(IN) USING(CTL1)
SORT FROM(CON) TO(OUT) USING(CTL2)
//CTL1CNTL  DD *
INREC FIELDS=(1,5,SEQNUM,8,ZD,6)
OUTFIL FNAMES=T1,INCLUDE=(14,6,CH,EQ,C'HEADER'),
OUTREC=(1,58,SEQNUM,8,ZD,67)
OUTFIL FNAMES=T2,SAVE
//CTL2CNTL  DD *
SORT FIELDS=(6,8,ZD,A)
OUTREC FIELDS=(1,5,14)
//$ORTPARM DD *
VLTESTI=1
/*



First, I just added $ortparm statements only, then the job abended stating, CTL1OUT ddname is not coded. I dont know what it is, I then just added

Code:

//CTL1OUT DD DUMMY


Now atleaset the first COPY goes through fine. But it abends at the second SORT statement. Here's my DFSMSG messages:

Code:


SYNCSORT  3.7DRI TPF3  US PATENTS: 4210961,5117495, OTHER PAT. PEND. (C) 1998 SY
                                              z/OS   1.2.0   CPU MODEL 2064     
$ORTPARM : VLTESTI=1                                                           
PARMLIST :                                                                     
OPTION RESINV=0,ARESINV=0,MSGDDN=DFSMSG,SORTIN=IN,SORTDD=CTL1,COPY             
WER428I  CALLER-PROVIDED IDENTIFIER IS "0001"                                   
WER161B  ALTERNATE PARM USED                                                   
WER164B  5,148K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,             
WER164B     0 BYTES RESERVE REQUESTED, 275,016 BYTES USED                       
WER146B  20K BYTES OF EMERGENCY SPACE ALLOCATED                                 
WER108I  IN       :  RECFM=VBM  ; LRECL=   214; BLKSIZE= 32760                 
WER110I  CTL1OUT  :  RECFM=VBM  ; LRECL=   214; BLKSIZE= 32760                 
WER416B  BSAM WAS USED FOR IN                                                   
WER416B  BSAM WAS USED FOR CTL1OUT                                             
WER054I  RCD IN       2163, OUT       2163                                     
WER169I  RELEASE 3.7D BATCH 0347 TPF LEVEL 3                                   
WER052I  END SYNCSORT - X0997791,STEP0100,,DIAG=A400,2489,4AE4,6424,A4E6,2489,4A
SYNCSORT  3.7DRI TPF3  US PATENTS: 4210961,5117495, OTHER PAT. PEND. (C) 1998 SY

$ORTPARM : VLTESTI=1                                                           
PARMLIST :                                                                     
OPTION RESINV=0,ARESINV=0,MSGDDN=DFSMSG,SORTIN=CON,SORTOUT=OUT,SORTDD=CTL2,DYNAL
LOC                                                                             
WER428I  CALLER-PROVIDED IDENTIFIER IS "0002"                                   
WER161B  ALTERNATE PARM USED                                                   
WER164B  1,204K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,             
WER164B     0 BYTES RESERVE REQUESTED, 1,180K BYTES USED                       
WER146B  20K BYTES OF EMERGENCY SPACE ALLOCATED                                 
WER267A  SORT STATEMENT    : STATEMENT NOT FOUND                               


I tried giving CTL2OUT DD DUMMY also...but no success.

Thought of waiting for some more time before proceeding with 2 step SORT..

Regards
Back to top
View user's profile Send private message
newuser
Beginner


Joined: 12 Jun 2003
Posts: 16
Topics: 8

PostPosted: Wed Aug 13, 2003 4:56 pm    Post subject: Reply with quote

Nope..No luck...

Also, in my previous post, eventhough the COPY is giving zero returncode, I dont think it is doing anything that is in the CTL1 cards as is evident from the messges..

Gave up on this one...Resorted to 2 syncsort steps and works great for me!

Had it been Fixed Block, I could have had just one synctool step...Really annoys when this happens..why discriminate poor VBM types..Smile

Would love to hear if DFSORT/ICETOOL can do this in one step..just curious..

Anyway, thanks to all for providing the suggestions.
Regards!
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Wed Aug 13, 2003 6:04 pm    Post subject: Reply with quote

newuser said
Quote:
Would love to hear if DFSORT/ICETOOL can do this in one step..just curious..


Yes, it can. This DFSORT/ICETOOL job works just fine:

Code:

//STEP0100 EXEC PGM=ICETOOL
//TOOLMSG   DD SYSOUT=*
//DFSMSG    DD SYSOUT=*
//IN        DD DSN=... input file
//T1        DD DSN=&T1,DISP=(,PASS),SPACE=(CYL,(150,50),RLSE)
//T2        DD DSN=&T2,DISP=(,PASS),SPACE=(CYL,(150,50),RLSE)
//CON       DD DSN=*.T1,VOL=REF=*.T1,DISP=(OLD,PASS)
//          DD DSN=*.T2,VOL=REF=*.T2,DISP=(OLD,PASS)
//OUT DD DSN=...  output file
//TOOLIN    DD *
COPY FROM(IN) USING(CTL1)
SORT FROM(CON) TO(OUT) USING(CTL2)
//CTL1CNTL  DD *
  OPTION VLSCMP
  INREC FIELDS=(1,5,SEQNUM,8,ZD,6)
  OUTFIL FNAMES=T1,INCLUDE=(14,6,CH,EQ,C'HEADER'),
    OUTREC=(1,58,SEQNUM,8,ZD,67)
  OUTFIL FNAMES=T2,SAVE
/*
//CTL2CNTL  DD *
  SORT FIELDS=(6,8,ZD,A)
  OUTREC FIELDS=(1,5,14)
/*


Here are the TOOLMSG messages - as you can see, CTL1CNTL and CTL2CNTL were used.

Code:

ICE600I 0 DFSORT ICETOOL UTILITY RUN STARTED

ICE632I 0 SOURCE FOR ICETOOL STATEMENTS:  TOOLIN


ICE630I 0 MODE IN EFFECT:  STOP

          COPY FROM(IN) USING(CTL1)
ICE606I 0 DFSORT CALL 0001 FOR COPY FROM IN       TO OUTFIL   USING CTL1CNTL COMPLETED
ICE602I 0 OPERATION RETURN CODE:  00

          SORT FROM(CON) TO(OUT) USING(CTL2)
ICE606I 0 DFSORT CALL 0002 FOR SORT FROM CON      TO OUT      USING CTL2CNTL COMPLETED
ICE602I 0 OPERATION RETURN CODE:  00


ICE601I 0 DFSORT ICETOOL UTILITY RUN ENDED - RETURN CODE:  00


_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
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
newuser
Beginner


Joined: 12 Jun 2003
Posts: 16
Topics: 8

PostPosted: Thu Aug 14, 2003 1:38 pm    Post subject: Reply with quote

Thank You Frank. Your answer prompted to try with VLSHRT option with synctool. (Removed $ortparm, vltestI statements) And looks like it works...I tried two different files and the output is as expected. Here's my jcl:

Code:


//STEP0100 EXEC PGM=SYNCTOOL,PARM='VLTESTI=1'                     
//*                                                               
//TOOLMSG   DD SYSOUT=*                                           
//DFSMSG    DD SYSOUT=*                                           
//SYSPRINT  DD SYSOUT=*                                           
//IN        DD DSN=AD30AO.WBQ.OUTU0007.BARERROR.NTP335.D0251D,   
//             DISP=SHR                                           
//T1        DD DSN=&T1,DISP=(,PASS),SPACE=(CYL,(150,50),RLSE)     
//T2        DD DSN=&T2,DISP=(,PASS),SPACE=(CYL,(150,50),RLSE)     
//CON       DD DSN=*.T1,VOL=REF=*.T1,DISP=(OLD,PASS)             
//          DD DSN=*.T2,VOL=REF=*.T2,DISP=(OLD,PASS)             
//OUT       DD DSN=BJ67FT.DEVDAP.SEQNUM.DAPFEED.OUT,             
//         DCB=(RECFM=VBM,LRECL=214,BLKSIZE=0),                   
//         UNIT=DASD,SPACE=(214,(150,50),RLSE),AVGREC=K,         
//             DISP=(,CATLG),RETPD=20                             
//TOOLIN    DD *                                                 
COPY FROM(IN) USING(CTL1)                                       
SORT FROM(CON) TO(OUT) USING(CTL2)                               
//CTL1CNTL  DD *     
OPTION VLSHRT                                           
INREC FIELDS=(1,5,SEQNUM,8,ZD,6)                       
OUTFIL FNAMES=T1,INCLUDE=(14,7,CH,EQ,C'HEADER1'),       
OUTREC=(1,58,SEQNUM,8,ZD,67)                           
OUTFIL FNAMES=T2,SAVE                                   
//CTL2CNTL  DD *                                         
SORT FIELDS=(6,8,ZD,A)                                 
OUTREC FIELDS=(1,5,14)                                 
/*                                                       


Will be glad to hear if there is any limitation to this solution.

Regards
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Thu Aug 14, 2003 3:44 pm    Post subject: Reply with quote

VLSHRT will work with DFSORT/ICETOOL as well, although VLSCMP is usually a better choice since it only affects INCLUDE/OMIT whereas VLSHRT also affects SORT/MERGE and SUM (you're not using any of those with VLSHRT in this case, so it doesn't matter).
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
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
comradekev
Beginner


Joined: 10 Nov 2004
Posts: 1
Topics: 0

PostPosted: Wed Nov 10, 2004 4:00 pm    Post subject: Reply with quote

Just as an FYI regarding the use of parms (such as VLTESTI), if you're going to use it, it'll need to be on the EXEC statement, and the VLTESTI=1 will need to be in ticks. At least that's what finally worked for me. Like this:

//STEP01 EXEC PGM=SORT,PARM='VLTESTI=2'
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12377
Topics: 75
Location: San Jose

PostPosted: Wed Nov 10, 2004 4:30 pm    Post subject: Reply with quote

comradekev,

Quote:

Just as an FYI regarding the use of parms (such as VLTESTI), if you're going to use it, it'll need to be on the EXEC statement, and the VLTESTI=1 will need to be in ticks. At least that's what finally worked for me. Like this:

//STEP01 EXEC PGM=SORT,PARM='VLTESTI=2'



comradekev,

What you say is true for pgm=sort , but if you look at the all solutions, all of them deal with SYNCTOOL/ICETOOL which is used to club multiple sort/copy steps into a single step. AS far As I Know Synctool does not have the capability to receive parms. I am not sure if ICETOOL has the capacity of accepting parms via Parm statement. Frank can confirm that

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Wed Nov 10, 2004 5:22 pm    Post subject: Reply with quote

DFSORT's ICETOOL does not recognize EXEC PARMs. But any parameter you can pass to DFSORT via the EXEC PARM can be passed to DFSORT or ICETOOL in DFSPARM, e.g.

Code:

//DFSPARM DD *
  VLSCMP,OVFLO=RC4
/*

_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
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
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities 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