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 

ICETOOL , VB input record file...

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


Joined: 02 Nov 2005
Posts: 12
Topics: 3

PostPosted: Fri May 29, 2009 3:35 am    Post subject: ICETOOL , VB input record file... Reply with quote

Hi,

Using ICETOOL, I am trying to selcet data from input file to output file.
If input file is FB then it works fine but if input file is VBA type then my JCL is failing

Code:

//STEP20   EXEC PGM=ICETOOL                                       
//SYSOUT   DD SYSOUT=*                                             
//TOOLMSG  DD SYSOUT=*                                             
//DFSMSG   DD SYSOUT=*                                             
//INFILE1  DD DSN=LSYS5.BST.SYSLOG.D090527,DISP=SHR           
//TEMP1    DD DSN=LSYS5.TEST.TEMP1,                               
//            DISP=(MOD,CATLG,DELETE),UNIT=SYSDA,                 
//            SPACE=(CYL,(1,5),RLSE),DCB=(LRECL=137,RECFM=VB)     
//TOOLIN   DD *                                                       
  SELECT FROM(INFILE1) TO(TEMP1) ON(29,2,BI) VSAMTYPE(V) FIRSTDUP     
/*


DCB parm for input file LSYS5.BST.SYSLOG.D090527 is Record format : VBA,Record length : 137, Block size : 27998

Any headsup on how to use SELECT operator for VB type input file?

Thanks
Back to top
View user's profile Send private message Yahoo Messenger
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Fri May 29, 2009 5:16 am    Post subject: Reply with quote

I believe there is a difference of 4 for the offset of a fix-length record and a variable-length record.

I believe that if 29 was the starting position for the FLR, then 33 should be the length for the VLR.

The difference of 4 is due to the RDW (Record Descriptor Word - 4 byte vli) at the beginning of the VLR.
_________________
Dick Brenholtz
American living in Varel, Germany
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: Fri May 29, 2009 9:52 am    Post subject: Reply with quote

avd678,

A VBA record has the following structure:

Code:

|RDW|cc|Data
  4   1  n


So the first data byte starts at 6, not 1. If you are not taking the RDW and cc (carriage control character) into account when determining the starting position of your field, then you need to add +5 which would give you ON(34,2,BI).

If that doesn't help, then use DFSORT to show what your VBA records look like in HEX:

Code:

   OPTION COPY
   INREC BUILD=(1,4,1,4,HEX,5,HEX)


That should help you find the correct starting position of your field.

BTW, since your input file has RECFM=VBA, do you really want your output file to have RECFM=VB instead of RECFM=VBA?
_________________
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
avd678
Beginner


Joined: 02 Nov 2005
Posts: 12
Topics: 3

PostPosted: Tue Jun 02, 2009 3:55 am    Post subject: Reply with quote

Hi,

I did update my JCL & rerun the job as suggested

SELECT FROM(INFILE1) TO(TEMP1) ON(34,2,BI) VSAMTYPE(V) FIRSTDUP

but received following error!

ICE218A 0 6 BYTE VARIABLE RECORD IS SHORTER THAN 35 BYTE MINIMUM FOR FIELDS

Any idea how to handle this error?

Thanks
_________________
avd
Back to top
View user's profile Send private message Yahoo Messenger
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


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

PostPosted: Tue Jun 02, 2009 9:22 am    Post subject: Reply with quote

The message tells you that you have a "short" record ... you specified ON(34,2,BI) which requires a record of at least 35 bytes, but you have a record that is only 6 bytes. If you want to eliminate short records before SELECT processing you can use:

Code:

SELECT FROM(INFILE1) TO(TEMP1) ON(34,2,BI) VSAMTYPE(V) FIRST -
   USING(CTL1)
//CTL1CNTL DD *
   OMIT COND=(1,2,BI,LT,35)
/*


If you want to do something else about the short records, you need to explain what you want to do.
_________________
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
avd678
Beginner


Joined: 02 Nov 2005
Posts: 12
Topics: 3

PostPosted: Fri Jun 05, 2009 5:45 am    Post subject: Reply with quote

Hi Frank,

Honestly appreciate your prompt help, its working perfectly now

Thanks a lot

Regards
_________________
avd
Back to top
View user's profile Send private message Yahoo Messenger
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