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

Input VB file to Output VB file copy with insertion


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

New User


Joined: 22 Apr 2006
Posts: 44

PostPosted: Wed Jul 11, 2007 11:18 pm
Reply with quote

I have the VB file record length = 20, i want to insert 1 at the end of every record. So my expected output file VB length is 21. I gave the below Sort card.

Code:

  SORT FIELDS=COPY
  OUTREC FIELDS=(5:5,16,21:C'1')


But it's giving the below error.

wer235a OUTREC RDW NOT INCLUDED

Regards
Suresh
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Wed Jul 11, 2007 11:35 pm
Reply with quote

callkris_cit wrote:
Code:

  SORT FIELDS=COPY
  OUTREC FIELDS=(5:5,16,21:C'1')


But it's giving the below error.

wer235a OUTREC RDW NOT INCLUDED

Try
Code:

  SORT FIELDS=COPY
  OUTREC FIELDS=(1,20,C'1')
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Thu Jul 12, 2007 3:21 pm
Reply with quote

callkris_cit, You can use this too,
Code:
SORT FIELDS=COPY
  OUTREC OVERLAY=(21:C'1')
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 Jul 12, 2007 4:29 pm
Reply with quote

Hi,

Above task can be done as:
Code:
SORT FIELDS=COPY
  INREC OVERLAY=(21:C'1')


which one will work faster, INREC or OUTREC.
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Thu Jul 12, 2007 7:13 pm
Reply with quote

anuj_model
The answer for your question
Quote:
which one will work faster, INREC or OUTREC.
is here
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ice1ca20/3.8.1?ACTION=MATCHES&REQUEST=inrec,outrec,efficiency&TYPE=FUZZY&SHELF=ICE1SH20.bks&DT=20060615185603&CASE=&searchTopic=TOPIC&searchText=TEXT&searchIndex=INDEX&rank=RANK&ScrollTOP=FIRSTHIT#FIRSTHIT

Its not that INREC or OUTREC works faster, its only that how efficiently and suitably its implemented.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Sat Jul 28, 2007 3:11 pm
Reply with quote

krisprems wrote:
Its not that INREC or OUTREC works faster, its only that how efficiently and suitably its implemented.

Can you please let me know, in the above case which one will work faster. Document gives very general view of INREC & OUTREC, I could not corelate them with the code in question very well, do you have some explanatory suggestion?
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Sat Jul 28, 2007 5:49 pm
Reply with quote

Anuj
This point
Quote:
In general, OUTREC should be used rather than INREC so your SORT and SUM statements can refer to fields in the original input records.

in the above pointed link, says that outrec to be used for efficiency, since it can refer to fields in the original input records.
But in our case its just SORT FIELDS=COPY, so no matter whether you use INREC or outrec.
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 Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
Search our Forums:

Back to Top