× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Ok, let me rephrase this. Running it as a menu item, if you type in 'MYOBJECT.TXT ' and '/TESTDIRECTORY ' with the apostrophes and trailing blanks, does it work?
CPY OBJ('/home/rob/aatest2.txt ') TOOBJ('/home/rob/aatest3.txt ')
This command fails with
Object not found. Object is /home/rob/aatest2.txt.
But if I run it as
CPY OBJ('/home/rob/aatest2.txt') TOOBJ('/home/rob/aatest3.txt')
It works fine.
When you run that command from CL it is passing the trailing blanks.
You may have to modify it to
EXPDTMDOC DOC(%trim(&NAMEOBJ)) DIR(%trim(&PATHDIR)) TOFMT(*CSV) +
NEWOBJ('OBJECT' *CAT '.' *CAT 'CSV') +
TODIR('/DTMDIR/EXPDOCS')


-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of John Candidi
Sent: Wednesday, March 13, 2019 8:23 AM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: RE: IFS CL Program

It does work as a menu item

John A. Candidi  |  IT Systems, Applications and Support Manager
2250 Chapel Avenue West, Suite 200, Cherry Hill, NJ 08002

Office: 856-779-6915
Cell:  484-645-5598
Fax:  856-779-0719
Email: jacandidi@xxxxxxxxxxxxxxxxx
Web:  www.aeiginsurance.com
    



-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxxxxxxxx] On Behalf Of Rob Berendt
Sent: Wednesday, March 13, 2019 8:22 AM
To: Midrange Systems Technical Discussion
Subject: RE: IFS CL Program

Basic first step: Can you get that EXPDTMDOC command to work using a single directory and object?

DCL VAR(&PATHDIR) TYPE(*CHAR) LEN(35) VALUE('/TEST')
DCL VAR(&OBJECT) TYPE(*CHAR) LEN(15) VALUE('MYOBJ.TXT')
EXPDTMDOC DOC(&NAMEOBJ) DIR(&PATHDIR) TOFMT(*CSV) +
NEWOBJ('OBJECT' *CAT '.' *CAT 'CSV') +
TODIR('/DTMDIR/EXPDOCS') May work different than
EXPDTMDOC DOC('MYOBJ.TXT') DIR('/TEST') TOFMT(*CSV) +
NEWOBJ('OBJECT' *CAT '.' *CAT 'CSV') +
TODIR('/DTMDIR/EXPDOCS') Because of the trailing blanks.
However I would hope that
https://www.inventivedesigners.com/products/dtm/components/dtm-engine
(I had to google that command)
would have handled the trailing blanks, but it doesn't hurt to test.


-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of John Candidi
Sent: Wednesday, March 13, 2019 8:07 AM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: RE: IFS CL Program


Again, right now very basic and don't laugh, I am not a programmer.

PGM

DCL VAR(&PATHDIR) TYPE(*CHAR) LEN(35)
DCL VAR(&OBJECT) TYPE(*CHAR) LEN(15)
DCLF FILE(JACQRYLIB/DTMOUT8)

START:

LOOP:
MONMSG MSGID(CPF0864) EXEC(GOTO CMDLBL(THEEND))
IF (&TYPEOBJ *EQ *STMF) THEN(GOTO CMDLBL(EXPORT))

/* CPY OBJ(&OBJECT) TOOBJ('&PATHDIR CONCAT +
&NAMEOBJ') TOCCSID(37) DTAFMT(*TEXT) */

EXPORT: EXPDTMDOC DOC(&NAMEOBJ) DIR(&PATHDIR) TOFMT(*CSV) +
NEWOBJ('OBJECT' *CAT '.' *CAT 'CSV') +
TODIR('/DTMDIR/EXPDOCS')
GOTO LOOP

THEEND:
ENDPGM

John A. Candidi  |  IT Systems, Applications and Support Manager
2250 Chapel Avenue West, Suite 200, Cherry Hill, NJ 08002

Office: 856-779-6915
Cell:  484-645-5598
Fax:  856-779-0719
Email: jacandidi@xxxxxxxxxxxxxxxxx
Web:  www.aeiginsurance.com
    



-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxxxxxxxx] On Behalf Of Rob Berendt
Sent: Wednesday, March 13, 2019 7:54 AM
To: Midrange Systems Technical Discussion
Subject: RE: IFS CL Program

Not really knowing a thing about what this is doing (like example code) my first WAG would be that you are not using variable length fields.
There's a difference between these two directories:
'/mydirectory'
'/mydirectory '

-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of John Candidi
Sent: Wednesday, March 13, 2019 7:34 AM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: IFS CL Program

All,

I have to move data from IFS Directories to either a .txt or .csv files

My directories look like this: [cid:image009.png@01D4D95C.F96FCF60]

That set of numbers is basically my key to the folders underneath that contain documents. I want to copy or export them to a different format but I want to do it phases. Pull 1000, then 5000, etc so I wrote the directory info out to a file. Now I can easily select the data that I want to pull. We have over 500,000 documents so this gives us a lot of flexibility to be able to work around other scheduled system events.


I am trying to write a CL program to find that directory, check for type = *STMF, and export or copy the documents and move them off somewhere (haven't decided just yet) . the documents look similar to this:
[cid:image010.png@01D4D95E.AB712820]

These documents all belong to that key above.

The problem I having is matching the directory in the IFS to the directory in my file. They MATCH for sure, I just can't get the CL program to see that.

Here is what I want to do.

Declare my file
Pull directory info from record 1 in the file I have declared Check to see if the object type beneath the directory is STMF Either EXPORT the doc to a .CSV format naming it xxxxx.csv or copy it a text file Go to the next record and start all over

Pretty simple but I don't do this ever . I have already spent a good bit of time with not the best results.

Any help would be appreciated...




John A. Candidi | IT Systems, Applications and Support Manager
2250 Chapel Avenue West, Suite 200, Cherry Hill, NJ 08002 [cid:image012.jpg@01D1C259.112E7430]
Office: 856-779-6915
Cell: 484-645-5598
Fax: 856-779-0719
Email: jacandidi@xxxxxxxxxxxxxxxxx<mailto:elselfe@xxxxxxxxxxxxxxxxx>
Web: www.aeiginsurance.com
[cid:image002.png@01D35ED7.4FE40700]<https://www.facebook.com/AEIGinsurance> [cid:image003.png@01D35ED7.4FE40700] <https://www.linkedin.com/company/american-european-insurance-group-inc-/> [cid:image004.jpg@01D35ED7.4FE40700] <https://www.twitter.com/aeiginsurance>




Confidentiality Notice: This message and any attachments contain confidential, proprietary, or privileged information and is intended only for the intended recipients. If you are not an intended recipient, you should not disseminate, distribute, or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late, or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required, please request a hard-copy version.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://amazon.midrange.com
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://amazon.midrange.com
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://amazon.midrange.com

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.