IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Sort card to replace a value in variable length file.


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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 Developer


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

PostPosted: Thu Jun 23, 2005 10:23 pm
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
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 Developer


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

PostPosted: Fri Jun 24, 2005 9:26 pm
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
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 Developer


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

PostPosted: Tue Jul 05, 2005 9:35 pm
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:

Use [URL] BBCode for External Links

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:

Use [URL] BBCode for External Links
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Store the data for fixed length COBOL Programming 1
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top