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
 

 

User Abend 16 while trying sort condition

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

New User


Joined: 25 Apr 2007
Posts: 13
Location: INDIA

PostPosted: Thu May 17, 2007 4:26 pm    Post subject: User Abend 16 while trying sort condition
Reply with quote

Hi All,

While trying to Sort my input based on the below condition I encounter a User Abend Code of 0016. Please help me resolve.

Sort Condition:
OUTFIL IFTHEN=(WHEN=(126,25,CH,EQ,C''),
BUILD=(821:126,56,A)),
IFTHEN=(WHEN=(126,25,CH,NE,C''),
BUILD=(821:70,56,A)),
IFTHEN=(WHEN=(NONE,OVERLAY=(821:C'NONE'))


The Error message is as below:
OUTFIL IFTHEN=(WHEN=(126,25,CH,EQ,C''),
*
BUILD=(821:126,56,A)),
IFTHEN=(WHEN=(126,25,CH,NE,C''),
BUILD=(821:70,56,A)),
IFTHEN=(WHEN=(NONE,OVERLAY=(821:C'NONE'))
WER901I **WARNING** SYNCSORT 1.1 TPF2B WILL EXPIRE IN 57 DAYS
WER268A OUTFIL STATEMENT : SYNTAX ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000

Regards,
Srini
Back to top
View user's profile Send private message

William Thompson

Global Moderator


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

PostPosted: Thu May 17, 2007 4:37 pm    Post subject:
Reply with quote

Check the Syncsort manual, 1.1 is old and the syntax error is pointing to the IFTHEN which is a DFSort command.
Back to top
View user's profile Send private message
srini1528
Currently Banned

New User


Joined: 25 Apr 2007
Posts: 13
Location: INDIA

PostPosted: Thu May 17, 2007 5:17 pm    Post subject: Can we done if then in sort
Reply with quote

Hi,

Is it possible that we run If Then in sort to satisy certain conditions. Please give a detailed description if it can be done and also mention the utility.

Thanks
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


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

PostPosted: Thu May 17, 2007 7:05 pm    Post subject: Re: Can we done if then in sort
Reply with quote

srini1528 wrote:
Hi,

Is it possible that we run If Then in sort to satisy certain conditions. Please give a detailed description if it can be done and also mention the utility.

Thanks


Hi srini1528,

Yeah, it's possible to use ifthen in SORT, it's available with both DFSORT &
SYNCSORT.

If you provide your input & the desired output, we can provide you good suggestions, still for a small background read on.

Following JCL can be used to sort the data-records without removing the header & trailer records.

Code:

//JOBCARD
//*                                           
//STEP050  EXEC PGM=SORT,REGION=4096K         
//*                                           
//SORTIN   DD  DSN=HLQ.HDR.TLR.FILE,     
//              DISP=SHR                       
//SORTOUT  DD  DSN=HLQ.HDR.TLR.FILE.OUT, 
//                DISP=(NEW,CATLG,CATLG),       
//                DSORG=PS,                     
//                RECFM=FB,                     
//                LRECL=80,                     
//                DATACLAS=LARGE,               
//                UNIT=SYSDA                     
//SORTWK01 DD  UNIT=SYSDA,SPACE=(CYL,(20,5)) 
//SYSIN    DD  *                             
//SYSIN    DD  *                                   
  INREC IFTHEN=(WHEN=INIT,OVERLAY=(81:C'1')),     
  IFTHEN=(WHEN=(1,1,CH,EQ,C'H'),OVERLAY=(81:C'0')),
  IFTHEN=(WHEN=(1,1,CH,EQ,C'T'),OVERLAY=(81:C'9'))
  SORT FIELDS=(81,1,CH,A,1,5,CH,A)                 
  OUTREC FIELDS=(1,80)                             
/*                                                 
//SORTMSG  DD  SYSOUT=*                           
//SYSOUT     DD  SYSOUT=*                           
//SYSPRINT  DD  SYSOUT=*                           
//SYSUDUMP DD  SYSOUT=*                           
//CEEDUMP   DD  SYSOUT=*                         



Input file used above is:
HLQ.HDR.TLR.FILE:
Code:
HDR     
55555555
44444444
11111111
99999999
77777777
88888888
TLR     

Output file:
HLQ.HDR.TLR.FILE.OUT
Code:
HDR     
11111111
44444444
55555555
77777777
88888888
99999999
TLR     


Above code must work on SyncSORT sites, if you face any problem ..please let me know.

By the way there had been discussion in the forum on reformatting records with 'IFTHEN' clause, please make a search.
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 Changing sort Card Dynamically vickey_dw DFSORT/ICETOOL 1 Sat Aug 19, 2017 2:33 pm
No new posts SORT to unpack a feild shr_amar DFSORT/ICETOOL 7 Fri Jul 07, 2017 4:32 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Optimize sort inrec parse vishwakotin DFSORT/ICETOOL 6 Mon Jun 26, 2017 11:15 pm
No new posts Reduce CPU Times for Join Sort santoshn SYNCSORT 12 Sat Jun 10, 2017 1:40 pm


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