View previous topic :: View next topic
|
Author |
Message |
ArunBalaji
New User
Joined: 18 Feb 2008 Posts: 7 Location: chennai
|
|
|
|
Hi,
My target is to copy a particular field which is blank in it, from a flat file to my output file without affecting other fields in that record.
I am having a flat file of certein records like
Code: |
aaaaa15555 RAJA 2221235
bbbbb15482 HARI 56925
ssssss32323 152555
|
I need to get the output of that spaces only, which is in name filed.
That is, if the name filed is blank, i need to put that blank in my output file with out affecting other fileds. Because in my output file some other fileds are masked. like
Code: |
aaaaa22153 RAGU 2221235
bbbbb22639 BALU 56925
ssssss95959 152555
|
How it can be done by ICETOOL? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello Arun and welcome to the forums,
Please re-post your question giving more clear examples. Your examples do not appear to be related to each other. For the input data, you need to show what the output data for those same records would be.
You also need to post the attributes for the files as well as the positions to be used for processing. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Arun,
Your description is very confusing. I can't tell if you want just the input records with blank names in your output file, or all of the input records in the output file (changed how?) or what.
Quote: |
My target is to copy a particular field which is blank in it, from a flat file to my output file without affecting other fields in that record. |
What does this mean? If you copy the input records to the output file, the blanks will stay where they are.
Quote: |
That is, if the name filed is blank, i need to put that blank in my output file with out affecting other fileds. Because in my output file some other fileds are masked. |
Again, what does this mean? If the name field is blank in the input record, it will still be blank in the output record. What do you mean by masked?
You have to do a better job of explaining what you want to do before anyone can help you. |
|
Back to top |
|
|
ArunBalaji
New User
Joined: 18 Feb 2008 Posts: 7 Location: chennai
|
|
|
|
Hi,
I just want to copy the position of 100-130 from my input file to output file in the same position of 100-130. I doesn't want to change any other fileds in my output file aparts from this.
My files are FB only.
Is there is any possibility in ICETOOL or in any other utility? |
|
Back to top |
|
|
rajatbagga
Active User
Joined: 11 Mar 2007 Posts: 199 Location: india
|
|
|
|
hello ArunBalaji,
If I had understood your reqirement then if you have :
INPUT FILE:
Code: |
aaaaa15555 RAJA 2221235
bbbbb15482 HARI 56925
sssss32323 152555 |
Present OUTPUT file wich will become second INPUT file for this job:
Code: |
AAAAA22153 RAGU 2221235
BBBBB22639 BALU 56925
SSSSSS9595 JOSE 152555 |
EXPECTED OUTPUT FILE after the submission of JOB:
Code: |
AAAAA22153 RAGU 2221235
BBBBB22639 BALU 56925
SSSSSS9595 152555 |
But if you need something other then this then please explain your requirement clearly.
Regards,
Rajat |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Arun,
Here's a DFSORT/ICETOOL job that will do what I think you asked for. I assumed your input files have RECFM=FB and LRECL=200, but you can change the job appropriately for other attributes. Your reference to the second input file as the output file was very confusing. Please try to be more careful with your terminology in the future.
Code: |
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=... input file1 (FB/200)
//IN2 DD DSN=... input file2 (FB/200)
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT DD DSN=... output file (FB/200)
//TOOLIN DD *
COPY FROM(IN2) TO(T1) USING(CTL1)
COPY FROM(IN1) TO(T1) USING(CTL1)
SPLICE FROM(T1) TO(OUT) ON(201,8,ZD) WITH(100,31) USING(CTL2)
/*
//CTL1CNTL DD *
INREC OVERLAY=(201:SEQNUM,8,ZD)
/*
//CTL2CNTL DD *
OUTFIL FNAMES=OUT,BUILD=(1,200)
/*
|
|
|
Back to top |
|
|
|