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
 

 

Dynamic sort card creation using SYNCSORT

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

New User


Joined: 27 Mar 2007
Posts: 30
Location: USA

PostPosted: Tue Apr 20, 2010 6:57 pm    Post subject: Dynamic sort card creation using SYNCSORT
Reply with quote

Hi,

This is the first time I am trying to create a dynamic sort card, managed to seek some online help, but still unable to generate a sort card. Hence can any body help me out with the following:

Code:
//SORT1    EXEC PGM=SORT
//INDD1    DD DSN=TEMP.FILE, -->containing Julian date in yyddd
//            DISP=SHR
//INDD2    DD DSN=INPUT1.FILE, --> Actual data file
//            DISP=SHR
//OUT1CNTL DD DSN=MY.OUT1, --> this file will contain the dynamic sortcard
//            DISP=(NEW,CATLG,DELETE),
//            RECFM=FB,
//            LRECL=80,
//            SPACE=(CYL,(1,1),RLSE)
//OUTDD2   DD DSN=MY.OUT2, --> this file will contain records based on the criteria generated of the sort card
//            DISP=(NEW,CATLG,DELETE),
//            RECFM=VB,
//            LRECL=900,
//            SPACE=(CYL,(1,1),RLSE)
//TOOLIN   DD *
  SELECT FROM(INDD1) TO(OUT1CNTL) ON (1,5,CH) FIRST USING(CTL1)
  COPY FROM(INDD2) TO(OUTDD2) USING(OUT1)
/*
//CTL1CNTL DD *
  SORT FIELDS=COPY
  OUTFIL REMOVECC,
  HEADER1=(3:'SORT FIELDS=COPY'),
  HEADER2=(3:'INCLUDE COND=(20,5,CH,GE,'),
   OUTREC=(2X,1,5,C')',70X)
/*
//SYSOUT   DD SYSOUT=*


Reqt:

INDD1 - contains Julian date - starting at position 1 and of lenght 5
INDD2 - is the input data file sorted on certain key field - Variable length file - where date field starts at 16th position (+4bytes as its VB) of length 5
OUTDD2 - should contain records GE date in INDD1

Code:
Abends with U0016, SYSOUT displays:
********************************* TOP OF DATA *********************************
 SYNCSORT FOR Z/OS  1.3.2.1R 
 WER276B  SYSDIAG= 147404, 256460, 256460, 726900                             
 WER164B  1,028K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,           
 WER164B     0 BYTES RESERVE REQUESTED, 1,016K BYTES USED                     
 WER146B  4K BYTES OF EMERGENCY SPACE ALLOCATED                               
 WER267A  SORT STATEMENT    : STATEMENT NOT FOUND                             
 WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000                                 
 WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE                                 

Can you please advise what exactly is going wrong here?

Thanks!

Edited: Please use BBcode when You post some code/error, that's rather readable, Thanks... Anuj
Back to top
View user's profile Send private message

Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Apr 20, 2010 7:31 pm    Post subject: Reply to: DYNAMIC SORT CARD CREATION USING SYNCSORT
Reply with quote

Quote:
OUTDD2 - should contain records GE date in INDD1
What is GE here?

You said,
Quote:
//OUT1CNTL DD DSN=MY.OUT1, --> this file will contain the dynamic sortcard
ok, what control cards do you want there? And how do you want to generate that?

I'm not sure if I've understood the requirement, can you rephrase that again?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Apr 20, 2010 7:32 pm    Post subject:
Reply with quote

Shouldn't the PGM= be SYNCTOOL or whatever rather than SORT
Back to top
View user's profile Send private message
simmimahajan

New User


Joined: 27 Mar 2007
Posts: 30
Location: USA

PostPosted: Tue Apr 20, 2010 7:36 pm    Post subject: Reply to: DYNAMIC SORT CARD CREATION USING SYNCSORT
Reply with quote

Hi Anuj/Expat,

I want to achieve this using SYNCSORT. Originally the reference used had the PGM=SYNCTOOL but it is against our standards.

Also, GE meant Greater than Equal to date in file1 (INDD1).

Control Card for File2
SORT FIELDS=COPY
INCLUDE COND=(20,5,CH,GE,C'10075')


And 10075 (Julian Date) is the date in File1, which would keep changing on each run.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Apr 20, 2010 7:41 pm    Post subject:
Reply with quote

Quote:
Originally the reference used had the PGM=SYNCTOOL but it is against our standards.
A shame, as that is the only way that I can think of.

It must be wonderful being a right dickhead - you get promoted out of the way to positions where you can dictate standards to the people who actually try to do some work. Ain't it always the way icon_rolleyes.gif
Back to top
View user's profile Send private message
simmimahajan

New User


Joined: 27 Mar 2007
Posts: 30
Location: USA

PostPosted: Tue Apr 20, 2010 7:45 pm    Post subject: Reply to: DYNAMIC SORT CARD CREATION USING SYNCSORT
Reply with quote

My Apologies, but I wasn't trying to dictate standards, it's against the coding standards in our project, hence wanted a way out with SYNCSORT.
Thanks!
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Apr 20, 2010 7:55 pm    Post subject:
Reply with quote

I was not referring to you, but merely the fool that set those standards at your site.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Tue Apr 20, 2010 8:27 pm    Post subject:
Reply with quote

Why not just use your CTL1 for sort with INDD1 as input and output to OUT1.
Then use your OUT1 for sort with INDD2 as input and output to OUTDD2.
Two physical steps using sort versus a single tool step (with two passes).
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 Innovations in Your Mainframe Sort Arun Raj PC Guides & IT News 4 Wed Mar 15, 2017 10:38 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts SORT requirement sjiraga COBOL Programming 6 Thu Mar 09, 2017 9:11 pm
No new posts SORT to append Month and YEAR in MMYY... tisamf DFSORT/ICETOOL 1 Wed Mar 08, 2017 4:46 pm
No new posts JCL sort Match and NoMatch rakeshsekar1987 SYNCSORT 2 Thu Feb 02, 2017 10:26 pm


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