Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Sort card to replace a value in variable length file.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
shaji nair

New User


Joined: 22 Jun 2005
Posts: 2

PostPosted: Thu Jun 23, 2005 12:43 pm    Post subject: Sort card to replace a value in variable length file.
Reply with quote

I have a VSAM KSDS file with variable length 0f 17552.which contains a field called COMP ID of pic 9(3) comp 3.also it is part of key field in that file

The values of this fields are 022,092,100,200 etc

Now I want to write a jcl to replace 022 with 055.

What I did is by using sort I had given like below



//SYSIN DD *

SORT FIELDS=COPY

INCLUDE COND=(5,2,PD,EQ,025)

OUTREC FIELDS=(1,4,X'045C',7,17550)

//*



But this is throwing error. Please let me know how to do this.


Thanks in advance
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Jun 23, 2005 10:23 pm    Post subject:
Reply with quote

Quote:
But this is throwing error.


Please post the complete error message. We can't read your mind.

Actually, your OUTREC statement doesn't seem to match what you said you wanted to do. You said you wanted to "replace 022 with 055", but your OUTREC statement includes a record with P'25' and replaces the P'25' with P'45'.

If you're using DFSORT and have the Dec, 2004 PTF, I'd suggest using this OUTREC statement:

Code:

   OUTREC IFTHEN=(WHEN=(5,2,PD,EQ,22),OVERLAY=(5:+55,TO=PD,LENGTH=2))
Back to top
View user's profile Send private message
shaji nair

New User


Joined: 22 Jun 2005
Posts: 2

PostPosted: Fri Jun 24, 2005 9:59 am    Post subject: here is the detail description
Reply with quote

Thanks for the reply
If i am using the sort card as
1)

SORT FIELDS=COPY
INCLUDE COND=(5,2,PD,EQ,025)
OUTREC FIELDS=(1:1,4,X'054C',7:7,17550)

i am getting the error in spool like below

WER244A OUTREC - SHORT RECORD

2)
i change the sort card as

OPTION VLSHRT
SORT FIELDS=COPY
INCLUDE COND=(5,2,PD,EQ,025)
OUTREC FIELDS=(1,4,X'045C',7,17550)

again i am getting the same error.

3)
Today i changed the sort card as per your suggession.

OPTION VLSHRT
SORT FIELDS=COPY
INCLUDE COND=(5,2,PD,EQ,025)
OUTREC IFTHEN=(WHEN=(5,2,PD,EQ,25),OVERLAY=(5:+45,TO=PD,LENGTH=2))

now i am geeting the error like below.

WER268A OUTREC STATEMENT : SYNTAX ERROR
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Jun 24, 2005 9:26 pm    Post subject:
Reply with quote

The WER messages indicate you're using Syncsort, not DFSORT.

DFSORT supports the IFTHEN function. Syncsort does not support it.

I'm a DFSORT developer. DFSORT and Syncsort are competitive products. I'm happy to answer questions on DFSORT and DFSORT's ICETOOL, but I don't answer questions on Syncsort.
Back to top
View user's profile Send private message
brganeshbabu

New User


Joined: 23 Jun 2005
Posts: 34
Location: Chennai

PostPosted: Tue Jul 05, 2005 10:24 am    Post subject: Re: Sort card to replace a value in variable length file.
Reply with quote

hi frank,
I am a beginner in mainframe. I don't know the usage of DFSORT. I know that sort utility is just to sort a dataset. I like to know much about the DFSORT utility. If you can send any link or any document on this, it will be helpful for me.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Jul 05, 2005 9:35 pm    Post subject:
Reply with quote

B.R.Ganesh Babu ,

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 and papers, from:

www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html

The DFSORT website is also an excellent source of information on DFSORT and DFSORT's ICETOOL. You can access all of the topics available from:

www.ibm.com/servers/storage/support/software/sort/mvs/srtmprd.html
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 sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts JOINKEYS Paired and Unpaired Sort MFwhiz DFSORT/ICETOOL 4 Fri Sep 29, 2017 1:48 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us