Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Input VB file to Output VB file copy with insertion

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Input VB file to Output VB file copy with insertion
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: 3158
Location: Tucson AZ

PostPosted: Wed Jul 11, 2007 11:35 pm    Post subject: Re: Input VB file to Output VB file copy with insertion
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    Post subject:
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

Senior Member


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

PostPosted: Thu Jul 12, 2007 4:29 pm    Post subject:
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    Post subject:
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

Senior Member


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

PostPosted: Sat Jul 28, 2007 3:11 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Incorrect output when trying to add n... monica1 PL/I & Assembler 10 Fri Jan 13, 2017 5:02 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 0 Mon Jan 02, 2017 11:16 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 31 Tue Dec 06, 2016 8:04 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us