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
 
Coverting a variable like s9(7)v99 to 9(7)v99 using SORT

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

New User


Joined: 03 Oct 2006
Posts: 7

PostPosted: Fri Feb 23, 2007 2:36 am    Post subject: Coverting a variable like s9(7)v99 to 9(7)v99 using SORT
Reply with quote

I have a variable like s9(7)v99. I would like to covert it 9(7)v99.
Could anyone please help me how to get this?

Thanks

Narendra.

Title Changed
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Feb 23, 2007 2:51 am    Post subject:
Reply with quote

Hello,

Is this a sort question or a programming question?

If it is a sort question, please post some example input data and what you would like the output to look like.

If yo have some JCL set up, please post that as well.
Back to top
View user's profile Send private message
narendraanchala

New User


Joined: 03 Oct 2006
Posts: 7

PostPosted: Fri Feb 23, 2007 3:35 am    Post subject:
Reply with quote

Hi Dick,

This is a SORT question, not programming one.
The following is the data in the file with S9(7)V99.
00000460{
00000230{
00000230{
00000460{
00000460{
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Fri Feb 23, 2007 3:50 am    Post subject:
Reply with quote

I think DFSORT Smart Tricks has that one, have you looked there?
Back to top
View user's profile Send private message
narendraanchala

New User


Joined: 03 Oct 2006
Posts: 7

PostPosted: Fri Feb 23, 2007 3:57 am    Post subject:
Reply with quote

William,

Could you please send the link of that one.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Fri Feb 23, 2007 4:07 am    Post subject:
Reply with quote

You found the DFSORT/ICETOOL forum, the 4th topic is DFSORT/ICETOOL Reference Material
and it's free for the asking.....
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 Feb 23, 2007 4:20 am    Post subject:
Reply with quote

Quote:
I have a variable like s9(7)v99. I would like to covert it 9(7)v99.

The following is the data in the file with S9(7)V99.
00000460{


S9(7)v99 and 9(7)v99 are both 9-byte ZD values as far as DFSORT is concerned. I think what you're really asking is how to convert a ZD value with a C sign ('00000460{' = X'F0F0F0F0F0F4F6F0C0') to a ZD value with an F sign ('000004600' = X'F0F0F0F0F0F4F6F0F0').

Here's a DFSORT job that will do it. I assumed your 9-byte ZD value starts in position 11.

Code:

//S1 EXEC PGM=ICEMAN
//SYSOUT    DD SYSOUT=*
//SORTIN DD DSN=... input file
//SORTOUT  DD DSN=...  output file
//SYSIN     DD *
  OPTION COPY
  INREC OVERLAY=(11:11,9,ZD,TO=ZD,LENGTH=9)
/*
Back to top
View user's profile Send private message
narendraanchala

New User


Joined: 03 Oct 2006
Posts: 7

PostPosted: Fri Feb 23, 2007 4:44 am    Post subject:
Reply with quote

Frank,

I am using the following JCL. Both input and output files has lrecl=135. I am getting error. Could you please correct me if anything is missed in the following JCL.

//STEP010 EXEC PGM=ICEMAN
//SORTIN DD DSN=input
//SORTOUT DD DSN=output
//SYSOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INREC OVERLAY=(25:25,9,ZD,TO=ZD,LENGTH=9)
/*
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Fri Feb 23, 2007 4:47 am    Post subject:
Reply with quote

Do you have at least one space in front of your control cards?
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 Feb 23, 2007 4:49 am    Post subject:
Reply with quote

Quote:
I am getting error.


Whenever you say this, you need to show the messages you received.

In this case, I can guess that you're missing the leading blank before OPTION and the leading blank before INREC, but it would only be a guess.

When I run your statements with the leading blanks, DFSORT does not give an error.
Back to top
View user's profile Send private message
narendraanchala

New User


Joined: 03 Oct 2006
Posts: 7

PostPosted: Fri Feb 23, 2007 9:13 am    Post subject:
Reply with quote

Frank,

I gave one leading space before Option and Inrec but still I am getting the following error

SYSIN :
OPTION COPY
INREC OVERLAY=(25:25,9,ZD,TO=ZD,LENGTH=9)
*
WER268A INREC STATEMENT : SYNTAX ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000

Could you help me why I am getting this error?
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Feb 23, 2007 9:30 am    Post subject:
Reply with quote

Hello narendraanchala,

From your error messages, you are running Syncsort, not DFSORT.

I don't have the Syncsort manual available here. If you reply that you are still looking for the cause of the error, i'll have the material available in the morning and will check it out.
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Fri Feb 23, 2007 10:26 am    Post subject:
Reply with quote

Hi There,

For sync sort please use the following sort card. I have checked it & its working fine .

Code:
//SYSIN    DD  *                       
   OPTION COPY                         
   INREC FIELDS=(25:25,9,ZD,M1,LENGTH=9) 
/*                                     
Back to top
View user's profile Send private message
narendraanchala

New User


Joined: 03 Oct 2006
Posts: 7

PostPosted: Fri Feb 23, 2007 10:36 am    Post subject:
Reply with quote

Thanks Ekta.

Its working fine now.

Thanks to every one for your help guys.
Back to top
View user's profile Send private message
narendraanchala

New User


Joined: 03 Oct 2006
Posts: 7

PostPosted: Fri Feb 23, 2007 9:43 pm    Post subject:
Reply with quote

Here is one more JCL

SORT FIELDS=COPY
OUTREC FIELDS=(1:1,24,
25:25,9,ZD,EDIT=(TTTTTTTTT),
34:34,102),CONVERT

Thanks to all for helping me.
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 JOINKEYS Paired and Unpaired Sort MFwhiz DFSORT/ICETOOL 4 Fri Sep 29, 2017 1:48 am
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
No new posts OC4 in SORT Mohan Kothakota DFSORT/ICETOOL 2 Tue Sep 12, 2017 6:30 pm
No new posts Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm

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