View previous topic :: View next topic |
Author |
Message |
hellohatim Beginner
Joined: 12 Apr 2007 Posts: 28 Topics: 7
|
Posted: Sun Jun 24, 2007 11:01 pm Post subject: Set a Return code in Syncsort |
|
|
Hi,
I wanted to set RC = 8 on when one of my files is non-empty. This is the error file which I am populating on a field which is spaces.
NULLOFL will allow me to set RC on an empty file only... can someone pls help?
Regards,
Hatim. _________________ -Hatim M P |
|
Back to top |
|
|
hellohatim Beginner
Joined: 12 Apr 2007 Posts: 28 Topics: 7
|
Posted: Sun Jun 24, 2007 11:12 pm Post subject: |
|
|
Hi,
I tried this, it does work, but I wld still prefer to get it done in SORT itself...
Code: |
//**********************************************************************
//STEP040 EXEC PGM=IDCAMS
//*
//SYSUT1 DD DISP=SHR,DSN=<PRFX>.HATIM.MERERRO2
//*
//SYSIN DD *
PRINT INFILE(SYSUT1) CHARACTER COUNT(1)
IF LASTCC = 4 THEN SET MAXCC = 0
ELSE SET MAXCC = 8
/*
//*
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//********************************************************************** |
_________________ -Hatim M P |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Mon Jun 25, 2007 7:19 am Post subject: |
|
|
Quote: |
but I wld still prefer to get it done in SORT itself...
|
hellohatim,
Can you let me 1 reason as to why you prefer sort? Remember that SORT may or may not be available in all shops ( it might vary DFSORT/Syncsort/Ca-sort) but IDCAMS is the Standard utility in every mainframe. Why go for an add-on product when there is a tool which is standard and you don't have to worry about the syntax compatibility. Just because you have a hammer that does not mean everything you see is a Nail.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
hellohatim Beginner
Joined: 12 Apr 2007 Posts: 28 Topics: 7
|
Posted: Tue Jun 26, 2007 11:17 pm Post subject: |
|
|
Hi Koluso,
Tx for ur helpful reply. I understand you have very good quotes at hand.
Now for your question as to why I want to use SORT only. Nothing gr8 as such, my work will still be done thru IDCAMS, but its just the quest for knwing something more, getting things done in a better way. I dont think this is too much to ask for...
Finally my apologies if I hv hurt ur sentiments by posting this question on the forum.
Tx & Regards,
Hatim. _________________ -Hatim M P |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Wed Jun 27, 2007 6:40 am Post subject: |
|
|
hellohatim,
I wasn't hurt or anything by your question. I just wanted to know what was the reasoning behind seeking a sort solution. Trust me using the IDCAMS is the best/efficient way of getting the desired results.
btw please take time to spell out the entire words instead of using chat lingo
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
|
|