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: 6968
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: 7315

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: 7315

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: 1777
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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm
No new posts XMITIP sends it out. Can it copy on l... Rommel Dayon Rustia IBM Tools 0 Tue Sep 05, 2017 10:16 am

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