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
 

 

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: 1770
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 Can I traverse a STEM variable? chong.zhou CLIST & REXX 5 Wed May 31, 2017 3:54 pm
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts copy SEQ to PDS and create stats steve-myers JCL & VSAM 7 Thu Apr 27, 2017 1:15 am


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