View previous topic :: View next topic
|
Author |
Message |
anandkumarrn
New User
Joined: 06 Feb 2009 Posts: 23 Location: India
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
anandkumarrn
New User
Joined: 06 Feb 2009 Posts: 23 Location: India
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
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 |
|
|
anandkumarrn
New User
Joined: 06 Feb 2009 Posts: 23 Location: India
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
|