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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am


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