|
View previous topic :: View next topic
|
| Author |
Message |
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2482 Location: @my desk
|
|
|
|
Hi
I am using batch fileaid to check for some criteria in input file and writing those records satisfying the criteria to output file.
Whenever there is no record in input file satisfying the criteria, I am getting an empty output file(as required)and also a RC=8(This is what is expected as per FA manual),
Is there any way of getting rid of this RC 8, so that I can reset this to 0 or 4.
Thanks in advance,
Arun |
|
| Back to top |
|
 |
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2482 Location: @my desk
|
|
|
|
Hi,
Sorry for making the requirement not clear.
My actual requirement is to check for numeric for specific positions and I want only those records with numeric values in the output file.
I think this is possible thru DFSORT, but in our shop we are using Syncsort.
As the same could be achieved thru file-aid, I went for that option;but ended up with RC 8 as I said earlier, whenever the output file is empty.
Thanks,
Arun |
|
| Back to top |
|
 |
enrico-sorichetti
Superior Member

Joined: 14 Mar 2007 Posts: 10900 Location: italy
|
|
|
|
| What' s wrong in checking for a return code of 8 instead of 0 |
|
| Back to top |
|
 |
murmohk1
Senior Member
.jpg)
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Arun,
| Quote: |
| My actual requirement is to check for numeric for specific positions and I want only those records with numeric values in the output file. |
If you can come with sample date (I/P and O/P)..... we may help you in SYNCSORT itself. |
|
| Back to top |
|
 |
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2482 Location: @my desk
|
|
|
|
Ya sure, Here s my input....
| Code: |
000010305,0092 7041,0001, 11, 1,123453456
000010305,1692 7041,0001, 11, 1,123453456
000010305,16 237041,0001, 11, 1,123453456
000010305,169237041,0001, 11, 1,123453456
000010305,000000041,0001, 11, 1,123453456
|
I want to check for numeric in positions 1 - 9, 11-19 and 21-24.
please let me know if it is possible in syncsort
Thanks,
Arun |
|
| Back to top |
|
 |
murmohk1
Senior Member
.jpg)
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Arun,
I/P is fine. How about O/P?
I believe your should look lke-
| Code: |
000010305,169237041,0001, 11, 1,123453456
000010305,000000041,0001, 11, 1,123453456 |
|
|
| Back to top |
|
 |
murmohk1
Senior Member
.jpg)
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
| Back to top |
|
 |
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2482 Location: @my desk
|
|
|
|
Hi Murali,
I have nt forgotten it....I admit that I got the required output (using FILEAID and not thru SYNCSORT) as I had mentioned there.
I am happy with whatever output I am getting with file-aid except the return-code.
And this is a different query by which I wanted to know whether I could change the return-code of batch file-aid.
Thanks,
Arun |
|
| Back to top |
|
 |
murmohk1
Senior Member
.jpg)
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Arun,
| Quote: |
| I could change the return-code of batch file-aid. |
No |
|
| Back to top |
|
 |
saravanans4
New User
Joined: 01 Sep 2003 Posts: 25
|
|
|
|
Yes you can get RC '0' for empty copy by specifying the below parm in batch file aid
| Code: |
//STEPNAME EXEC PGM=FILEAID,
// PARM='OPT=0250100606611121025000005579100'
//DD01 DD DSN=INPUT.FILE,DISP=SHR
//DD01O DD DUMMY
//SYSIN DD *
$$DD01 COPY
/* |
Edited: Please use BBcode when You post some code, that's rather readable...Anuj |
|
| Back to top |
|
 |
Aaru
Senior Member

Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Saravanan,
| Quote: |
| Yes you can get RC '0' for empty copy by specifying the below parm in batch file aid |
You are replying to a year old topic. Also please use the code tag while posting codes. |
|
| Back to top |
|
 |
Anuj Dhawan
Superior Member

Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Hi saravanans4,
Code does work but what is this PARM all about:
| Code: |
| PARM='OPT=0250100606611121025000005579100' |
|
|
| Back to top |
|
 |
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi Anuj,
I found this when I googled around
| Quote: |
The closest thing I can find is a table built during installation. There is a field called BTOPT18 that tells File-Aid what return code to use when a file is empty.
Unfortunately, I can't find and references to how to override this option. The manuals don't have an overall index that I can find, and Compuware didn't create a 'bookshelf' PDF file, just individual books with 8 character names.
--------------------------------------------------------------------------------
There is a parm you can pass to FileAid that will override the first 35 installation defaults, including the 18th one that controls what you need. The bad part is that it overalys all characters starting from the left, so you have to provide the values for the first 17 options as well.
So the execute line needs to look like:
Code:
PGM=FILEAID,PARM='OPT=0250100606611121025000005882104'
Those last two bytes are the return code for an empty file. I tried it and it works. You can put anything from 00 to 99 in there. The other values are the defaults from the manual. In the installation guide, do a find on 'opt=' and you go to the bottom of the list of options.
--------------------------------------------------------------------------------
Well, I have Good News and Bad News. The Good news is that this CAN be overridden. The Bad news is that it is less than straight forward in FileAID.
According to the "File-AID/MVS Installation Guide R8.9" you can modify the Batch FileAID installation options with the following PARM syntax:
Code:
// EXEC PGM=FILEAID,PARM='OPT=????????'
The downside is in the format of those question marks. The following is a summarization of the example in the manual.
The first 5 FileAID Batch options are as follows:
BTOPT01, Displacement 00, Default value 0250, Record Print Default
BTOPT02, Displacement 04, Default value 1, Form Print Default
BTOPT03, Displacement 05, Default value 0, Key Print
BTOPT04, Displacement 06, Default value 06, Batch Buffer Space
BTOPT05, Displacement 08, Default value 06, TSO Buffer Space
In order to override the Batch Buffer Space for example, from it's default value of 06 to 12 the Override would look like this:
Code:
// EXEC PGM=FILEAID,PARM='OPT=02501012'In other words, you have to specifiy ALL the values to the left of the one you are trying to override! Eww Yuk! And to make matters worse, Ed Goodman is correct that the option you want is BTOPT18. So here are the next 13 installation values from the book:
BTOPT06, Displacement 0A, Default Value 6, PRINTER SPACING.
BTOPT07, Displacement 0B, Default Value 1, CHARACTER SET
BTOPT08, Displacement 0C, Default Value 1, TSO PROMPTING.
BTOPT09, Displacement 0D, Default Value 1, ABEND CONTROL.
BTOPT10, Displacement 0E, Default Value 2, DATE FORMATTING.
BTOPT11, Displacement 0F, Default Value 1, MONTH FORMATTING.
BTOPT12, Displacement 10, Default Value 025, I/O ERROR.
BTOPT13, Displacement 13, Default Value 0, UPDATE OPTION.
BTOPT14, Displacement 14, Default Value 0000, UPDATE ACCESS CODE.
BTOPT15, Displacement 18, Default Value 58, PRINT LINES AT 8LPI.
BTOPT16, Displacement 1A, Default Value 82, PRINT LINES AT 12LPI.
BTOPT17, Displacement 1C, Default Value 1, USER FUNCTION.
BTOPT18, Displacement 1D, Default Value 08, NO RECORDS COPIED RETURN CODE.
The manual says "BTOPT18 specifies the return code that File-AID is to issue when records are not selected for copying to any output dataset in a copy operation. The value 08 reflects the current return code issued. Any number from 00 (issue no return code) through 99 is valid. File-AID always reflects the highest return code issued during an execution."
So assuming your shop took all the FileAID installation defaults, in order to change the return code from 08 to 04 your override would look like:
Code:
// EXEC PGM=FILEAID,PARM='OPT=0250100606611121025000005882104'Wow is that ugly or what?
|
Gerry |
|
| Back to top |
|
 |
Anuj Dhawan
Superior Member

Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
oh well..I liked two lines the most from the above text..
and
| Quote: |
| Wow is that ugly or what? |
..
and yup Thanks Gerry..it was quite a good knowledge but I'll keep a book mark of this topic, 'am sure if I've to imlement this..I would need to look here, I wont be able to rememeber it for sure..
This Day starts with good knowledge..Thanks again..  |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|