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

Creating a sort card thru SYNCSORT


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
miosne
Warnings : 1

New User


Joined: 13 Mar 2006
Posts: 63
Location: italy

PostPosted: Tue Oct 30, 2007 3:25 pm
Reply with quote

Hi all, I've the code below.

//*
//STEP010 EXEC PGM=SORT,REGION=0K
//SYSOUT DD SYSOUT=*
//SYSDBOUT DD SYSOUT=*
//SORPRINT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SORTIN DD DSN=MIFENDPV.PROD.ENFA07K,DISP=SHR
//SORTOUT DD DSN=&&ENFTR01,DISP=(,PASS),
// SPACE=(TRK,(1,1),RLSE),
// DCB=(RECFM=FB,LRECL=80,BUFNO=5)
//SYSIN DD *
SORT FIELDS=COPY
INCLUDE COND=(1,3,CH,EQ,C'002')
OUTREC FIELDS=(4,6,7,73,C' ')

This give me an output like this "200709"
I want to create a sort card like this below including the variable "200709"
Can i do it???

SORT FIELDS=COPY
INCLUDE COND=(266,1,CH,EQ,C'S',AND,
43,8,CH,EQ,C'200709',AND,
126,1,CH,NE,C'S')

Thanks a lot
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Tue Oct 30, 2007 3:31 pm
Reply with quote

miosne,

Quote:
I want to create a sort card like this below including the variable "200709"
Can i do it???


Yes,you can. Try and let us know the results.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Tue Oct 30, 2007 3:33 pm
Reply with quote

miosne,

Quote:
43,8,CH,EQ,C'200709',


why is the length coded as 8 instead of 6?
Back to top
View user's profile Send private message
miosne
Warnings : 1

New User


Joined: 13 Mar 2006
Posts: 63
Location: italy

PostPosted: Tue Oct 30, 2007 3:34 pm
Reply with quote

sorry, the code is "43,6,ch,eq,c'200709'"
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Tue Oct 30, 2007 3:39 pm
Reply with quote

Quote:
sorry, the code is "43,6,ch,eq,c'200709'"


Ok. Yes you can use this sort condition in your sort card if your requirement is to check if the 6 digits starting from 43rd position is 200709.
Back to top
View user's profile Send private message
miosne
Warnings : 1

New User


Joined: 13 Mar 2006
Posts: 63
Location: italy

PostPosted: Tue Oct 30, 2007 3:48 pm
Reply with quote

Aaru, I've to catch the parameter '200709' from the STEP010 and creating a dinamic sort card like the example. icon_redface.gif
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Tue Oct 30, 2007 3:56 pm
Reply with quote

miosne,

Quote:
creating a dinamic sort card like the example


What actually is your requirement? you never mentioned that you wanted to create a dynamic sort card in your first post.

Quote:
ve to catch the parameter '200709' from the STEP010


Even your SORT card is in step10 and from where are you fetching "200709".

Please explain your requirements clealy so that people can help you.
Back to top
View user's profile Send private message
miosne
Warnings : 1

New User


Joined: 13 Mar 2006
Posts: 63
Location: italy

PostPosted: Tue Oct 30, 2007 4:21 pm
Reply with quote

Hte output from STEP010 is the parameter that i want to put in the sort card below.(red)

I want to create the sort card below including the date from the STEP010.

SORT FIELDS=COPY
INCLUDE COND=(266,1,CH,EQ,C'S',AND,
43,8,CH,EQ,C'200709',AND,
126,1,CH,NE,C'S')
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Tue Oct 30, 2007 5:13 pm
Reply with quote

miosne
Change you STEP10 SYSIN like this
Code:
 SORT FIELDS=COPY                                   
  INCLUDE COND=(1,3,CH,EQ,C'002')                   
 OUTFIL BUILD=(2:C'SORT FIELDS=COPY ',80:X,/,       
 2:C'INCLUDE COND=(266,1,CH,EQ,C''S'',AND,',80:X,/, 
 2:C'4,6,CH,EQ,C''',4,6,C''',AND,',80:X,/,           
 2:C'126,1,CH,NE,C''S'')',80:X)                     
                     


this will generate a SORTCARD like this
Code:
  SORT FIELDS=COPY                   
 INCLUDE COND=(266,1,CH,EQ,C'S',AND,
 4,6,CH,EQ,C'XXXXXX',AND,           
 126,1,CH,NE,C'S')                   


XXXXXX will be generated dynamically
Back to top
View user's profile Send private message
miosne
Warnings : 1

New User


Joined: 13 Mar 2006
Posts: 63
Location: italy

PostPosted: Tue Oct 30, 2007 6:00 pm
Reply with quote

The rc is equal 12:

Code:
 SYNCSORT FOR Z/OS  1.1DR   TPF3A  U.S. PATENTS:
                                        CEDACRI
 PRODUCT LICENSED FOR CPU SERIAL NUMBER 4C2AD, M
 SYSIN :                                       
  SORT FIELDS=COPY                             
  INCLUDE COND=(1,3,CH,EQ,C'002')               
  OUTFIL BUILD=(2:C'SORT FIELDS=COPY ',80:X,/, 
             *                                     
                2:C'INCLUDE COND=(266,1,CH,EQ,C'
                2:C'4,6,CH,EQ,C''',4,6,C''',AND,
                2:C'126,1,CH,NE,C''S'')',80:X) 
 WER268A  OUTFIL STATEMENT  : SYNTAX ERROR     
 WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000 
 WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Tue Oct 30, 2007 6:58 pm
Reply with quote

miosne
The SORT card that i posted was a tested one... wonder why you got this SYNTAX error? icon_eek.gif
Try changing that BUILD to OUTREC
Back to top
View user's profile Send private message
miosne
Warnings : 1

New User


Joined: 13 Mar 2006
Posts: 63
Location: italy

PostPosted: Tue Oct 30, 2007 7:08 pm
Reply with quote

It works.
Thank'you very much.

saluti dall'italia.
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Tue Oct 30, 2007 7:16 pm
Reply with quote

miosne
Is that working, after changing BUILD to OUTREC?
Or you had anyother syntax mistakes?
Back to top
View user's profile Send private message
miosne
Warnings : 1

New User


Joined: 13 Mar 2006
Posts: 63
Location: italy

PostPosted: Tue Oct 30, 2007 7:22 pm
Reply with quote

no, I've only follow your indication.
I've substitute BUILD with OUTREC!!!! icon_biggrin.gif

Can I ask you another thing???
or you prefer that I open another topic??
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Tue Oct 30, 2007 7:38 pm
Reply with quote

Quote:
SYNCSORT FOR Z/OS 1.1DR
Since your SYNCSORT was old version i guessed it wont have the the SYNTAX for BUILD under OUTFIL.
It was just a guess.
Some how you got it right icon_smile.gif

Quote:
Can I ask you another thing???
or you prefer that I open another topic??
If that question is related to same topic then go ahead and ask, else open a new topic
Back to top
View user's profile Send private message
miosne
Warnings : 1

New User


Joined: 13 Mar 2006
Posts: 63
Location: italy

PostPosted: Tue Oct 30, 2007 7:40 pm
Reply with quote

ok, I open a new topic icon_biggrin.gif
Back to top
View user's profile Send private message
vicky10001
Warnings : 1

Active User


Joined: 13 Jul 2005
Posts: 136

PostPosted: Tue Oct 30, 2007 7:52 pm
Reply with quote

SORT FIELDS=(59,4,BI,A,4,8,CH,A),EQUALS
OUTREC FIELDS=(1:1,13,
14:16X,
30:30,1)

Please use the above sysin
Back to top
View user's profile Send private message
miosne
Warnings : 1

New User


Joined: 13 Mar 2006
Posts: 63
Location: italy

PostPosted: Tue Oct 30, 2007 8:06 pm
Reply with quote

what do you mean???
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 Help with SORT - I need to validate d... DFSORT/ICETOOL 7
No new posts Syncsort help SYNCSORT 3
No new posts JCL sort to compare dates in two file... DFSORT/ICETOOL 2
No new posts Is this possible via sort (in one pass)? SYNCSORT 4
No new posts GDG generation name to GDG Base name ... DFSORT/ICETOOL 3
Search our Forums:

Back to Top