Page 1 of 2

How to append characters to a variable length record

PostPosted: Wed Jul 03, 2013 7:58 pm
by rukkunudeen
We were using fileaid to append x'00'to the end of the record using fileaid. It is a variable length file.
DD01 COPY PADCHAR=X'00'
But now fileaid is no longer used in our system. So we are converting all JCl's to sort/filemanager/icetool.
can you tell me the equivalent stmt for it?

Re: How to append characters to a variable length record

PostPosted: Wed Jul 03, 2013 8:06 pm
by rukkunudeen
I saw this post, but it is adding to the end of the record.if recl is 80 it is adding after 78 for all records.
dfsort-icetool-icegener/topic4625-10.html

But i want it to be exactly at end of record. For ex: if 1st record is 54 bytes 55 byte should have x'00'
if 2nd record is 65 bytes, 66 byte shoudl have x'00'
Hope u understand.

Re: How to append characters to a variable length record

PostPosted: Wed Jul 03, 2013 9:01 pm
by NicC
Why not get the program that creates the file in first place to add the value?

Re: How to append characters to a variable length record

PostPosted: Thu Jul 04, 2013 4:25 am
by BillyBoyo
Why are you doing this, and what "type" of data are you doing it to? "Text-only", or including "Computational" fields?

Re: How to append characters to a variable length record

PostPosted: Thu Jul 04, 2013 5:56 am
by steve-myers
This is not difficult to do, but why do you want to do this??? What will be done with this data after it has been altered? I strongly suspect the "reason" for this task is completely specious. ("Specious" is a word that means the reason you are specifying this task is wrong; worse, the updated data may prove to be useless.)
  1. You need a program to do this. "JCL" is used to specify the environment used to execute a program. That is all "JCL" can do. "JCL" cannot copy data or alter data records as they are being copied.
  2. Many people know how to persuade a sort program that is run using JCL to do this task. I am not an expert in sort programs, so I cannot help you.
  3. The documentation for the IBM DFSORT program is online. The JCL used to run DFSORT and the DFSORT control statements is collectively call "JCL," but only the statements that start with // is JCL. The data used to direct DFSORT's functioning, while it is frequently included with the JCL statements used to run DFSORT is not JCL.
  4. Many mainframe sites use another sort program called Syncsort. The documentation for Syncsort is not online, though it appears many users find the JCL and control statements for Syncsort to be similar (and often identical) to the JCL and control statements for DFSORT. Both are outstanding programs; as sort programs there is little to differentiate them. DFSORT is better in some extreme circumstances, just as Syncsort is better in other extreme situations. "Better" just describes the system resources required to run the program; the limits of the programs are rarely encountered in practice.

Re: How to append characters to a variable length record

PostPosted: Thu Jul 04, 2013 8:25 am
by rukkunudeen
The original JCL was using fileaid and they had the instream data DD01 COPY PADCHAR=X'00' to append data to the end of the variable length record.
But now our mainframe TSO session doesn't have fileaid. They have removed fileaid tool due to budgetting. So we are replacing all fileaid steps to either sort/icetool/filemanager. But we couldn't find an equivalent stmt.
Please let me know what can be done other than coding a new cobol program for this logic.

Re: How to append characters to a variable length record

PostPosted: Thu Jul 04, 2013 9:36 am
by steve-myers
If you think DFSORT/ICETOOL can perform this function, it might make more sense to initiate a topic in the appropriate area rather than the JCL area.

Re: How to append characters to a variable length record

PostPosted: Thu Jul 04, 2013 11:50 am
by rukkunudeen
steve-myers wrote:If you think DFSORT/ICETOOL can perform this function, it might make more sense to initiate a topic in the appropriate area rather than the JCL area.

Can you share how it can be done as it is urgent. Please..

Re: How to append characters to a variable length record

PostPosted: Thu Jul 04, 2013 11:50 am
by rukkunudeen
steve-myers wrote:If you think DFSORT/ICETOOL can perform this function, it might make more sense to initiate a topic in the appropriate area rather than the JCL area.

Can you share how it can be done as it is urgent. Please..

Re: How to append characters to a variable length record

PostPosted: Thu Jul 04, 2013 12:21 pm
by BillyBoyo
You have not told us enough originally to be able to suggest anything, and you have not answered the questions asked of you.