|
I want to get the first record of a text file in the IFS and be able to copy that into a file (let's say, QTEMP/TEMPORARY) which has 132 characters long.
Is QShell an option? If so you could do something like this: PGM DCL VAR(&STMF) TYPE(*CHAR) LEN(256) DCL VAR(&CMD) TYPE(*CHAR) LEN(356) CHGVAR VAR(&STMF) VALUE('/home/klemscot/test.txt') OVRDBF FILE(STDOUT) TOFILE(QTEMP/TEMPORARY) CHGVAR VAR(&CMD) VALUE('head -n 1' *BCAT &STMF) STRQSH CMD(&CMD) DLTOVR FILE(STDOUT) ENDPGM
As an Amazon Associate we earn from qualifying purchases.
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.