How to append characters to a variable length record



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

How to append characters to a variable length record

Postby rukkunudeen » Wed Jul 03, 2013 7:58 pm

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?
rukkunudeen
 
Posts: 8
Joined: Wed Jul 03, 2013 7:48 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to append characters to a variable length record

Postby rukkunudeen » Wed Jul 03, 2013 8:06 pm

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.
rukkunudeen
 
Posts: 8
Joined: Wed Jul 03, 2013 7:48 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to append characters to a variable length record

Postby NicC » Wed Jul 03, 2013 9:01 pm

Why not get the program that creates the file in first place to add the value?
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: How to append characters to a variable length record

Postby BillyBoyo » Thu Jul 04, 2013 4:25 am

Why are you doing this, and what "type" of data are you doing it to? "Text-only", or including "Computational" fields?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: How to append characters to a variable length record

Postby steve-myers » Thu Jul 04, 2013 5:56 am

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.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: How to append characters to a variable length record

Postby rukkunudeen » Thu Jul 04, 2013 8:25 am

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.
rukkunudeen
 
Posts: 8
Joined: Wed Jul 03, 2013 7:48 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to append characters to a variable length record

Postby steve-myers » Thu Jul 04, 2013 9:36 am

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.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: How to append characters to a variable length record

Postby rukkunudeen » Thu Jul 04, 2013 11:50 am

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..
rukkunudeen
 
Posts: 8
Joined: Wed Jul 03, 2013 7:48 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to append characters to a variable length record

Postby rukkunudeen » Thu Jul 04, 2013 11:50 am

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..
rukkunudeen
 
Posts: 8
Joined: Wed Jul 03, 2013 7:48 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to append characters to a variable length record

Postby BillyBoyo » Thu Jul 04, 2013 12:21 pm

You have not told us enough originally to be able to suggest anything, and you have not answered the questions asked of you.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Next

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post