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

Dynamic sort card creation using SYNCSORT


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

Superior Member


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

PostPosted: Tue Apr 20, 2010 7:31 pm
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: 8797
Location: Welsh Wales

PostPosted: Tue Apr 20, 2010 7:32 pm
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
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: 8797
Location: Welsh Wales

PostPosted: Tue Apr 20, 2010 7:41 pm
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
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: 8797
Location: Welsh Wales

PostPosted: Tue Apr 20, 2010 7:55 pm
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: 2146
Location: At my coffee table

PostPosted: Tue Apr 20, 2010 8:27 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 8
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Using Dynamic file handler in the Fil... COBOL Programming 2
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top