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

Copy a VB format file to FB format file


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
deepak_munjal

New User


Joined: 30 May 2008
Posts: 43
Location: Mumbai

PostPosted: Mon Jul 06, 2009 5:31 pm
Reply with quote

Hi all,

I have searched this topic on this forum but didn't find anywhere.
Could anyone help me....
I have to copy all the records from a VB file(LRECL=779) to a FB file(LRECL=179).
I need to copy only first 179 positions from input file.

I am using SORT utility with following this code:

Code:

//SORTIN   DD DISP=SHR,
//         DSN=TEST.deepak.input
//SORTOUT  DD DISP=(NEW,CATLG,DELETE),
//         UNIT=DISK,
//         SPACE=(TRK,(9600,9600),RLSE),
//         DSN=TEST.deepak.output
//SYSIN     DD *
   SORT FIELDS=COPY
   OUTREC FIELDS=(1,179)
/*
//*


I'm getting this error:---

1,- CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R10 - 07:40 ON MON JUL
SORT FIELDS=COPY
OUTREC FIELDS=(1:5,179)
3 INVALID DATA SET ATTRIBUTES: SORTOUT RECFM - REASON CODE IS 08
0 VLSHRT NOT USED FOR SORT, MERGE, INCLUDE, OMIT OR SUM STATEMENT FIELDS
0 C5-K90014 C6-K90014 C7-BASE C8-K42136 E7-K44564
3 END OF DFSORT

Deepak
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Mon Jul 06, 2009 5:42 pm
Reply with quote

Here's a couple of similar previous topics you might want to review:

www.ibmmainframes.com/viewtopic.php?t=28435
www.ibmmainframes.com/viewtopic.php?t=23265

as well as a link to the "Smart DFSORT Tricks" document:

www.ibm.com/support/docview.wss?rs=0&uid=isg3T7000094
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Mon Jul 06, 2009 9:55 pm
Reply with quote

Deepak,

Change your DFSORT control statements to the following:

Code:

  SORT FIELDS=COPY           
  OUTFIL VTOF,BUILD=(5,179)       
Back to top
View user's profile Send private message
deepak_munjal

New User


Joined: 30 May 2008
Posts: 43
Location: Mumbai

PostPosted: Tue Jul 07, 2009 1:46 am
Reply with quote

Thanks now its working.
Can you please just explain where we need to use OUTFIL and where we need to use OUTREC... ?
Tell me meaning of VTOF.... And function of BUILD... if you know ...

Thanks in advance...
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue Jul 07, 2009 2:18 am
Reply with quote

Quote:
Tell me meaning of VTOF.... And function of BUILD... if you know ...


Given that I've been developing DFSORT and ICETOOL for over 25 years, you could say that "I know". icon_lol.gif

VTOF converts VB input records to FB output records.

BUILD indicates the fields to be included in the output record.

If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

www.ibm.com/support/docview.wss?rs=0&uid=isg3T7000080

The OUTFIL statement has many operands not available with the OUTREC statement such as FTOV, VTOF, STARTREC, ENDREC, SAVE, HEADER1, etc.

For complete details on DFSORT's OUTREC statement, see:

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA30/3.14?DT=20080528171007

For complete details on DFSORT's OUTFIL statement, see:

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA30/3.13?DT=20080528171007
Back to top
View user's profile Send private message
sajjan jindal
Warnings : 1

New User


Joined: 09 Sep 2007
Posts: 60
Location: india

PostPosted: Tue Jul 07, 2009 9:42 am
Reply with quote

Hey Frank,

You are an excellent guy, helping people in such a humble way. I have seen so many replying here in the forum with a lots of attitude.
But you seem to be outstanding in the way reply.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Tue Jul 07, 2009 12:12 pm
Reply with quote

Quote:
if you know
Just for a Note -- He has "invented" the ICETOOL. In other words, he is The Kernel-writer of that. So he does know... icon_smile.gif
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Jul 07, 2009 2:06 pm
Reply with quote

sajjan jindal wrote:
Hey Frank,

You are an excellent guy, helping people in such a humble way. I have seen so many replying here in the forum with a lots of attitude.
But you seem to be outstanding in the way reply.


you are correct. Frank, who suports a product that is sold, shows unlimited patience for those who
  • never bother to ask a co-worker
  • never bother to look at a manual
  • never bother to look at other threads with the same requirement
  • never bother to take a couple of seconds and make their requirement understandable
  • never bother to realize that many who attempt to help are doing it for free and on their time
  • only consider their needs
  • are basically very childish and think that they should be treated with respect, that they do not show for others
  • for the most part should not be in this profession


yeah, I am probably one of those that who you think has an attitude.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue Jul 07, 2009 8:38 pm
Reply with quote

Quote:
Hey Frank,

You are an excellent guy, helping people in such a humble way. I have seen so many replying here in the forum with a lots of attitude.
But you seem to be outstanding in the way reply.


Well, thanks for the nice words, but unfortunately I'm far from humble at times and my "attitude" often does show through. But I do try.
Back to top
View user's profile Send private message
deepak_munjal

New User


Joined: 30 May 2008
Posts: 43
Location: Mumbai

PostPosted: Wed Jul 08, 2009 8:45 pm
Reply with quote

Thanks a lot everyone.

Appreciate your attention.

Deepak
Back to top
View user's profile Send private message
sahil41352

New User


Joined: 31 Dec 2014
Posts: 3
Location: India

PostPosted: Wed Dec 28, 2016 11:26 pm
Reply with quote

I am facing the issue in this. Could anyone help please.

CODE :

//FBOUT DD DSN=LD.D9X.FLAT.TLK.ULOAD.TEST,
// DISP=(NEW,CATLG,DELETE),RECFM=FB,
// LRECL=1060,SPACE=(1060,(20,5),RLSE),
// AVGREC=M
//SYSIN DD *
OPTION COPY
OUTFIL FNAMES=FBOUT,VTOF,OUTREC=(5,1060)
/*
//*

Error:
RECORD TYPE IS V - DATA STARTS IN POSITION 5
VLSHRT NOT USED FOR SORT, MERGE, INCLUDE, OMIT OR SUM STATEMENT FIELDS
JOBNAME: P9XCOPY , STEPNAME: S9XSORT
BLOCKSET TECHNIQUE IN CONTROL
BLOCKSET COPY TECHNIQUE SELECTED
VISIT www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AN
- CONTROL STATEMENTS FOR 5650-ZOS, Z/OS DFSORT V2R2 - 12:49 ON WED DE
OPTION COPY
OUTFIL FNAMES=FBOUT,VTOF,OUTREC=(5,1060)
END OF FBOUT FIELD BEYOND MAXIMUM RECORD LENGTH
C5-I37057 C6-I35397 C7-I35397 C8-I35397 E9-I35397 E7-I37057
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Thu Dec 29, 2016 12:04 am
Reply with quote

In the future, please start new topics rather than resurrect 7-year old ones.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Thu Dec 29, 2016 1:34 am
Reply with quote

Code:
VLSHRT NOT USED FOR SORT, MERGE, INCLUDE, OMIT OR SUM STATEMENT FIELDS
 JOBNAME: P9XCOPY , STEPNAME: S9XSORT
This is a clue.
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Populate last day of the Month in MMD... SYNCSORT 2
Search our Forums:

Back to Top