IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Copy two variable lenght records...


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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: 6966
Location: porcelain throne

PostPosted: Thu Oct 20, 2011 8:38 pm
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Oct 20, 2011 8:42 pm
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
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Oct 20, 2011 8:45 pm
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: 1788
Location: Bloomington, IL

PostPosted: Thu Oct 20, 2011 8:45 pm
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
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 Developer


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

PostPosted: Thu Oct 20, 2011 10:46 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts VB to VB copy - Full length reached SYNCSORT 8
No new posts Join multiple records using splice DFSORT/ICETOOL 5
Search our Forums:

Back to Top