View previous topic :: View next topic
|
Author |
Message |
sivasaras
New User
Joined: 29 Sep 2007 Posts: 93 Location: chenna/i-
|
|
|
|
Code: |
//BTH1789A JOB 'ADNM',USER=BTH1789,
// MSGCLASS=8,NOTIFY=BTH1789
//CSSTEP1A EXEC PGM=FILEMGR 00008600
//SYSPRINT DD SYSOUT=* 00008700
//SYSLIST DD SYSOUT=* 00008800
//SYSTOTAL DD SYSOUT=* 00008900
//SYSUDUMP DD SYSOUT=* 00009000
//DD01 DD DSN=BTH1789.TEST.FILE1, 00009100
// DISP=SHR 00009200
//DD01O DD DSN=BTH1789.TEST.FILE2, 00009300
// DISP=(,CATLG,DELETE), 00009400
// DCB=(RECFM=FB,LRECL=264,BLKSIZE=27984), 00009500
// SPACE=(CYL,(300,300),RLSE) 00009600
//*SYSIN DD * 00009700
//* FILEAID CODE
//*$$DD01 COPY IF=(127,EQ,C'_85'),REPL=(127,C'_01'), 00009800
//* IF=(118,NE,C'MAB_8E1_MB_20'), 00009900
//* IF=(118,NE,C'RCM_MAB_METHOD3') 00010000
//SYSIN DD * 00010002
*+* FMC2FM: Beginning of File Manager statement output *+*
$$FILEM DSC INPUT=DD01,
$$FILEM OUTPUT=DD01O,
$$FILEM PROC=*
RSTR_OUT()
SETC(T_REC,'&ZINREC') /* set input rec in user variable */
IF TESTC(T_REC,127,'==','_85')
THEN DO
OVLY_VAR(T_REC,'_01',127)
RETURN /* process record */
END
IF TESTC(T_REC,129,'==','DE')
THEN DO
VAR_OUT(T_REC,1,128,1)
VAR_OUT(T_REC,131,17,129)
OVLY_OUT(' ',146)
VAR_OUT(T_REC,148,117,148)
SAVE_OUT()
RETURN /* process record */
END
IF TESTC(T_REC,118,'\==','MAB_8E1_MB_20'),
& TESTC(T_REC,118,'\==','RCM_MAB_METHOD3'),
& TESTC(T_REC,118,'\==','MAB_737_MB_S190')
THEN DO
SAVE_OUT()
RETURN /* process record */
END
/+
|
this is my test job which i need to move the fileaid code to filemanager.
i submitted the job but i got ONLY detail records with no header & trailer in the output file.
The input file data is below
Code: |
HEADER20111214'test records'
9MFTAAGBJCBJ332293000000 MAB_736_MB_00 00000 2011111214
1MFTAAGBJHCBJ3322932000000 MAB_736_MB_00 00000 2011111214
TRAILER20111214000002 |
Please advice me what i need to change in the rexx code to get header & Trailer record in the output file.
Thanks
Siva |
|
Back to top |
|
|
Ed Goodman
Active Member
Joined: 08 Jun 2011 Posts: 556 Location: USA
|
|
|
|
Shooting from hip: is your input file variable length? You may need to adjust the columns to account for that.
Do you need a save_out() before the first return? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
are You sure that You are not mixing things ?
I just checked the FILEMANAGER manuals, and SETC/TESTC were not described anywhere |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
If it is Rexx then stick a Trace in it. |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
Nic Clouston wrote: |
If it is Rexx |
then I am Marie of Romania |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
I admit it is unlike any flavour of rexx that I have come across. It is probably something designed by either File Aid or File Manager but TS calls it 'Rexx'. Better polish your stilettos just in case |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Quote: |
with the new IBM approach for publishing the manuals to find out what link to post has become a pain in the *** |
Ahhh - the pain in the asterisks. . .
|
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
enrico,
if you mean getting a URL for the exact page....
never did get the page-pos html correctly,
so i have the ibm document search create a url for me.
i find what I want,
then figure out what i can use as a search key from the page that i am viewing
for the document search,
which will give me a URL for the exact page and often,
place on the page.
otherwise ignore me, t'is late and i have imbibed. (i even looked that up!) |
|
Back to top |
|
|
sivasaras
New User
Joined: 29 Sep 2007 Posts: 93 Location: chenna/i-
|
|
|
|
Hi,
I inserted SAVE_OUT() before the RSTR_OUT() in the code and it works.
now i am able to get the output file correctly with header & Trailer.
Thanks for all your help
Regards,
Siva |
|
Back to top |
|
|
Ed Goodman
Active Member
Joined: 08 Jun 2011 Posts: 556 Location: USA
|
|
|
|
Now, if I read things in the manual correctly, you could probably just get rid of the RSTR_OUT command altogether. It seems to restore the most recently saved record, which you just added as the previous statement.
So you are saving the record, then restoring that saved record. Without the save_out() in there, you were restoring the PREVIOUS record. |
|
Back to top |
|
|
sivasaras
New User
Joined: 29 Sep 2007 Posts: 93 Location: chenna/i-
|
|
|
|
No without SAVE_OUT() i am not getting Header & trailers only the detail records alone came in the output. |
|
Back to top |
|
|
Ed Goodman
Active Member
Joined: 08 Jun 2011 Posts: 556 Location: USA
|
|
|
|
Did you ALSO remove the RSTR_OUT along with the SAVE_OUT???? |
|
Back to top |
|
|
sivasaras
New User
Joined: 29 Sep 2007 Posts: 93 Location: chenna/i-
|
|
|
|
Yes i used only SAVE_OUT() and removed the RSTR_OUT() |
|
Back to top |
|
|
|