View previous topic :: View next topic
|
Author |
Message |
priyanka.msharma Warnings : 1 New User
Joined: 28 Jan 2009 Posts: 12 Location: India
|
|
|
|
Hi,
I have a header and I want to add +3 in cycle number.
E.g. H5444 where "5444" is the cycle number.
I want to make it "5447". Is there any utility that can give me desired result.
Also, that cycle number is required to be populated in multiple places in same header record.
Thanks,
Priyanka |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
As you have posted in the JCL forum, we can only assume that your product is SYNCSORT.
From the information you have bothered to give us there is not much that is useful to helping anyone suggest a solution.
1) RECFM & LRECL of the input file
2) Positions of the occurrences of this particular value. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Hi,
Quote: |
Also, that cycle number is required to be populated in multiple places in same header record. |
How are we supposed to know those multiple positions?
Suggest you show some sample header record and the expected output from that. Some one would be around witha helping note if that can be done using sort.
And which sort product do you use? |
|
Back to top |
|
|
priyanka.msharma Warnings : 1 New User
Joined: 28 Jan 2009 Posts: 12 Location: India
|
|
|
|
Eg. H5444200910075444Q
file length 100
So I want to have output as
H5447200910075447Q |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Yes, but which sort product are you using, DFSORT, SYNCSORT or CA-SORT |
|
Back to top |
|
|
priyanka.msharma Warnings : 1 New User
Joined: 28 Jan 2009 Posts: 12 Location: India
|
|
|
|
Any SORT product could be used. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Ho hummmmmmmmmmm. Which sort product do you have installed at your site. It is no good whatsoever getting a CA-SORT solution for the DFSORT product.
The solution will vary from product to product, so this is why we need to know which product YOU will be executing to ensure that the solution offered is correct |
|
Back to top |
|
|
priyanka.msharma Warnings : 1 New User
Joined: 28 Jan 2009 Posts: 12 Location: India
|
|
|
|
SYNCSORT |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
what happens when the header cycle number is 9997 and you add 3 to it ?
will it be 10000 or 0000 and what happens to the extra byte ?
Gerry |
|
Back to top |
|
|
priyanka.msharma Warnings : 1 New User
Joined: 28 Jan 2009 Posts: 12 Location: India
|
|
|
|
No I need this for One-Time job, rest every day's batch job has programming logic to convert the cycle number back to 0001 |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
priyanka.msharma wrote: |
No I need this for One-Time job, rest every day's batch job has programming logic to convert the cycle number back to 0001 |
Just a suggestion...If you already have such a logic/program in place, why not just modify the program itself to add 1 at multple places in the header. Anyways, when "counter" is set back to 0001 it would be set at multple places so your program already know those places where you need to update... |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
this might help
Code: |
//STEP0001 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
H5444200910075444Q
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
INREC IFTHEN=(WHEN=(1,1,CH,EQ,C'H'),
BUILD=(1,1,2,4,ZD,ADD,+3,EDIT=(TTTT),
6,8,14,4,ZD,ADD,+3,EDIT=(TTTT),18,83))
/*
|
Gerry |
|
Back to top |
|
|
|