Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Copy two variable lenght records...

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
anandkumarrn

New User


Joined: 06 Feb 2009
Posts: 23
Location: India

PostPosted: Thu Oct 20, 2011 8:34 pm    Post subject: Copy two variable lenght records...
Reply with quote

hi,,

I want to copy a VB file to another variable file,

Say eg:

Input file - LRECL - 200
and output file - LRECL - 202

where in,

i need to insert two extra postions (Packed decimal) after 11 & 12 positions, which makes the total file LRECL to 202.

Thanks in advance
Regards,
Anand
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


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

PostPosted: Thu Oct 20, 2011 8:38 pm    Post subject:
Reply with quote

do you have a specific value that is to be inserted after 11 or is it 12?
or really is it 10?
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7314

PostPosted: Thu Oct 20, 2011 8:42 pm    Post subject: Reply to: hi... Copy two variable lenght records...
Reply with quote

What have you tried so far, and what is the problem?

By "after 11 & 12 positions" do you mean the new field beginning at 13 (for length of two)? Or occupying 11 and 12 with the original data beginning at 13?

Are you including the RDW in the above positions?

What do you want to put in the new field? A packed zero, or something else?
Back to top
View user's profile Send private message
anandkumarrn

New User


Joined: 06 Feb 2009
Posts: 23
Location: India

PostPosted: Thu Oct 20, 2011 8:42 pm    Post subject: Hi Thanks for the quick reply
Reply with quote

dbzTHEdinosauer wrote:
do you have a specific value that is to be inserted after 11 or is it 12?
or really is it 10?



we just need to populate it as Spaces. it can be in position 10
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7314

PostPosted: Thu Oct 20, 2011 8:45 pm    Post subject: Reply to: hi... Copy two variable lenght records...
Reply with quote

So, you want two spaces beginning at byte 10 (14 if you have forgotten the RDW)? Gives you something to build on when you look at the manual?
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1786
Location: Bloomington, IL

PostPosted: Thu Oct 20, 2011 8:45 pm    Post subject: Re: Hi Thanks for the quick reply
Reply with quote

anandkumarrn wrote:
i need to insert two extra postions (Packed decimal) after 11 & 12 positions, which makes the total file LRECL to 202.

dbzTHEdinosauer wrote:
do you have a specific value that is to be inserted after 11 or is it 12?
or really is it 10?



we just need to populate it as Spaces. it can be in position 10

Would you care to clarify?
Back to top
View user's profile Send private message
anandkumarrn

New User


Joined: 06 Feb 2009
Posts: 23
Location: India

PostPosted: Thu Oct 20, 2011 8:46 pm    Post subject: Re: Reply to: hi... Copy two variable lenght records...
Reply with quote

Bill Woodger wrote:
So, you want two spaces beginning at byte 10 (14 if you have forgotten the RDW)? Gives you something to build on when you look at the manual?



Hi Bill,

Yes, i want to include two spaces.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


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

PostPosted: Thu Oct 20, 2011 10:46 pm    Post subject:
Reply with quote

It's not clear exactly where you want to insert the spaces. I don't know if you're counting the RDW in your positions or not. Assuming you are and you want to insert two blanks between positions 10 and 11, you could use a DFSORT job like the following:

Code:

//S1 EXEC PGM=SORT                                                   
//SYSOUT DD SYSOUT=*                                                 
//SORTIN DD DSN=...  input file (VB/200)           
//SORTOUT DD DSN=...  output file (VB/202)     
//SYSIN DD *                                                         
  OPTION COPY                                                       
  INREC BUILD=(1,10,2X,11)                                           



So if you had an input record like this (rrrr is the RDW):

Code:

rrrrABCDEFGHIJKLMNOP     


you would get an output record like this:

Code:

rrrrABCDEF  GHIJKLMNOP


Adjust as necessary.
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Extract the records with a PD field's... sudhakar84 DFSORT/ICETOOL 11 Mon Apr 02, 2018 7:26 pm
No new posts Merge 2 records sancraig16 SYNCSORT 19 Tue Mar 27, 2018 8:17 pm
No new posts Copy set of records based on condition krish.deepu SYNCSORT 2 Thu Mar 08, 2018 11:39 am
No new posts add sequence number for duplicate rec... SRUTHI DRAVIDAMANI COBOL Programming 11 Thu Feb 22, 2018 5:37 pm
No new posts how to add the amount for duplicate r... SRUTHI DRAVIDAMANI COBOL Programming 6 Wed Feb 21, 2018 7:21 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us