Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Add number in header with Syncsort

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
priyanka.msharma
Warnings : 1

New User


Joined: 28 Jan 2009
Posts: 12
Location: India

PostPosted: Wed Oct 07, 2009 4:08 pm    Post subject: Add number in header with Syncsort
Reply with quote

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
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Oct 07, 2009 4:12 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Wed Oct 07, 2009 4:16 pm    Post subject:
Reply with quote

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
View user's profile Send private message
priyanka.msharma
Warnings : 1

New User


Joined: 28 Jan 2009
Posts: 12
Location: India

PostPosted: Wed Oct 07, 2009 4:25 pm    Post subject: Reply to: Add number in header (using SORT utility)
Reply with quote

Eg. H5444200910075444Q

file length 100

So I want to have output as
H5447200910075447Q
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Oct 07, 2009 4:28 pm    Post subject:
Reply with quote

Yes, but which sort product are you using, DFSORT, SYNCSORT or CA-SORT
Back to top
View user's profile Send private message
priyanka.msharma
Warnings : 1

New User


Joined: 28 Jan 2009
Posts: 12
Location: India

PostPosted: Wed Oct 07, 2009 4:30 pm    Post subject:
Reply with quote

Any SORT product could be used.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Oct 07, 2009 4:33 pm    Post subject:
Reply with quote

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 icon_evil.gif
Back to top
View user's profile Send private message
priyanka.msharma
Warnings : 1

New User


Joined: 28 Jan 2009
Posts: 12
Location: India

PostPosted: Wed Oct 07, 2009 4:35 pm    Post subject:
Reply with quote

SYNCSORT
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Thu Oct 08, 2009 6:10 am    Post subject:
Reply with quote

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
View user's profile Send private message
priyanka.msharma
Warnings : 1

New User


Joined: 28 Jan 2009
Posts: 12
Location: India

PostPosted: Thu Oct 08, 2009 10:40 am    Post subject:
Reply with quote

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 icon_smile.gif
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Thu Oct 08, 2009 10:51 am    Post subject:
Reply with quote

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 icon_smile.gif
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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Thu Oct 08, 2009 11:02 am    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts what is meaning of the number in dcl Martylin PL/I & Assembler 2 Thu Mar 09, 2017 7:18 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am
No new posts GDG version number PANDU1 JCL & VSAM 4 Sat Mar 04, 2017 8:28 pm
No new posts SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 7 Sat Jan 21, 2017 4:02 am
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us