Page 1 of 2

FILEAID TO FILEMGR

PostPosted: Fri Oct 18, 2013 9:40 am
by Dheeraj Sharma
What is the function of the below statement in sysin for fileaid utility with one input and one output file?

$$DD01 COPY MOVE=(+0,4,+0),OUT=1

How to conver this step into FILEMGR??

Thanks in advance :) :) :) :) :)

Re: FILEAID TO FILEMGR

PostPosted: Fri Oct 18, 2013 1:56 pm
by NicC
Have you tried using that card to find out precisely what it does? Or used the help to find out? Once you have done that and found out what it does you can explore File Manager to see what it has and see if anything matches what you need. Along the way you will pick up a bit of knowledge about File Manager which will help you in the future.

Re: FILEAID TO FILEMGR

PostPosted: Fri Oct 18, 2013 6:07 pm
by Ed Goodman
My FileAid is rusty...does that mean "copy only the first record, and start the data copy at position 4?"

Re: FILEAID TO FILEMGR

PostPosted: Fri Oct 18, 2013 7:35 pm
by NicC
My thought was that it is copy the first 4 bytes of the first record only. But I have rarely used File aid and never for doing such a task and we have lost File Aid here as it has been replaced by File Manager otherwise I would have pressed F1.

Re: FILEAID TO FILEMGR

PostPosted: Mon Oct 21, 2013 11:55 am
by Dheeraj Sharma
I understand the meaning of above FILEAID step. It means copy four bytes from 1st position of input file to 1st position of output file and copy only one record.
However still i dont know how to convert it into filemanager (FILEMGR)
Can anyone help me with that??
Thanks and Regards,
Dheeraj

Re: FILEAID TO FILEMGR

PostPosted: Mon Oct 21, 2013 3:22 pm
by NicC
I onl;y have a quick reference guide to hand but looking at that it seems that you may achieve what you want by using a template. Start reading about templates. I do not know if this can be used in batch though. Maybe you should start looking at the full documentation.

Re: FILEAID TO FILEMGR

PostPosted: Mon Oct 21, 2013 7:23 pm
by dick scherrer
Hello,

Is there some reason this could not be done with your sort product?

Hopefully, what is needed is the same result . . .

Re: FILEAID TO FILEMGR

PostPosted: Mon Oct 21, 2013 8:59 pm
by BillyBoyo
For SORT:

  OPTION COPY,STOPAFT=1
  INREC BUILD=(1,4)


This will output a single four-byte record with the first four bytes of the first input record.

Re: FILEAID TO FILEMGR

PostPosted: Mon Oct 21, 2013 9:34 pm
by Ed Goodman
This works OK.

NLRECS tells it to stop after 1 record
You have to start REXX and use the FLD function to act like a SUBSTR
The SET PAD=ON makes it pass the line with spaces instead of low-values.
//FILEMGR  EXEC PGM=FMNMAIN           
//SYSPRINT DD SYSOUT=*               
//FMNTSPRT DD SYSOUT=*               
//SYSTERM  DD SYSOUT=*               
//DDIN     DD *                       
LINE1                                 
LINE2                                 
LINE3                                 
//DDOUT    DD SYSOUT=*               
//SYSIN    DD *                       
$$FILEM SET PAD=ON                   
$$FILEM DSC NLRECS=1,PROC=*           
OUTREC = FLD(1,4)             

Re: FILEAID TO FILEMGR

PostPosted: Wed Oct 23, 2013 4:20 pm
by Dheeraj Sharma
Hi All,

Thanks a lot for your suggestions. I have done it with sort utility. For now its fine but in future i will convert it into file manager. You people are very helpful.
Thanks and Regards,
Dheeraj Sharma