Joined: 23 Nov 2006 Posts: 19270 Location: Inside the Matrix
I do not say it is a sort question
Posting the question in DFSORT/ICETOOL implies a sort question.
How can we go without program?
Even without a program, there will still have to be jcl and documentation and probably the process "promoted" to production.
How often will this process be done? Will parm card 1 and parm card 2 always have the same number of lines? Will there ever be more than one value to (i.e. 97) work with? Will the values always be in the same positions in the line?
As we learn more about what your requirement really is, we may have more questions.
Joined: 03 Dec 2007 Posts: 39 Location: United States
Posting the question in DFSORT/ICETOOL implies a sort question.- As I am the new user so I did not know this.
This process is done for every quater.
Yes, Parm card 1 and 2 have same number of lines always. In the parm card 1 can have two values either 97 or 98 in the same position (11th row, column 1 and 2). The value in the parm card 1 would be entered by the user for every quarter.
Whenver the use enters the value(97 or 98) that value should be reflected on parm card 2
You can use a DFSORT job like the following to do what you asked for. I assumed the value in parm card 1 you want is in positions 1-2 of the 11th record. I assumed the value you want to replace in parm card 2 is in positions 27-28 of the record with 'SCHID=' starting in position 21. You can change the job as needed.
This OUTREC statement builds an 80-byte DFSORT Symbol record of the form:
C'TARG,''' - builds a constant of TARG, and a starting apostrophe -> TARG,' -> Note that we need '' to get ' inside the character constant.
1,2 - copies the characters from input positions 1-2 (e.g. 97)
C'''' - builds the ending apostrophe
80:X - pads with blanks from after the ending apostrophe up to and including position 80 (gives us an 80-byte record).
If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from: