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
As an Amazon Associate we earn from qualifying purchases.