IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Help regarding FILEAID to FILEMANAGER CONVERSION


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sivasaras

New User


Joined: 29 Sep 2007
Posts: 93
Location: chenna/i-

PostPosted: Thu Dec 15, 2011 7:25 pm
Reply with quote

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
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Thu Dec 15, 2011 10:42 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Dec 15, 2011 11:15 pm
Reply with quote

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
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Fri Dec 16, 2011 12:28 am
Reply with quote

If it is Rexx then stick a Trace in it.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Fri Dec 16, 2011 1:03 am
Reply with quote

Nic Clouston wrote:
If it is Rexx

then I am Marie of Romania icon_confused.gif
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Fri Dec 16, 2011 3:03 am
Reply with quote

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 icon_exclaim.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Dec 16, 2011 3:22 am
Reply with quote

Quote:
It is probably something designed by either File Aid or File Manager

icon_redface.gif my bad

i was checking an older manual, the constructs are valid for file manager 11.1 FASTREXX scripting

as per manual here
publib.boulder.ibm.com/infocenter/pdthelp/v1r1/index.jsp?topic=%2Fcom.ibm.filemanager.doc_11.1%2Fbase%2Ffmnu1l01749.htm

or here
publib.boulder.ibm.com/infocenter/pdthelp/v1r1/index.jsp?topic=%2Fcom.ibm.filemanager.doc_11.1

with the new IBM approach for publishing the manuals to find out what link to post has become a pain in the ***
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Dec 16, 2011 4:04 am
Reply with quote

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. . .

icon_rolleyes.gif
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Dec 16, 2011 4:17 am
Reply with quote

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
View user's profile Send private message
sivasaras

New User


Joined: 29 Sep 2007
Posts: 93
Location: chenna/i-

PostPosted: Fri Dec 16, 2011 6:44 pm
Reply with quote

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
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Fri Dec 16, 2011 8:56 pm
Reply with quote

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
View user's profile Send private message
sivasaras

New User


Joined: 29 Sep 2007
Posts: 93
Location: chenna/i-

PostPosted: Fri Dec 16, 2011 10:11 pm
Reply with quote

No without SAVE_OUT() i am not getting Header & trailers only the detail records alone came in the output.
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Mon Dec 19, 2011 11:07 pm
Reply with quote

Did you ALSO remove the RSTR_OUT along with the SAVE_OUT????
Back to top
View user's profile Send private message
sivasaras

New User


Joined: 29 Sep 2007
Posts: 93
Location: chenna/i-

PostPosted: Wed Dec 21, 2011 3:31 pm
Reply with quote

Yes i used only SAVE_OUT() and removed the RSTR_OUT()
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Search two or more word with FILEAID Compuware & Other Tools 15
No new posts 10 byte RBA conversion DB2 2
No new posts 10 byte RBA conversion -non applicati... JCL & VSAM 1
No new posts file manager is doing string conversion IBM Tools 3
No new posts Generate output lines (SYSIN card for... DFSORT/ICETOOL 4
Search our Forums:

Back to Top