Show 2 ways to convert a date from YYMMDD to MMDDYY (MULT operation not acceptable)
Answer / sanjeet kumar
1)CVTDAT() DATE() RTNVAR() FROMFMT() TOFMT()
Source code is required to convert from one date format to another date format.
The source code in CLP is given below:
PGM
DCL VAR(&VAR1) LENGTH(6) TYPE(*CHAR) VALUE('YYMMDD')
DCL VAR(&RCVD) LENGTH(6) TYPE(*CHAR)
DCL VAR(&VAR2) LENGTH(4) TYPE(*CHAR)
DCL VAR(&VAR3) LENGTH(2) TYPE(*CHAR)
CHGVAR VAR(&VAR2) VALUE(%SST(&VAR1 3 4))
CHGVAR VAR(&VAR3) VALUE(%SST(&VAR1 1 2))
CHGVAR VAR(&RCVD) VALUE(&VAR2 *CAT &VAR3)
SNDMSG MSG(&RCVD) TOUSR(*USRPRF)
ENDPGM
Is This Answer Correct ? | 0 Yes | 0 No |
What are the functions of Remote Job Entry (RJE) ?
Show 2 ways to convert a date from YYMMDD to MMDDYY (MULT operation not acceptable)
a multiple format logical file is also known as?
The content of Physical file is as below: hfcftp wruquief SENDPASV 0 CDUP ASCII GET 01100901.CSV ramndk/ECP505.EC0110090 (REPLACE QUIT Thw above commands will get executed when we call STRTCPFTP from CL program.... Now if I want to use SFTP what can be the solution? plz reply in detail....Thank you for ny help... I m using RPG/ILERPG to download...
How to convert a spool file to PDF file in AS400?
Difference between NOPASS & OMIT?
I have to execute 12000 CL Commands one by one.. So, I have created a file called COMMAND. This file has only 1 field called STRING. This file had 12000 records, and all these records are CL Commands (ex: CALL PGM(PGM1)), etc) I have written a CL which will read all the record and do sbmjob.. But it is not working... Plz help me to exexute all these 12000 commands..
how do you detect unused spool storage?
what is *iso date format?
WHICH REPLY CODE IS USED BT sftp ? ... (e.g.226 is used by FTP IF FILE IS TRANSFERED)
Why we sometimes use same file name in file and tofile in ovrdbf and sometimes different?
Distinguish between logical file and physical file?