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
 

 

Creating a sort card thru SYNCSORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Creating a sort card thru SYNCSORT
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: 1288
Location: Chennai, India

PostPosted: Tue Oct 30, 2007 3:31 pm    Post subject: Reply to: Creating a sort card thru SYNCSORT
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: 1288
Location: Chennai, India

PostPosted: Tue Oct 30, 2007 3:33 pm    Post subject: Reply to: Creating a sort card thru SYNCSORT
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    Post subject:
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: 1288
Location: Chennai, India

PostPosted: Tue Oct 30, 2007 3:39 pm    Post subject: Reply to: Creating a sort card thru SYNCSORT
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    Post subject:
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: 1288
Location: Chennai, India

PostPosted: Tue Oct 30, 2007 3:56 pm    Post subject: Reply to: Creating a sort card thru SYNCSORT
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject: Reply to: Creating a sort card thru SYNCSORT
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    Post subject:
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    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 syncsort: copy lines after the keyword shreya19 SYNCSORT 3 Fri Dec 02, 2016 9:47 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm


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