View previous topic :: View next topic
|
Author |
Message |
krisprems
Active Member
Joined: 27 Nov 2006 Posts: 649 Location: India
|
|
|
|
Here is my requirement, i have a file with 256 lrecl, and i need to insert a $ after 2,4,10,10.. so on. |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
krisprems,
Quote: |
need to insert a $ after 2,4,10,10.. so on. |
Its bit confusing. Provide more info what exactly you wanted. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Please show a few input records and what the output for those records needs to be. Yo don't need to show all 256 bytes, just the first 50 or so. |
|
Back to top |
|
|
krisprems
Active Member
Joined: 27 Nov 2006 Posts: 649 Location: India
|
|
|
|
my i/p file looks like
Code: |
12345678901234567890
|
Output should be
Code: |
12$3456$7890123456$7890$
|
|
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
You can use a DFSORT job like this:
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file
//SORTOUT DD DSN=... output file
//SYSIN DD *
OPTION COPY
INREC BUILD=(1,2,C'$',3,4,C'$',7,10,C'$',17,4,C'$',
...)
/*
|
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Does your location use DFSORT or Syncsort or some other sort product?
How far "across" the record does the $ need to be inserted? Are all of the locatons that need to be shifted been shown? Will the overall length of a record increase to accomodate the inserted $s? Should the right-most bytes be truncated to keep the 256 length?
Your "output" doesn't match your requirement definition
Quote: |
need to insert a $ after 2,4,10,10.. so on. |
which is a bit confusing. . . |
|
Back to top |
|
|
krisprems
Active Member
Joined: 27 Nov 2006 Posts: 649 Location: India
|
|
|
|
Thanks Frank,
Me too solved myself and had resulted with the same code.
Thanks once again to all |
|
Back to top |
|
|
|