File Manager in Batch: excluding all records, find records and deleting non-excluded finds

File-AID from Compuware and File Manager from IBM.
Post Reply
User avatar
tonynix
New Member
Posts: 2
Joined: Fri Nov 12, 2021 2:00 am

File Manager in Batch: excluding all records, find records and deleting non-excluded finds

Post by tonynix »

I'm a newbie to IBM FM. I have an ISPF edit dialog where I open a PDS member, do an EXCLUDE ALL, then FIND 'string' ALL, then DEL NX ALL. I'm having trouble finding good examples in the IBM User Guide. I've tried using the FCH function. When I run my batch job with PGM=FILEMGR, and a SYSIN card of F "string" ALL, FM gives back all the records. However, when I try EXCLUDE ALL as the preceding line to the FIND command, FM tells me the EXCLUDE command is invalid.

Here are my

Code: Select all

//SYSIN cards:
$$FILEM FCH DSNIN='libname(pdsmem)'
EXCLUDE ALL
F "ID(string)" ALL
DEL NX ALL
Output gives me a FMNBA017: Invalid command: EXCLUDE

What am I doing wrong?

TIA, Tony
User avatar
Anuj Dhawan
Founder
Posts: 2802
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: File Manager in Batch: excluding all records, find records and deleting non-excluded finds

Post by Anuj Dhawan »

Every command in batch for IBM File Manager should precede with "$$FILEM", try that for 'EXCLUDE' and other commands.


PS.: Please note, my current shop does not use IBM File Manager, so this is off the bat.
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
User avatar
tonynix
New Member
Posts: 2
Joined: Fri Nov 12, 2021 2:00 am

Re: File Manager in Batch: excluding all records, find records and deleting non-excluded finds

Post by tonynix »

Hi Anij,
Good suggestion, so I tried adding $$FILEM ahead of each of the EXCLUDE, FIND, and DEL commands. FM didn't like that. I get two new error messages: FNMBB334 "PROC=* specified with no following cards", and FMNBE098 "Keyword verification discontinued for any subsequent command."

What's strange to me is that those three commands work exactly in the ISPF EDIT screen as they're typed in the SYSIN. I would think that IBM would be consistent where you can use the same command syntax in batch as online.

The doc does say in come of the functions that it's online only.
User avatar
Anuj Dhawan
Founder
Posts: 2802
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: File Manager in Batch: excluding all records, find records and deleting non-excluded finds

Post by Anuj Dhawan »

Not sure if I've misunderstood but why do you believe that 'ISPF edit commands' and commands for 'IBM File Manager' should work just same?

If you write an ISPF Edit Macro, commands will work in same fashion as in an ISPF edit panel.
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “File-AID and IBM File Manager.”